Some more wrappers added, code cleanups:
authorRoland Häder <roland@mxchange.org>
Sun, 11 Jul 2010 20:27:15 +0000 (20:27 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 11 Jul 2010 20:27:15 +0000 (20:27 +0000)
- Configuration 'wernis_userid' rewritten to {?wernis_refid?}
- New wrapper getIndexHome() added
- New wrapper getDoublerUserid() added (and a global array element rewritten)
- Doublicate braces (('foo')) cleaned up
- Some code costemtics applied
- Other minor improvements

35 files changed:
doubler.php
inc/filters.php
inc/libs/doubler_functions.php
inc/mails/doubler_mails.php
inc/modules/admin/action-logout.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_extensions.php
inc/modules/admin/what-config_home.php
inc/modules/admin/what-config_primera.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-config_secure.php
inc/modules/admin/what-config_session.php
inc/modules/admin/what-del_user.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-payments.php
inc/modules/admin/what-refbanner.php
inc/modules/admin/what-surfbar_stats.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-unlock_surfbar_urls.php
inc/modules/member/what-categories.php
inc/modules/member/what-primera.php
inc/modules/member/what-support.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/modules/member/what-wernis.php
inc/mysql-manager.php
inc/wrapper-functions.php
templates/de/html/member/member_wernis_mode_choose.tpl

index aaf4c8053b2edaca8e30c0a638020c69e7b42e22..9511fb33320ad8b7df96d633c7826cb0452332ca 100644 (file)
@@ -92,7 +92,7 @@ if (isFormSent()) {
                // Check all together
                if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestParameter('pass'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) {
                        // Nickname resolved to a unique userid or direct userid entered by the member
-                       $GLOBALS['doubler_userid'] = getUserData('userid');
+                       $GLOBALS['local_doubler_userid'] = getUserData('userid');
 
                        // Calulcate points
                        $points = getTotalPoints(getUserData('userid'));
index 197d33ce46cbb19d62a115d094f161fa425aab9c..181c1fe4f2d9567b5858e42c17fba6074896c50d 100644 (file)
@@ -139,7 +139,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) {
 
        // Handle failed logins here if not in guest
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "type=".$data['type'].",action=".getAction().",what=".getWhat().",level=".$data['access_level']."<br />");
-       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) {
+       if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getIndexHome()))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) {
                // Handle failure
                $content['content'] .= handleLoginFailures($data['access_level']);
        } // END - if
@@ -304,7 +304,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
                if (!isWhatSet()) {
                        // Fix it to default
                        setWhat('welcome');
-                       if (getConfig('index_home') != '') setWhatFromConfig('index_home');
+                       if (getIndexHome() != '') setWhatFromConfig('index_home');
                } // END - if
 
                // Update last module / online time
index cc143c2e6ccd4b52567739a0c2569dadbd36e4f5..85dad12df4fb96c36c62183bd660ea66804f4b3c 100644 (file)
@@ -151,5 +151,17 @@ function getDoublerTotalPointsLeft() {
        return $points;
 }
 
+// "Getter" for doubler_userid
+function getDoublerUserid () {
+       // Is it cached?
+       if (!isset($GLOBALS['doubler_userid'])) {
+               // Get it
+               $GLOBALS['doubler_userid'] = getConfig('doubler_userid');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS['doubler_userid'];
+}
+
 // [EOF]
 ?>
index d5259c3c28c0d9dd834d6dab385f6c293d46cb71..2cabb5f49050aa8739b796761e7ca24fd27dffa4 100644 (file)
@@ -62,7 +62,7 @@ if ($DOUBLER_POINTS == '0') {
 unsetGetRequestParameter('DOUBLER_UID');
 unsetPostRequestParameter('DOUBLER_UID');
 setSession('DOUBLER_UID', '');
-if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = '0';
+if (empty($GLOBALS['local_doubler_userid'])) $GLOBALS['local_doubler_userid'] = '0';
 
 // Check for doubles which we can pay out
 $result_total = SQL_QUERY_ESC("SELECT
@@ -123,7 +123,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
                        // Zero refid when empty (might be helpful!)
                        if (empty($ref)) $ref = '0';
 
-                       if (($ref > 0) && ($GLOBALS['doubler_userid'] == $content['userid']) && (!empty($ref))) {
+                       if (($ref > 0) && ($GLOBALS['local_doubler_userid'] == $content['userid']) && (!empty($ref))) {
                                // Referal points found so add them and set line(s) to completed='Y'
                                $content['points'] += $ref;
                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_doubler` SET `completed`='Y' WHERE `refid`=%s AND `completed`='N' AND `is_ref`='Y'",
index b617cb7993586a01c70388c15813b1818e7a19fb..fa356daedf2a3a4c6d7fb8eae1320a84540acbf4 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 if (isPostRequestParameterSet('no')) {
        // Do not logout now
        redirectToUrl('admin.php');
-} elseif ((isPostRequestParameterSet(('yes'))) && (getAction() == 'logout')) {
+} elseif ((isPostRequestParameterSet('yes')) && (getAction() == 'logout')) {
        // Redirect to logout link
        redirectToUrl('modules.php?module=admin&amp;logout=1');
 }
index d6d95ec5a3d29d0a25bfed0500564dd9f5a79ac8..f86cb0a68771c35e18288b7ce01082dbf6056c4e 100644 (file)
@@ -182,9 +182,9 @@ WHERE ".$AND." AND `id`=%s LIMIT 1",
                        break;
        }
 } else {
-       if ((isGetRequestParameterSet(('act'))) && (isGetRequestParameterSet(('tid'))) && (isGetRequestParameterSet(('fid')))) {
+       if ((isGetRequestParameterSet('act')) && (isGetRequestParameterSet('tid')) && (isGetRequestParameterSet('fid'))) {
                // Get ids
-               if (isGetRequestParameterSet(('w'))) {
+               if (isGetRequestParameterSet('w')) {
                        // Sub menus selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                        array(getRequestParameter('act'), bigintval(getRequestParameter('tid'))), __FILE__, __LINE__);
@@ -212,8 +212,8 @@ WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval(getRequestParameter('tid')), bigintval($fid)), __FILE__, __LINE__);
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
                                array(bigintval(getRequestParameter('fid')), bigintval($tid)), __FILE__, __LINE__);
-               }
-       }
+               } // END - if
+       } // END - if
 
        // By default list menus
        if (!empty($SUB)) {
index 88c10a2e395376bc1a0e8305130f96e500ae66e5..3242fcc33517ac3f13ee901a4d7ea40c0ebf7c98 100644 (file)
@@ -46,15 +46,15 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Remove empty array index
-if (!isPostRequestParameterSet(('max'))) unsetPostRequestParameter(('add_max'));
+if (!isPostRequestParameterSet('max')) unsetPostRequestParameter('add_max');
 
-if (isPostRequestParameterSet(('add_max'))) {
+if (isPostRequestParameterSet('add_max')) {
        // Save all settings
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1",
        array(bigintval(postRequestParameter('max'))), __FILE__, __LINE__);
        if (SQL_HASZERONUMS($result)) {
                // Add this value (including comment)
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES ('%s','%s')",
                array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__);
                $content = '{--ADMIN_MAX_VALUE_SAVED--}';
        } else {
index fd4d74d79aab634185bdf08a655513b5c252b6c0..17c2b656d2fc9e8bab6784a57b0f39bcec5fdbb0 100644 (file)
@@ -49,22 +49,21 @@ if (isFormSent()) {
        // Save configuration
        adminSaveSettingsFromPostData();
 } else {
-       // Prepare data
-       switch (getConfig('verbose_sql')) {
-               case 'Y':
-                       $content['verbose_y'] = ' checked="checked"';
-                       $content['verbose_n'] = '';
-                       break;
+       // Prepare content
+       $content['verbose_y'] = '';
+       $content['verbose_n'] = '';
 
-               case 'N':
-                       $content['verbose_y'] = '';
-                       $content['verbose_n'] = ' checked="checked"';
-                       break;
-       } // END - switch
+       // Prepare data
+       if (isVerboseSqlEnabled()) {
+               // Is enabled
+               $content['verbose_y'] = ' checked="checked"';
+       } else {
+               // Is disabled
+               $content['verbose_n'] = ' checked="checked"';
+       }
 
        // Load template
        loadTemplate('admin_config_extensions', false, $content);
-
 }
 
 // [EOF]
index f1bdde572eaeb3480043baf5111f8bd14db33535..c134ccf7b67af00e6726aaa0892b374e24c221cd 100644 (file)
@@ -71,9 +71,9 @@ switch ($sub) {
                break;
 
        case 'target': // Set which what-file will be placed in home-page (only modules.php?module=index)
-               if (isGetRequestParameterSet(('home'))) {
+               if (isGetRequestParameterSet('home')) {
                        // Set new home
-                       updateConfiguration('index_home', getRequestParameter(('home')));
+                       updateConfiguration('index_home', getRequestParameter('home'));
                } // END - if
 
                // Load all what menu points
@@ -91,7 +91,7 @@ ORDER BY `sort` ASC", __FILE__, __LINE__);
                        $newHomeLink = '<a href="{%url=modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=' . $content['what'] . '%}">{--_IS_NEW_HOME--}</a>';
 
                        // Is this current home?
-                       if ($content['what'] == getConfig('index_home')) {
+                       if ($content['what'] == getIndexHome()) {
                                // Is current home
                                $newHomeLink      = '<div class="admin_mark">{--_IS_CURRENT_HOME--}</div>';
                                $content['title'] = '<div class="admin_mark">' . $content['title'] . '</div>';
index 72585cc0739922bae81bc5ea2860768d715abf55..32ef9cf40f07b8614ab1f83865939ba01590585f 100644 (file)
@@ -50,7 +50,7 @@ if (isFormSent()) {
        mergeConfig(postRequestArray());
 
        // Is the password set?
-       if (isPostRequestParameterSet(('pass'))) {
+       if (isPostRequestParameterSet('pass')) {
                // Then hash and remove it
                setPostRequestParameter('primera_api_md5', md5(postRequestParameter('pass')));
                unsetPostRequestParameter('pass');
index 1d211e3d1081d2da97e24d9b0b46b1e748125069..fe8915c9377e5d0be9979487802655a6831727ad 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 if (isGetRequestParameterSet('rallye')) {
        // Price submitted?
        if (isFormSent('add')) {
-               if ((isPostRequestParameterSet(('level'))) && ((isPostRequestParameterSet('points')) || (isPostRequestParameterSet(('info'))))) {
+               if ((isPostRequestParameterSet('level')) && ((isPostRequestParameterSet('points')) || (isPostRequestParameterSet('info')))) {
                        // Submitted data is valid, but maybe we already have this price level?
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
                        array(bigintval(getRequestParameter('rallye')), bigintval(postRequestParameter('level'))), __FILE__, __LINE__);
index db890563e982d87b0fbd00d379c68539dab5d721..26045cdc1613a4f4a6524d3844747a6d0370f76b 100644 (file)
@@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__);
 
 if (isFormSent()) {
        // If salt length is empty or null then we shall generate new passwords
-       if (!isPostRequestParameterSet(('salt_length')) || (postRequestParameter('salt_length') == '0')) {
+       if (!isPostRequestParameterSet('salt_length') || (postRequestParameter('salt_length') == '0')) {
                // Generate new passwords for all!
                loadInclude('inc/gen_sql_patches.php');
 
index a1164b95ada838b5b818b8c256a39e880100bf61..34641f86c5eb25c19060681722ab44f406eabe85 100644 (file)
@@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__);
 
 if (isFormSent()) {
        // Test Path
-       if ((!isPostRequestParameterSet(('session_save_path'))) || ((isDirectory(postRequestParameter('session_save_path'))) && (is_writeable(postRequestParameter('session_save_path'))))) {
+       if ((!isPostRequestParameterSet('session_save_path')) || ((isDirectory(postRequestParameter('session_save_path'))) && (is_writeable(postRequestParameter('session_save_path'))))) {
                // Save configuration
                adminSaveSettingsFromPostData();
        } else {
index 874dc11c6e281ec1dec5de208197141f497ac446..382787087a9993bc9e40dff37109c36a67e1b4c6 100644 (file)
@@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // User exists..
-if ((isFormSent()) || ((isFormSent('del')) && (isPostRequestParameterSet(('reason'))))) {
+if ((isFormSent()) || ((isFormSent('del')) && (isPostRequestParameterSet('reason')))) {
        // Is the account there?
        if (fetchUserData(getRequestParameter('userid'))) {
                // Delete user account
index 0e5023dc8e9e9924183d318278ae0ba2efec060b..f65302b6b028158af81c88de9c636be0d6c61945 100644 (file)
@@ -68,7 +68,7 @@ ORDER BY
 $WHO = '';
 $SQL2 = '';
 
-if (isGetRequestParameterSet(('mid'))) {
+if (isGetRequestParameterSet('mid')) {
        // Only a specific mail shall be displayed
        $sql = sprintf("SELECT
        `id`, `sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `target_send`, `cat_id`
@@ -128,7 +128,7 @@ if (!isGetRequestParameterSet('offset')) {
 } // END - if
 
 // Add limitation to SQL string
-if (!isGetRequestParameterSet(('mid'))) {
+if (!isGetRequestParameterSet('mid')) {
        // Create limitation line
        $add = ' LIMIT ' . (bigintval(getRequestParameter('offset')) * bigintval(getRequestParameter('page')) - bigintval(getRequestParameter('offset'))) . ', ' . bigintval(getRequestParameter('offset'));
 
index 12aeec675fdb1dc68cd045f349227c59e7a59f63..5001a82579e489b003a930fa0dc29edb615ecdc9 100644 (file)
@@ -259,7 +259,7 @@ if (isGetRequestParameterSet('reg_ext')) {
 
 // Shall we display active/inactive extensions?
 $where = '';
-if (isGetRequestParameterSet(('active'))) {
+if (isGetRequestParameterSet('active')) {
        $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestParameter('active'))));
 } // END - if
 
index 7e10f9a4f7eb3c7cc1a116e53da7c8ffb72cf16c..da518d24747f2f018ef84bfdb31d29d75f28884a 100644 (file)
@@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-if (isGetRequestParameterSet(('pid'))) {
+if (isGetRequestParameterSet('pid')) {
        // First let's get the member's id
        $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1",
                array(getRequestParameter('pid')), __FILE__, __LINE__);
@@ -53,7 +53,7 @@ if (isGetRequestParameterSet(('pid'))) {
        SQL_FREERESULT($result);
 
        // Obtain some data
-       if (!isGetRequestParameterSet(('task')) && (!empty($userid)) && ($userid > 0)) {
+       if (!isGetRequestParameterSet('task') && (!empty($userid)) && ($userid > 0)) {
                // Get task id from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `userid`=%s AND `task_type`='PAYOUT_REQUEST' AND `task_created`=%s LIMIT 1",
                        array(bigintval($userid), bigintval($tstamp)), __FILE__, __LINE__);
index d9fe102e9de8dc255241e5cf11e1d9ae5f6a24fc..53e8a7c6579596445c0874cd80a63d755c7f0100 100644 (file)
@@ -186,7 +186,7 @@ LIMIT 1",
        } // END - if
 
        // Parse the status or mode parameter
-       if (isGetRequestParameterSet(('status'))) {
+       if (isGetRequestParameterSet('status')) {
                // Is a WHERE statement already there?
                if (!empty($whereStatement)) {
                        // Then append the status column
@@ -321,9 +321,9 @@ LIMIT 1",
 
                // Init title with "all accounts"
                $content['title'] = '{--ADMIN_ALL_ACCOUNTS--}';
-               if (isGetRequestParameterSet(('status'))) {
+               if (isGetRequestParameterSet('status')) {
                        // Set title according to the 'status'
-                       $content['title'] = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter(('status'))));
+                       $content['title'] = sprintf("{--ADMIN_LIST_STATUS_%s_ACCOUNTS--}", strtoupper(getRequestParameter('status')));
                } elseif (isGetRequestParameterSet('mode')) {
                        // Set title according to the "mode"
                        $content['title'] = sprintf("{--ADMIN_LIST_MODE_%s_ACCOUNTS--}", strtoupper(getRequestParameter('mode')));
index 1df93ee820e85d7e70a1150a1e1e50bc2e646efc..2860ab6933860b50a393895b9144f64318519700 100644 (file)
@@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-if (((!isPostRequestParameterSet(('t_wait'))) || (!isPostRequestParameterSet(('payment')))) && (isGetRequestParameterSet('do')) && (getRequestParameter('do') == 'add')) {
+if (((!isPostRequestParameterSet('t_wait')) || (!isPostRequestParameterSet('payment'))) && (isGetRequestParameterSet('do')) && (getRequestParameter('do') == 'add')) {
        unsetPostRequestParameter('ok');
 } // END - if
 
index 5d4b6a961af4636d4eca6abae84c6d45322c60b3..4e241a0a70c82abc234d4dc6cb1bc922911ad33d 100644 (file)
@@ -46,9 +46,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Some sanity-check
-if ((!isPostRequestParameterSet('url')) || (!isPostRequestParameterSet(('alternate')))) {
+if ((!isPostRequestParameterSet('url')) || (!isPostRequestParameterSet('alternate'))) {
        unsetPostRequestParameter('ok');
-}
+} // END - if
 
 if (isFormSent()) {
        // Fix older calls from add-new-banner-form
@@ -91,7 +91,7 @@ VALUES ('%s','%s','%s')",
                                        ), __FILE__, __LINE__);
                        }
                        break;
-       }
+       } // END - switch
 
        // Check if we have saved (updated)
        if (SQL_AFFECTEDROWS() == 1) {
index 1790adc2488a4b18e48dad6de391c1e33d270745..55f8e0fe6be876e7a8e67bab6e197a754f1ac548 100644 (file)
@@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Is the 'url_id' set?
-if (isGetRequestParameterSet(('url_id'))) {
+if (isGetRequestParameterSet('url_id')) {
        // Generate general statistics
        $result = SQL_QUERY_ESC("SELECT
        `stats_userid`,
index cc0f464db5607be39bd5d367f967cc8428c1dbbe..4bb84530d2e292afee9717b7643e79546246b4c2 100644 (file)
@@ -56,7 +56,7 @@ if (ifPostContainsSelections()) {
        foreach (postRequestParameter('sel') as $id => $sel) {
                $sql = '';
                // Shall I de-/activate or delete themes?
-               if (isPostRequestParameterSet(('status'))) {
+               if (isPostRequestParameterSet('status')) {
                        // Change status
                        if (postRequestParameter('active', $id) == 'Y') {
                                $sql = "UPDATE `{?_MYSQL_PREFIX?}_themes` SET `theme_active`='N' WHERE `id`=%s LIMIT 1";
index dda8be3586256490b0b190f371be54bc803dc8c2..52faf0d8a9498ad94bb1af7966f2f570c9aea5c6 100644 (file)
@@ -123,7 +123,7 @@ LIMIT 1",
 
                // Mails unlocked for mail delivery
                loadTemplate('admin_settings_saved', false, $message);
-       } elseif (isPostRequestParameterSet(('reject'))) {
+       } elseif (isPostRequestParameterSet('reject')) {
                if (ifPostContainsSelections()) {
                        // Reject mail orders
                        $OUT = '';
index 0eb908dd5dbf734b501e6ca6f5017c6a81218abe..885a27c960974b25571b3386079d2b4819531854 100644 (file)
@@ -55,7 +55,7 @@ if ((isPostRequestParameterSet('unlock')) && (is_array(postRequestParameter('url
                // Unlock failed!
                loadTemplate('admin_settings_saved', false, '{--ADMIN_SURFBAR_UNLOCK_FAILED--}');
        }
-} elseif ((isPostRequestParameterSet(('reject'))) && (is_array(postRequestParameter('url_id'))) && (count(postRequestParameter('url_id')) > 0)) {
+} elseif ((isPostRequestParameterSet('reject')) && (is_array(postRequestParameter('url_id'))) && (count(postRequestParameter('url_id')) > 0)) {
        // Reject selected URLs
        if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestParameter('url_id'))) {
                // Unlock done! :-)
index 32859bbd3fdf1eb22cb8357c8691a7d012ed388a..ce92c895308e3f28bba80909d9ca3d27a11e02ac 100644 (file)
@@ -134,12 +134,12 @@ if ($cats > 0) {
                        $content['jy'] = '';
 
                        // When we found an entry don't read it, just change the jx elements
-                       if (isPostRequestParameterSet(('cat'))) {
+                       if (isPostRequestParameterSet('cat')) {
                                // Form sent?
                                if (postRequestParameter('cat', $content['id']) =='Y') {
                                        $content['jy'] = ' checked="checked"';
                                        $content['jn'] = '';
-                               }
+                               } // END - if
                        } else {
                                // Check if he has an entry
                                if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', true, sprintf(" AND `cat_id`=%s", bigintval($content['id']))) == 1) {
index 243a2bb3370704e77bcefb5452865b67ca591f46..075bcefdffe54b730eef8475b05464231d89e9e1 100644 (file)
@@ -67,9 +67,6 @@ $points = false;
 
 // Is the mode set (payout only)
 if (!isGetRequestParameterSet('mode')) {
-       // Get referal id
-       $content['refid'] = getConfig(('primera_refid'));
-
        // Is there an id?
        if ((!empty($content['primera_nickname'])) && (!isGetRequestParameterSet('mode'))) {
                // Then use an other "mode"
@@ -129,13 +126,13 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) {
        switch (getRequestParameter('mode')) {
                case 'pay': // Payout this exchange -> Primus
                        // Is the user id and password set?
-                       if (!isPostRequestParameterSet(('primera_nickname'))) {
+                       if (!isPostRequestParameterSet('primera_nickname')) {
                                // Nothing entered in Primus nickname
                                loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_USERNAME--}');
-                       } elseif (!isPostRequestParameterSet(('primera_password'))) {
+                       } elseif (!isPostRequestParameterSet('primera_password')) {
                                // Nothing entered in Primera password
                                loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_PASSWORD--}');
-                       } elseif (!isPostRequestParameterSet(('amount'))) {
+                       } elseif (!isPostRequestParameterSet('amount')) {
                                // Nothing entered in amount
                                loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_AMOUNT--}');
                        } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) {
index 8e0eec535d6fd8e97c752e7c64b8ebfe00fe8f00..e074ad8aa4031d74bf81df9ecbf99e854697a571 100644 (file)
@@ -52,7 +52,7 @@ if ((!isExtensionActive('support')) && (!isAdmin())) {
        return;
 } // END - if
 
-if ((!isFormSent()) || (!isPostRequestParameterSet(('qsummary')))) {
+if ((!isFormSent()) || (!isPostRequestParameterSet('qsummary'))) {
        // Output form
        loadTemplate('member_support_form', false, getUserDataArray());
 } else {
index a06466e85801611840803225ab75ba3d50f1fbc1..528ce0063f140d1f1276127843a3d7b473b0a8c4 100644 (file)
@@ -57,9 +57,9 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) {
 if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
        // No more URLs allowed to book!
        loadTemplate('admin_settings_saved', false, '{--MEMBER_SURFBAR_NO_MORE_ALLOWED--}');
-} elseif ((isFormSent()) && (isPostRequestParameterSet(('limited')))) {
+} elseif ((isFormSent()) && (isPostRequestParameterSet('limited'))) {
        // Is limitation "no" and "limit" is > 0?
-       if ((postRequestParameter('limited') != 'Y') && ((isPostRequestParameterSet(('limit'))) && (postRequestParameter('limit') > 0)) || (!isPostRequestParameterSet(('limit')))) {
+       if ((postRequestParameter('limited') != 'Y') && ((isPostRequestParameterSet('limit')) && (postRequestParameter('limit') > 0)) || (!isPostRequestParameterSet('limit'))) {
                // Set it to unlimited
                setPostRequestParameter('limit', 0);
        } // END - if
index 2b1de42a38172a51a333ab4f90536b61a010c3c5..2a991cdec27e5f6fa3b9f47e925b559d55e4a10e 100644 (file)
@@ -56,7 +56,7 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) {
 $urlArray = SURFBAR_GET_USER_URLS();
 
 // Are there entries or form is submitted?
-if ((isFormSent()) && (isPostRequestParameterSet(('action'))) && (isPostRequestParameterSet('id'))) {
+if ((isFormSent()) && (isPostRequestParameterSet('action')) && (isPostRequestParameterSet('id'))) {
        // Process the form
        if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $urlArray)) {
                // Action performed but shall we display it?
index ae163b75109f16d70a2e04fed8fc49d94c74ddf4..85bff3a9f43dd243b03cd32f6cf0deff26d6b606 100644 (file)
@@ -222,8 +222,8 @@ switch ($mode) {
                                // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
                                while (list($userid, $nick) = SQL_FETCHROW($result)) {
                                        $OUT .= "       <option value=\"".$userid."\"";
-                                       if ((isPostRequestParameterSet(('to_userid'))) && (postRequestParameter('to_userid') == $userid)) $OUT .= ' selected="selected"';
-                                       $OUT .= ">";
+                                       if ((isPostRequestParameterSet('to_userid')) && (postRequestParameter('to_userid') == $userid)) $OUT .= ' selected="selected"';
+                                       $OUT .= '>';
                                        if (($nick != $userid) && (!empty($nick))) {
                                                // Output nickname
                                                $OUT .= $nick;
@@ -231,9 +231,9 @@ switch ($mode) {
                                                // Output userid
                                                $OUT .= $userid;
                                        }
-                                       $OUT .= "</option>\n";
+                                       $OUT .= '</option>';
                                }
-                               $OUT .= "</select>\n";
+                               $OUT .= '</select>';
                                $content['to_disabled'] = '';
 
                                // Free memory
index bb59e8151c12e29adf10f5f97a6b02178467ad68..ffa88d7eac8e003f866402f1a5f3e388b45ff068 100644 (file)
@@ -80,7 +80,7 @@ LIMIT 1",
 
        // Free result
        SQL_FREERESULT($result_data);
-} elseif (isGetRequestParameterSet(('mailid'))) {
+} elseif (isGetRequestParameterSet('mailid')) {
        // Display regular member mail by loading its full data
        $result_data = SQL_QUERY_ESC("SELECT
        s.id, s.subject, p.text, s.timestamp_ordered AS `timestamp`, s.cat_id, pay.price AS points, p.sender, pay.time, p.data_type
index 8cf42616a4a6c35ebc5bb1c3a6c77107ce2be463..a0acd2d8e6bd2dbd2b01a1563e37fffa2a0fc3ee 100644 (file)
@@ -66,7 +66,6 @@ $content = array(); $points = false;
 // Is the mode set (withdraw or payout)
 if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choose')) {
        // Let the user choose what he wants to do
-       $content['refid']    = getConfig(('wernis_refid'));
        $content['wernis_userid'] = '0';
 
        // Is there an id?
index cc8988e1f91742c7a6f294f1d3b558bff94f1169..45bd10646e9804c46928bb3529564d119a00a42f 100644 (file)
@@ -47,7 +47,7 @@ if (!defined('__SECURITY')) {
 function getTitleFromMenu ($mode, $what, $column = 'what', $ADD='') {
        // Fix empty 'what'
        if (empty($what)) {
-               $what = getConfig('index_home');
+               $what = getIndexHome();
        } // END - if
 
        // Default is not found
@@ -732,7 +732,7 @@ function getActionFromModuleWhat ($module, $what) {
                }
        } elseif ((empty($what)) && ($module != 'admin')) {
                // Use configured 'home'
-               $what = getConfig('index_home');
+               $what = getIndexHome();
        } // END - if
 
        if ($module == 'admin') {
@@ -1545,7 +1545,7 @@ function getWhatFromModule ($modCheck) {
                        // Is ext-sql_patches installed and newer than 0.0.5?
                        if (isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
                                // Use it from config
-                               $what = getConfig('index_home');
+                               $what = getIndexHome();
                        } else {
                                // Use default 'welcome'
                                $what = 'welcome';
index 56620b901933277a19059475f389d7a1043d05f5..934e42f5f7cb5f989a7a0e6494a9bb4320d82c17 100644 (file)
@@ -1790,6 +1790,18 @@ function getOnlineTimeout () {
        return $GLOBALS['online_timeout'];
 }
 
+// "Getter" for index_home
+function getIndexHome () {
+       // Do we have cache?
+       if (!isset($GLOBALS['index_home'])) {
+               // Determine it
+               $GLOBALS['index_home'] = getConfig('index_home');
+       } // END - if
+
+       // Return cache
+       return $GLOBALS['index_home'];
+}
+
 // Checks wether proxy configuration is used
 function isProxyUsed () {
        // Do we have cache?
index 28cdf15006f4f8f5c6e4db38db19fb12ba217ad0..7b8d2ad4b65cecbc11398b66e7c98e29c7a7f4c4 100644 (file)
@@ -15,5 +15,5 @@
        </tr>
 </table>
 
-<a href="http://www.wds66.com/ref.php?refid=$content[refid]" target="_blank" rel="external">{--MEMBER_WERNIS_NO_ACCOUNT--}</a>
+<a href="http://www.wds66.com/ref.php?refid={?wernis_refid?}" target="_blank" rel="external">{--MEMBER_WERNIS_NO_ACCOUNT--}</a>
 </div>