]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
fooRequestElementBar() functions renamed, adding of request parameters added:
[mailer.git] / inc / modules / admin / admin-inc.php
index ac2747eb35c7a9d47637160bae69601b9677b32d..66e71dc1597fabab8b6131b71bebfce077362659 100644 (file)
@@ -573,7 +573,7 @@ function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement
 // Save settings to the database
 function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = false, $displayMessage = true) {
        // Prepare all arrays, variables
-       $DATA = array();
+       $tableData = array();
        $skip = false;
 
        // Now, walk through all entries and prepare them for saving
@@ -581,7 +581,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                // Process only formular field but not submit buttons ;)
                if ($id != 'ok') {
                        // Do not save the ok value
-                       convertSelectionsToTimestamp($postData, $DATA, $id, $skip);
+                       convertSelectionsToTimestamp($postData, $tableData, $id, $skip);
 
                        // Shall we process this id? It muss not be empty, of course
                        if (($skip === false) && (!empty($id)) && (!isset($GLOBALS['skip_config'][$id]))) {
@@ -595,10 +595,10 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                                $test = (float)$val;
                                if ('' . $val . '' == '' . $test . '') {
                                        // Add numbers
-                                       $DATA[] = sprintf("`%s`=%s", $id, $test);
+                                       $tableData[] = sprintf("`%s`=%s", $id, $test);
                                } else {
                                        // Add strings
-                                       $DATA[] = sprintf("`%s`='%s'", $id, trim($val));
+                                       $tableData[] = sprintf("`%s`='%s'", $id, trim($val));
                                }
 
                                // Do not add a config entry twice
@@ -622,31 +622,32 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
 
        if (SQL_NUMROWS($result) == 1) {
                // "Implode" all data to single string
-               $DATA_UPDATE = implode(', ', $DATA);
+               $updatedData = implode(', ', $tableData);
 
                // Generate SQL string
                $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}%s` SET %s WHERE %s LIMIT 1",
                        $tableName,
-                       $DATA_UPDATE,
+                       $updatedData,
                        $whereStatement
                );
        } else {
                // Add Line (does only work with auto_increment!
-               $KEYs = array(); $values = array();
-               foreach ($DATA as $entry) {
+               $keys = array(); $values = array();
+               foreach ($tableData as $entry) {
                        // Split up
                        $line = explode('=', $entry);
-                       $KEYs[] = $line[0]; $values[] = $line[1];
+                       $keys[] = $line[0];
+                       $values[] = $line[1];
                } // END - foreach
 
                // Add both in one line
-               $KEYs = implode('`, `', $KEYs);
+               $keys = implode('`, `', $keys);
                $values = implode(', ', $values);
 
                // Generate SQL string
                $sql = sprintf("INSERT INTO `{?_MYSQL_PREFIX?}%s` (%s) VALUES (%s)",
                        $tableName,
-                       $KEYs,
+                       $keys,
                        $values
                );
        }
@@ -826,7 +827,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') {
        } // END - if
 
        // Is the raw userid set?
-       if (postRequestElement('userid_raw', $id) > 0) {
+       if (postRequestParameter('userid_raw', $id) > 0) {
                // Generate subject
                $subjectLine = getMessage('MEMBER_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT');
 
@@ -838,7 +839,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') {
                }
 
                // Send email out
-               sendEmail(postRequestElement('userid_raw', $id), $subjectLine, $mail);
+               sendEmail(postRequestParameter('userid_raw', $id), $subjectLine, $mail);
        } // END - if
 
        // Generate subject
@@ -846,9 +847,9 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') {
 
        // Send admin notification out
        if (!empty($subjectPart)) {
-               sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestElement('userid_raw', $id));
+               sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter('userid_raw', $id));
        } else {
-               sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestElement('userid_raw', $id));
+               sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestParameter('userid_raw', $id));
        }
 }
 
@@ -1006,7 +1007,7 @@ function adminDeleteEntriesConfirm ($IDs, $table, $columns=array(), $filterFunct
                        $idList = '';
                        foreach ($IDs as $id => $sel) {
                                // Is there a userid?
-                               if (isPostRequestElementSet('userid_raw', $id)) {
+                               if (isPostRequestParameterSet('userid_raw', $id)) {
                                        // Load all data from that id
                                        $result = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_%s` WHERE %s=%s LIMIT 1",
                                        array($table, $idColumn, $id), __FUNCTION__, __LINE__);
@@ -1394,7 +1395,7 @@ function doVerifyExpertSettings () {
                                // Ask for them
                                if (isFormSent()) {
                                        // Is the element set, then we need to change the admin
-                                       if (isPostRequestElementSet('expert_settings')) {
+                                       if (isPostRequestParameterSet('expert_settings')) {
                                                // Get it and prepare final post data array
                                                $postData['login'][getCurrentAdminId()] = getAdminLogin(getCurrentAdminId());
                                                $postData['expert_warning'][getCurrentAdminId()] = 'N';
@@ -1403,7 +1404,7 @@ function doVerifyExpertSettings () {
                                                adminsChangeAdminAccount($postData, 'expert_warning');
 
                                                // Clear form
-                                               unsetPostRequestElement('ok');
+                                               unsetPostRequestParameter('ok');
                                        } // END - if
 
                                        // All fine!