From a226d81121cb96048b1ed85fd8584a87d435b0db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 11 Jul 2010 20:27:15 +0000 Subject: [PATCH] Some more wrappers added, code cleanups: - 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 --- doubler.php | 2 +- inc/filters.php | 4 ++-- inc/libs/doubler_functions.php | 12 ++++++++++ inc/mails/doubler_mails.php | 4 ++-- inc/modules/admin/action-logout.php | 2 +- inc/modules/admin/what-adminedit.php | 8 +++---- inc/modules/admin/what-config_email.php | 6 ++--- inc/modules/admin/what-config_extensions.php | 23 +++++++++---------- inc/modules/admin/what-config_home.php | 6 ++--- inc/modules/admin/what-config_primera.php | 2 +- .../admin/what-config_rallye_prices.php | 2 +- inc/modules/admin/what-config_secure.php | 2 +- inc/modules/admin/what-config_session.php | 2 +- inc/modules/admin/what-del_user.php | 2 +- inc/modules/admin/what-email_details.php | 4 ++-- inc/modules/admin/what-extensions.php | 2 +- inc/modules/admin/what-list_payouts.php | 4 ++-- inc/modules/admin/what-list_user.php | 6 ++--- inc/modules/admin/what-payments.php | 2 +- inc/modules/admin/what-refbanner.php | 6 ++--- inc/modules/admin/what-surfbar_stats.php | 2 +- inc/modules/admin/what-theme_edit.php | 2 +- inc/modules/admin/what-unlock_emails.php | 2 +- .../admin/what-unlock_surfbar_urls.php | 2 +- inc/modules/member/what-categories.php | 4 ++-- inc/modules/member/what-primera.php | 9 +++----- inc/modules/member/what-support.php | 2 +- inc/modules/member/what-surfbar_book.php | 4 ++-- inc/modules/member/what-surfbar_list.php | 2 +- inc/modules/member/what-transfer.php | 8 +++---- inc/modules/member/what-unconfirmed.php | 2 +- inc/modules/member/what-wernis.php | 1 - inc/mysql-manager.php | 6 ++--- inc/wrapper-functions.php | 12 ++++++++++ .../html/member/member_wernis_mode_choose.tpl | 2 +- 35 files changed, 90 insertions(+), 71 deletions(-) diff --git a/doubler.php b/doubler.php index aaf4c8053b..9511fb3332 100644 --- a/doubler.php +++ b/doubler.php @@ -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')); diff --git a/inc/filters.php b/inc/filters.php index 197d33ce46..181c1fe4f2 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -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']."
"); - 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 diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index cc143c2e6c..85dad12df4 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -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] ?> diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index d5259c3c28..2cabb5f490 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -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'", diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php index b617cb7993..fa356daedf 100644 --- a/inc/modules/admin/action-logout.php +++ b/inc/modules/admin/action-logout.php @@ -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&logout=1'); } diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index d6d95ec5a3..f86cb0a687 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -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)) { diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 88c10a2e39..3242fcc335 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -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 { diff --git a/inc/modules/admin/what-config_extensions.php b/inc/modules/admin/what-config_extensions.php index fd4d74d79a..17c2b656d2 100644 --- a/inc/modules/admin/what-config_extensions.php +++ b/inc/modules/admin/what-config_extensions.php @@ -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] diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index f1bdde572e..c134ccf7b6 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -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 = '{--_IS_NEW_HOME--}'; // Is this current home? - if ($content['what'] == getConfig('index_home')) { + if ($content['what'] == getIndexHome()) { // Is current home $newHomeLink = '
{--_IS_CURRENT_HOME--}
'; $content['title'] = '
' . $content['title'] . '
'; diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 72585cc073..32ef9cf40f 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -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'); diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 1d211e3d10..fe8915c937 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -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__); diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index db890563e9..26045cdc16 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -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'); diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index a1164b95ad..34641f86c5 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -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 { diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 874dc11c6e..382787087a 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -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 diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 0e5023dc8e..f65302b6b0 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -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')); diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 12aeec675f..5001a82579 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -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 diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 7e10f9a4f7..da518d2474 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -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__); diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index d9fe102e9d..53e8a7c657 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -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'))); diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index 1df93ee820..2860ab6933 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -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 diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 5d4b6a961a..4e241a0a70 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -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) { diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index 1790adc248..55f8e0fe6b 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -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`, diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index cc0f464db5..4bb84530d2 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -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"; diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index dda8be3586..52faf0d8a9 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -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 = ''; diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index 0eb908dd5d..885a27c960 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -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! :-) diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 32859bbd3f..ce92c89530 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -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) { diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 243a2bb337..075bcefdff 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -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'))) { diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 8e0eec535d..e074ad8aa4 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -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 { diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index a06466e858..528ce0063f 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -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 diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 2b1de42a38..2a991cdec2 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -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? diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index ae163b7510..85bff3a9f4 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -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 .= "