]> git.mxchange.org Git - mailer.git/commitdiff
Even more double->single converted
authorquix0r <quix0r@mxchange.org>
Mon, 29 Jul 2013 23:30:41 +0000 (23:30 +0000)
committerquix0r <quix0r@mxchange.org>
Mon, 29 Jul 2013 23:30:41 +0000 (23:30 +0000)
12 files changed:
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_network_array_translation.php
inc/modules/admin/what-list_network_request_params.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-theme_import.php

index 33c542893c305d77b6dd990bd0bba841591b2f18..4a94e8f9b9fee1f1f7017f03b55e353995a7531f 100644 (file)
@@ -614,10 +614,10 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                        // Shall we add numbers or strings?
                        if ('' . $val . '' == '' . $test . '') {
                                // Add numbers
-                               array_push($tableData, sprintf("`%s`=%s", $id, $test));
+                               array_push($tableData, sprintf('`%s`=%s', $id, $test));
                        } elseif (is_null($val)) {
                                // Add NULL
-                               array_push($tableData, sprintf("`%s`=NULL", $id));
+                               array_push($tableData, sprintf('`%s`=NULL', $id));
                        } else {
                                // Add strings
                                array_push($tableData, sprintf("`%s`='%s'", $id, trim($val)));
@@ -1247,7 +1247,7 @@ function adminUpdateTaskData ($id, $row, $data) {
                reportBug(__FUNCTION__, __LINE__, 'id=' . $id . ',row=' . $row . ',data=' . $data . ' - isAdmin()=false');
        } elseif ($id <= 0) {
                // Initiate backtrace
-               reportBug(__FUNCTION__, __LINE__, sprintf("id is invalid: %s. row=%s, data=%s",
+               reportBug(__FUNCTION__, __LINE__, sprintf('id is invalid: %s. row=%s, data=%s',
                        $id,
                        $row,
                        $data
@@ -1531,7 +1531,7 @@ function adminProcessMenuEditForm ($type, $subMenu) {
                                break;
 
                        default: // Unexpected action
-                               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok')));
+                               logDebugMessage(__FUNCTION__, __LINE__, sprintf('Unsupported action %s detected.', postRequestElement('ok')));
                                displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestElement('ok') . '%}');
                                break;
                } // END - switch
@@ -1663,7 +1663,7 @@ function registerFirstAdmin () {
 
                        default:
                                // Any other kind will be logged
-                               $errorMessage = sprintf("Unknown return code %s from ifAdminLoginDataIsValid().", $ret);
+                               $errorMessage = sprintf('Unknown return code %s from ifAdminLoginDataIsValid().', $ret);
                                logDebugMessage(__FUNCTION__, __LINE__, $errorMessage);
 
                                // Set this to have our error message displayed
index 026068e6fb4098127e20e79cc799c67b6cf6f998..e42defec891ae0beb0c347b09742845d312724b8 100644 (file)
@@ -319,7 +319,7 @@ LIMIT 1",
                                                // @TODO This may also be rewritten to include files
                                                switch ($mode) {
                                                        default: // @TODO Unknown support mode
-                                                       logDebugMessage(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction.", $mode));
+                                                       logDebugMessage(__FILE__, __LINE__, sprintf('Unknown support mode %s detected. This part is under construction.', $mode));
                                                        $OUT .= '<div class="notice medium">{%message,ADMIN_UNKNOWN_SUPPORT_MODE=' . $mode . '%}</div>';
                                                        break;
                                                } // END - switch
@@ -386,7 +386,7 @@ LIMIT 1",
                                                break;
 
                                        default: // Unknown task type
-                                               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $taskData['task_type']));
+                                               logDebugMessage(__FILE__, __LINE__, sprintf('Unknown task type %s detected.', $taskData['task_type']));
                                                $OUT .= '<div class="notice medium">' . sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $taskData['task_type'], $taskId) . '</div>';
                                                break;
                                }
@@ -418,7 +418,7 @@ LIMIT 1",
                                } // END - foreach
                        } else {
                                // Unknown action
-                               reportBug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r($postData, TRUE)));
+                               reportBug(__FILE__, __LINE__, sprintf('Unknown task action performed. data=<pre>%s</pre>', print_r($postData, TRUE)));
                        }
 
                        // Update query
index d2bd89be2b14943a5dc86d34d567dfb33794d34e..28b590b0cce6440047aa62893861c7568c0300f6 100644 (file)
@@ -185,7 +185,7 @@ LIMIT 1",
                        break;
 
                default: // Unexpected action
-                       logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok')));
+                       logDebugMessage(__FILE__, __LINE__, sprintf('Unsupported action %s detected.', postRequestElement('ok')));
                        displayMessage('{%message,ADMIN_UNKNOWN_OKAY=' . postRequestElement('ok') . '%}');
                        break;
        } // END - switch
index 7753f42c2219a2243601a9794c2791522127f3b9..b255c9cea8ad86d465feba0eeb517c7e4966d23b 100644 (file)
@@ -78,12 +78,12 @@ if ((isFormSent('do_delete')) || (isFormSent('do_edit')) || (isFormSent('do_add'
                        );
                        if ((getRefPayout() == '0') && (postRequestElement('ref_payout') > 0)) {
                                // Update account's ref_payout for "must-confirm"
-                               addSql(sprintf("UPDATE
+                               addSql(sprintf('UPDATE
        `{?_MYSQL_PREFIX?}_user_data`
 SET
        `ref_payout`=(%s - `mails_confirmed`)
 WHERE
-       `mails_confirmed` < %s", $REF, $REF));
+       `mails_confirmed` < %s', $REF, $REF));
                        } elseif ((getRefPayout() > 0) && (postRequestElement('ref_payout') == '0')) {
                                // Update account's ref_payout for "not-must-confirm"
                                addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0");
index 1fe5197c2ef232d1e48fef9f0131e2a26aebe8f5..e96163d6213970eff30fea6b37607071b4e372f1 100644 (file)
@@ -65,7 +65,7 @@ LIMIT 1",
                $content['warning_interval'] = createTimeSelections($content['warning_interval'], 'warning_interval', 'MWDh');
 
                // Init variables here
-               $TPL = sprintf("admin_edit_sponsor_%s", getRequestElement('do'));
+               $TPL = sprintf('admin_edit_sponsor_%s', getRequestElement('do'));
                initSqls();
 
                // Sponsor was found
@@ -79,7 +79,11 @@ LIMIT 1",
 
                                                // Add points to account
                                                sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`=%s LIMIT 1",
-                                                       array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__);
+                                                       array(
+                                                               $points,
+                                                               bigintval(getRequestElement('id'))
+                                                       ), __FILE__, __LINE__
+                                               );
 
                                                // Remember points /reason for the template
                                                $content['points'] = $points;
@@ -145,10 +149,10 @@ LIMIT 1",
                                        break;
 
                                default: // Unknown mode
-                                       logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('do')));
+                                       logDebugMessage(__FILE__, __LINE__, sprintf('Unknown mode %s detected.', getRequestElement('do')));
                                        $message = '{%message,ADMIN_SPONSOR_INVALID_MODE=' . getRequestElement('do') . '%}';
                                        break;
-                       }
+                       } // END - switch
 
                        if (!empty($message)) {
                                // Output message
index d0b8d1365578734e6588252ca8da97f803bc4a58..31621b7a93ec33ebfab1c93a05fc5b4508f45b07 100644 (file)
@@ -76,7 +76,7 @@ $SQL2 = '';
 
 if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
        // Only a specific mail shall be displayed
-       $sql = sprintf("SELECT
+       $sql = sprintf('SELECT
        `id`,
        `sender`,
        `subject`,
@@ -93,13 +93,13 @@ FROM
        `{?_MYSQL_PREFIX?}_pool`
 WHERE
        `id`=%s
-LIMIT 1",
+LIMIT 1',
                bigintval(getRequestElement('id'))
        );
        $WHO = '{--MAIL_ID--}' . ': ' . getRequestElement('id');
 } elseif (isGetRequestElementSet('userid')) {
        // All mails by a specific member shall be displayed
-       $sql = sprintf("SELECT
+       $sql = sprintf('SELECT
        `id`,
        `sender`,
        `subject`,
@@ -117,7 +117,7 @@ FROM
 WHERE
        `sender`=%s
 ORDER BY
-       `timestamp` DESC",
+       `timestamp` DESC',
                bigintval(getRequestElement('userid'))
        );
        $WHO = '{--USER_ID--}' . ': ' . getRequestElement('userid');
index b5140da685ce5b2157817d316607a20a53d58b83..eb3708d90b84c94a73fd99af53df75305b6ca859 100644 (file)
@@ -112,7 +112,7 @@ if (isGetRequestElementSet('userid')) {
                                                        break;
 
                                                default: // Problem in application detected!
-                                                       reportBug(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $linkData['link_type']));
+                                                       reportBug(__FILE__, __LINE__, sprintf('Invalid email type %s detected.', $linkData['link_type']));
                                                        break;
                                        } // END - switch
 
index 202791f80f9e1561b99cb0e56db582da2abe4186..edcf7cbd7c5414d8ee47cb38c658cd66caa6bad2 100644 (file)
@@ -76,7 +76,7 @@ if (isGetRequestElementSet('network_id')) {
        $ADD = '';
        if ((isPostRequestElementSet('network_type_id')) && (!is_array(postRequestElement('network_type_id')))) {
                // Only show from current type handler
-               $ADD = sprintf(" AND `p`.`network_type_id`=%s", bigintval(postRequestElement('network_type_id')));
+               $ADD = sprintf(' AND `p`.`network_type_id`=%s', bigintval(postRequestElement('network_type_id')));
 
                // Overwrite type
                $networkData['network_type_id'] = bigintval(postRequestElement('network_type_id'));
@@ -86,7 +86,7 @@ if (isGetRequestElementSet('network_id')) {
        } // END - if
 
        // Load all advert codes for given network
-       $result = sqlQueryEscaped("SELECT
+       $result = sqlQueryEscaped('SELECT
        `p`.`network_array_id`,
        `t`.`network_type_id`,
        `t`.`network_type_handler`,
@@ -100,10 +100,10 @@ ON
        `p`.`network_type_id`=`t`.`network_type_id`
 WHERE
        `p`.`network_id`=%s
-       ".$ADD."
+       ' . $ADD . '
 ORDER BY
        `t`.`network_type_handler` ASC,
-       `p`.`network_array_sort` ASC",
+       `p`.`network_array_sort` ASC',
                array(
                        bigintval(getRequestElement('network_id'))
                ), __FILE__, __LINE__);
index 1f2487e30bae5e2121f871bc711688345797b340..0ef1d095b6a1e6269e38dde60fa746f02f66c286 100644 (file)
@@ -74,7 +74,7 @@ if (isGetRequestElementSet('network_id')) {
        $ADD = '';
        if ((isPostRequestElementSet('network_type_id')) && (!is_array(postRequestElement('network_type_id')))) {
                // Only show from current type handler
-               $ADD = sprintf(" AND `p`.`network_type_id`=%s", bigintval(postRequestElement('network_type_id')));
+               $ADD = sprintf(' AND `p`.`network_type_id`=%s', bigintval(postRequestElement('network_type_id')));
 
                // Overwrite type id
                $networkData['network_type_id'] = bigintval(postRequestElement('network_type_id'));
index ff171fded3ed00434a2c63579fea731040161ed2..5f9da909cd0a13fc6ab98217de615026909b6ab0 100644 (file)
@@ -74,7 +74,7 @@ switch (getRequestElement('type')) {
                break;
 
        default: // Unknown type
-               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestElement('type')));
+               logDebugMessage(__FILE__, __LINE__, sprintf('Unknown task type %s detected.', getRequestElement('type')));
                displayMessage('{%message,ADMIN_TASK_UNKNOWN_MODE' . getRequestElement('type') . '%}');
                break;
 } // END - switch
@@ -121,7 +121,7 @@ ORDER BY
                                } // END - foreach
                        } else {
                                // Unknown action performed
-                               reportBug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r(postRequestArray(), TRUE)));
+                               reportBug(__FILE__, __LINE__, sprintf('Unknown task action performed. data=<pre>%s</pre>', print_r(postRequestArray(), TRUE)));
                        }
 
                        // Update query
index cd6da112e6d7816dc91e04c0e1957b4222a5a157..822d58d766f4c89e08f857a682c544f80a85e8c9 100644 (file)
@@ -57,7 +57,7 @@ $sql = '';
 // List confirmation links from normal or bonus mails
 if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {
        // SQL query for mail data
-       $sql = sprintf("SELECT
+       $sql = sprintf('SELECT
        `s`.`id`,
        `p`.`sender`,
        `p`.`subject`,
@@ -73,7 +73,7 @@ ON
        `p`.`id`=`s`.`pool_id`
 WHERE
        `s`.`pool_id`=%s
-LIMIT 1",
+LIMIT 1',
                bigintval(getRequestElement('id'))
        );
 
@@ -87,7 +87,7 @@ LIMIT 1",
        $DATA = getRequestElement('id');
 } elseif (((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'bonus')) && (isExtensionActive('bonus'))) {
        // SQL query for mail data (both ids are required for compatiblity to above normal mail
-       $sql = sprintf("SELECT
+       $sql = sprintf('SELECT
        `id`,
        NULL AS `sender`,
        `subject`,
@@ -99,7 +99,7 @@ FROM
        `{?_MYSQL_PREFIX?}_bonus`
 WHERE
        `id`=%s
-LIMIT 1",
+LIMIT 1',
                bigintval(getRequestElement('id'))
        );
 
index 0d8c7aeeaac2a5fc621f55ec3394bcb2e4287190..8e08532f1a79f655a93807356b2fcf292a672ca1 100644 (file)
@@ -50,13 +50,10 @@ $GLOBALS['theme_mode'] = 'test';
 if (isPostRequestElementSet('theme')) {
        // Check if theme is there
        if (!ifThemeExists(postRequestElement('theme'))) {
-               // Import theme
-               $inc = sprintf("theme/%s/theme.php", sqlEscapeString(postRequestElement('theme')));
-
                // Is the theme readable?
-               if (isIncludeReadable($inc)) {
+               if (isThemeReadable(postRequestElement('theme'))) {
                        // Load the theme header file
-                       loadInclude($inc);
+                       loadInclude(sprintf('theme/%s/theme.php', sqlEscapeString(postRequestElement('theme'))));
 
                        // Register it ith the exchange
                        sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)