From 6d348813375b48ecd6344d52ec2b821046c353a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 9 Mar 2009 06:14:07 +0000 Subject: [PATCH] Some dublicated braces removed, some fixed (broken: update depencies got registered X times) --- inc/extensions.php | 54 ++++++++++++------- inc/fatal_errors.php | 2 +- inc/filters.php | 2 +- inc/functions.php | 6 +-- inc/modules/admin.php | 4 +- inc/modules/admin/what-admins_edit.php | 4 +- inc/modules/admin/what-admins_mails.php | 2 +- inc/modules/admin/what-config_admins.php | 4 +- inc/modules/admin/what-config_email.php | 2 +- inc/modules/admin/what-config_mods.php | 4 +- inc/modules/admin/what-config_points.php | 2 +- .../admin/what-config_rallye_prices.php | 4 +- inc/modules/admin/what-extensions.php | 10 ++-- inc/modules/admin/what-list_bank_package.php | 6 +-- inc/modules/admin/what-list_country.php | 6 +-- inc/modules/admin/what-list_payouts.php | 2 +- inc/modules/admin/what-list_rallyes.php | 4 +- inc/modules/admin/what-list_sponsor_pay.php | 10 ++-- inc/modules/admin/what-list_surfbar_urls.php | 2 +- inc/modules/admin/what-list_yoomedia_tm.php | 2 +- inc/modules/admin/what-payments.php | 2 +- inc/stylesheet.php | 10 ++-- 22 files changed, 79 insertions(+), 65 deletions(-) diff --git a/inc/extensions.php b/inc/extensions.php index cfa4c928d4..d21e3b4d13 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -266,9 +266,16 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr // Remove cache file(s) if extension is active runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id)); + // Remove all SQL commands + UNSET_SQLS(); + // In normal mode return a true on success $ret = true; } elseif ($dry_run) { + // Init SQLs and transfer ext->generic + INIT_SQLS(); + SET_SQLS(GET_EXT_SQLS()); + // Rewrite SQL command to keep { and } inside for dry-run foreach (GET_SQLS() as $key => $sql) { $sql = str_replace('{', "{", str_replace('}', "}", $sql)); @@ -328,6 +335,9 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { // Set current SQL name EXT_SET_CURR_NAME($ext_name); + // Init EXT_UPDATE_DEPENDS + EXT_INIT_UPDATE_DEPENDS(); + // Init array INIT_EXT_SQLS(); @@ -338,6 +348,10 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]={EXT_GET_CURR_NAME()}"); LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, "", false); + // Init these SQLs + INIT_SQLS(); + SET_SQLS(GET_EXT_SQLS()); + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":SQLs::count=".COUNT_SQLS().""); if ((IS_SQLS_VALID() && (COUNT_SQLS() > 0))) { // Run SQL commands... @@ -492,9 +506,6 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run); if (EXT_GET_UPDATE_DEPENDS() != "") { - // Backup current SQL queries - $GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()] = GET_SQLS(); - // Is the extension there? if (GET_EXT_VERSION(EXT_GET_UPDATE_DEPENDS()) != "") { // Update another extension first! @@ -503,10 +514,6 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { // Register new extension $test = REGISTER_EXTENSION(EXT_GET_UPDATE_DEPENDS(), 0, $dry_run, false); } - - // Restore previous SQL queries - SET_SQLS($GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()]); - unset($GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()]); } // END - if // Add notes @@ -521,6 +528,10 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { unset($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]); } // END - if + // Init these SQLs + INIT_SQLS(); + SET_SQLS(GET_EXT_SQLS()); + // Run SQLs runFilterChain('run_sqls', array('dry_run' => $dry_run)); @@ -930,32 +941,32 @@ function EXT_ADD_CSS_FILE ($file) { // Setter for EXT_ALWAYS_ACTIVE flag function EXT_SET_ALWAYS_ACTIVE ($active) { - $GLOBALS['ext_always_active'] = (string) $active; + $GLOBALS['ext_always_active'][EXT_GET_CURR_NAME()] = (string) $active; } // Getter for EXT_ALWAYS_ACTIVE flag function EXT_GET_ALWAYS_ACTIVE () { - return $GLOBALS['ext_always_active']; + return $GLOBALS['ext_always_active'][EXT_GET_CURR_NAME()]; } // Setter for EXT_VERSION flag function EXT_SET_VERSION ($version) { - $GLOBALS['ext_version'] = (float) $version; + $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (float) $version; } // Getter for EXT_VERSION flag function EXT_GET_VERSION () { - return $GLOBALS['ext_version']; + return $GLOBALS['ext_version'][EXT_GET_CURR_NAME()]; } // Setter for EXT_DEPRECATED flag function EXT_SET_DEPRECATED ($deprecated) { - $GLOBALS['ext_deprecated'] = (string) $deprecated; + $GLOBALS['ext_deprecated'][EXT_GET_CURR_NAME()] = (string) $deprecated; } // Getter for EXT_DEPRECATED flag function EXT_GET_DEPRECATED () { - return $GLOBALS['ext_deprecated']; + return $GLOBALS['ext_deprecated'][EXT_GET_CURR_NAME()]; } // Setter for EXT_UPDATE_DEPENDS flag @@ -998,19 +1009,19 @@ function EXT_INIT_RUNNING_UPDATES () { // Getter for EXT_UPDATE_DEPENDS flag function EXT_GET_UPDATE_DEPENDS () { - print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; + //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; return $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]; } // Getter for next iterator depency function EXT_GET_ITERATOR_UPDATE_DEPENDS () { - print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; + //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; return ($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][EXT_GET_UPDATE_ITERATOR()]); } // Counter for extension update depencies function EXT_COUNT_UPDATE_DEPENDS () { - print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; + //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; return count($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]); } @@ -1031,7 +1042,7 @@ function EXT_REMOVE_UPDATE_DEPENDS ($ext_name) { // Init iterator for update depencies function EXT_INIT_UPDATE_ITERATOR () { - print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; + //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()] = 0; } @@ -1041,13 +1052,13 @@ function EXT_GET_UPDATE_ITERATOR () { if (!isset($GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()])) EXT_INIT_UPDATE_ITERATOR(); // Return it - print __FUNCTION__.":".EXT_GET_CURR_NAME()."/".$GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]."
\n"; + //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."/".$GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]."
\n"; return $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]; } // Increments the update iterator function EXT_INCREMENT_UPDATE_INTERATOR () { - print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; + //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."
\n"; $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]++; } @@ -1113,7 +1124,10 @@ function EXT_GET_CURR_NAME () { // Init SQLs array for current extension function INIT_EXT_SQLS () { - $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()] = array(); + // Auto-init the array now... + if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) { + $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()] = array(); + } // END - if } // Adds SQLs to the SQLs array but "assigns" it with current extension name diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php index 6f00d220d6..f1f1ee7001 100644 --- a/inc/fatal_errors.php +++ b/inc/fatal_errors.php @@ -48,7 +48,7 @@ if (getTotalFatalErrors() > 0) { // Set unset variable if (empty($check)) $check = ""; - if (isInstalling()) { + if ((isInstalling()) || (!isInstalled())) { // While we are installing ouput other header than while it is installed... :-) $OUT = ""; foreach (getFatalArray() as $key => $value) { diff --git a/inc/filters.php b/inc/filters.php index 8d96ef26da..6ec29093ff 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -245,7 +245,7 @@ function FILTER_FLUSH_FILTERS () { INIT_SQLS(); // Are we installing? - if (isInstalling()) { + if ((isInstalling()) || (!isInstalled())) { // Then silently skip this filter return true; } // END - if diff --git a/inc/functions.php b/inc/functions.php index 13b1be31a9..a54750c09c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2390,10 +2390,10 @@ function GET_CURR_THEME() { } // Add (maybe) found theme.php file to inclusion list - $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), SQL_ESCAPE($ret)); + $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($ret)); // Try to load the requested include file - if (FILE_READABLE($theme)) ADD_INC_TO_POOL($theme); + if (INCLUDE_READABLE($INC)) ADD_INC_TO_POOL($INC); // Return theme value return $ret; @@ -3563,7 +3563,7 @@ function shutdown () { if (SQL_IS_LINK_UP()) { // Close link SQL_CLOSE(__FILE__, __LINE__); - } elseif (!isInstalling()) { + } elseif ((!isInstalling()) && (isInstalled())) { // No database link addFatalMessage(__FILE__, __LINE__, getMessage('NO_DB_LINK_SHUTDOWN')); } diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 38764db505..42a9860dcb 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -322,9 +322,9 @@ if (!isAdminRegistered()) { // Special logout redirect for installation of given extension LOAD_TEMPLATE(sprintf("admin_logout_%s_install", $register)); - } elseif (REQUEST_ISSET_GET(('remove'))) { + } elseif (REQUEST_ISSET_GET('remove')) { // Secure input - $remove = REQUEST_GET(('remove')); + $remove = REQUEST_GET('remove'); // Special logout redirect for removal of given extension LOAD_TEMPLATE(sprintf("admin_logout_%s_remove", $remove)); diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index c85b8448b5..2ba1e8bab2 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -61,14 +61,14 @@ if (REQUEST_ISSET_GET('admin')) { if ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) { // Edit account(s) ADMINS_EDIT_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY()); -} elseif ((REQUEST_ISSET_POST(('change'))) && (count(REQUEST_POST('login')) > 0)) { +} elseif ((REQUEST_ISSET_POST('change')) && (count(REQUEST_POST('login')) > 0)) { // Change admin accounts ADMINS_CHANGE_ADMIN_ACCOUNT(REQUEST_POST_ARRAY()); } elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) { // Show admin accounts for deletetion ADMINS_DELETE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY()); } else { - if ((REQUEST_ISSET_POST(('remove'))) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) { + if ((REQUEST_ISSET_POST('remove')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) { // Remove accounts now ADMINS_REMOVE_ADMIN_ACCOUNTS(REQUEST_POST_ARRAY()); } diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 0ec8adefb1..37baf61f81 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -117,7 +117,7 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Shall I change entries? - if (REQUEST_ISSET_POST(('change'))) { + if (REQUEST_ISSET_POST('change')) { // Init SQLs INIT_SQLS(); diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 234ec2fced..eb0ab14470 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -81,7 +81,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) { // Load main template LOAD_TEMPLATE("admin_config_admins_edit"); -} elseif ((REQUEST_ISSET_POST(('change'))) && ($SEL > 0)) { +} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0)) { // Change entries foreach (REQUEST_POST('sel') as $id => $selected) { // Secure ID @@ -146,7 +146,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) { // Load main template LOAD_TEMPLATE("admin_config_admins_del"); -} elseif ((REQUEST_ISSET_POST(('remove'))) && ($SEL > 0)) { +} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0)) { // Remove entries foreach (REQUEST_POST('sel') as $id => $selected) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE id=%s LIMIT 1", diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 22e01de1c3..dfe8417c2f 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -67,7 +67,7 @@ if (REQUEST_ISSET_POST(('add_max'))) { // Display message LOAD_TEMPLATE("admin_settings_saved", false, $content); -} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('do')))) { +} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('do'))) { // Change or delete entries... $TEXT = ""; foreach (REQUEST_POST('id') as $id => $value) { diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index f049d932af..8d6846e117 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -86,9 +86,9 @@ if (REQUEST_ISSET_POST('edit')) { // Remove maybe confusing data REQUEST_UNSET_POST('edit'); - REQUEST_UNSET_POST(('change')); + REQUEST_UNSET_POST('change'); } -} elseif (REQUEST_ISSET_POST(('change'))) { +} elseif (REQUEST_ISSET_POST('change')) { // Init SQLs INIT_SQLS(); diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index b12fd674b4..a29c1790a9 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -60,7 +60,7 @@ if (REQUEST_ISSET_GET(('sub'))) { break; case "ref": - if (REQUEST_ISSET_GET(('do'))) { + if (REQUEST_ISSET_GET('do')) { if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == "add")) { REQUEST_UNSET_POST('ok'); } diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 98960fe251..95031a59ed 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -72,7 +72,7 @@ VALUES ('%s','%s','%s','%s')", LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_ALREADY_FOUND')); } } - } elseif (REQUEST_ISSET_POST(('remove'))) { + } elseif (REQUEST_ISSET_POST('remove')) { // Check if at last one line is selected $SEL = SELECTION_COUNT(REQUEST_POST('sel')); if ($SEL > 0) { @@ -87,7 +87,7 @@ VALUES ('%s','%s','%s','%s')", } else { LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_NOT_DELETED')); } - } elseif (REQUEST_ISSET_POST(('change'))) { + } elseif (REQUEST_ISSET_POST('change')) { // Change entries foreach (REQUEST_POST('level') as $id => $level) { // Secure ID diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index cd8f8f518e..43aea000f5 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -54,7 +54,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) { // We are about to register a new extension $do = "register"; $ext_id = bigintval(REQUEST_GET('reg_ext')); // The ID comes from task management and it is - of course - *not* the extension's name! -} elseif ((REQUEST_ISSET_POST(('change'))) && ($SEL > 0) && (!IS_DEMO())) { +} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0) && (!IS_DEMO())) { // De-/activate extensions foreach (REQUEST_POST('sel') as $ext_id => $active) { // Shall we keep the extension always active? @@ -158,7 +158,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) { LOAD_TEMPLATE("admin_extensions_edit"); $do = "edit"; } -} elseif ((REQUEST_ISSET_POST(('delete'))) && ($SEL > 0) && (!IS_DEMO())) { +} elseif ((REQUEST_ISSET_POST('delete')) && ($SEL > 0) && (!IS_DEMO())) { // List extensions and when verbose is enabled SQL statements which will be executed $OUT = ""; $SW = 2; foreach (REQUEST_POST('sel') as $ext_id => $sel) { @@ -198,7 +198,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) { // Load template LOAD_TEMPLATE("admin_extensions_delete"); $do = "delete"; -} elseif ((REQUEST_ISSET_POST(('remove'))) && ($SEL > 0) && (!IS_DEMO())) { +} elseif ((REQUEST_ISSET_POST('remove')) && ($SEL > 0) && (!IS_DEMO())) { // Remove extensions from DB (you have to delete all files manually!) $cache_update = 0; foreach (REQUEST_POST('sel') as $ext_id => $active) { @@ -214,10 +214,10 @@ if (REQUEST_ISSET_GET(('reg_ext'))) { EXTENSION_RUN_SQLS($ext_id, "remove"); } // END - if } // END - foreach -} elseif (REQUEST_ISSET_GET(('do')) && (!IS_DEMO())) { +} elseif ((REQUEST_ISSET_GET('do')) && (!IS_DEMO())) { // Other things to do $do = SQL_ESCAPE(strip_tags(REQUEST_GET('do'))); -} elseif (REQUEST_ISSET_GET(('do'))) { +} elseif (REQUEST_ISSET_GET('do')) { // Demo mode active! $do = "demo"; } diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 06bc8e11d3..c2f6fa63fb 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -49,7 +49,7 @@ ADD_DESCR("admin", __FILE__); $show = true; if ((REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) { // Okay, which button was pressed? - if (REQUEST_ISSET_POST(('change'))) { + if (REQUEST_ISSET_POST('change')) { // Change permissions ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "bank_packages", "package_active"); } elseif (REQUEST_ISSET_POST('edit')) { @@ -65,11 +65,11 @@ if ((REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id'))) && (count(REQ } elseif (REQUEST_ISSET_POST(('do_edit'))) { // Delete entries (with confirmation) ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true); - } elseif (REQUEST_ISSET_POST(('delete'))) { + } elseif (REQUEST_ISSET_POST('delete')) { // Delete entries (with confirmation) ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA"), array("", "", "", "")); $show = false; - } elseif (REQUEST_ISSET_POST(('remove'))) { + } elseif (REQUEST_ISSET_POST('remove')) { // Delete entries (with confirmation) ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true); } diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 78ae63ad08..2bcf66f4fa 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -71,7 +71,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ // Display message LOAD_TEMPLATE("admin_settings_saved", false, $MSG); -} elseif ((REQUEST_ISSET_POST(('change'))) && (REQUEST_ISSET_POST(('id')))) { +} elseif ((REQUEST_ISSET_POST('change')) && (REQUEST_ISSET_POST(('id')))) { // Change all status ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "countries", "is_active"); @@ -80,7 +80,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ 'url' => "modules.php?module=admin&what=list_country", 'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK') )); -} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST(('delete')))) && (REQUEST_ISSET_POST(('id')))) { +} elseif (((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('delete'))) && (REQUEST_ISSET_POST(('id')))) { if (count(REQUEST_POST('id')) > 0) { if (REQUEST_ISSET_POST('edit')) { // Edit template @@ -153,7 +153,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ // Create message $MSG = getMessage('ADMIN_COUNTRIES_MODIFIED'); - } elseif ((REQUEST_ISSET_POST(('remove'))) && (REQUEST_ISSET_POST(('id')))) { + } elseif ((REQUEST_ISSET_POST('remove')) && (REQUEST_ISSET_POST(('id')))) { // Remove $IDs = implode(",", array_keys(REQUEST_POST('id'))); ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_countries` WHERE id IN (".$IDs.") LIMIT ".count(REQUEST_POST('id')).""); diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 063ff4c193..cb84d41082 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -206,7 +206,7 @@ if (REQUEST_ISSET_GET(('pid'))) { LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID')); } } else { - if (!REQUEST_ISSET_GET(('do'))) REQUEST_SET_GET('do', ""); + if (!REQUEST_ISSET_GET('do')) REQUEST_SET_GET('do', ""); if (REQUEST_GET('do') == "delete") { // Delete all requests diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 217a444e1a..48852fddfe 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -93,7 +93,7 @@ if (REQUEST_ISSET_GET(('rallye'))) { // Run SQL command runFilterChain('run_sqls'); -} elseif (REQUEST_ISSET_POST(('remove'))) { +} elseif (REQUEST_ISSET_POST('remove')) { // Delete rallyes $SEL = SELECTION_COUNT(REQUEST_POST('sel')); if ($SEL > 0) { @@ -120,7 +120,7 @@ if (REQUEST_ISSET_GET(('rallye'))) { // No rallye selected to delete! $MSG = getMessage('RALLYE_DELETE_NOTHING_SELECTED'); } -} elseif (REQUEST_ISSET_POST(('change'))) { +} elseif (REQUEST_ISSET_POST('change')) { // Change rallye $SEL = SELECTION_COUNT(REQUEST_POST('title')); if ($SEL > 0) { diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 15afc78716..2e9fe8192a 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -57,15 +57,15 @@ if (REQUEST_ISSET_POST(('add'))) { if ((REQUEST_POST('pay_min_count') == 0) || (!REQUEST_ISSET_POST(('pay_min_count')))) REQUEST_UNSET_POST(('add')); if (!REQUEST_ISSET_POST(('pay_currency'))) REQUEST_UNSET_POST(('add')); -} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST(('change'))) || (REQUEST_ISSET_POST(('remove')))) { +} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST('change')) || (REQUEST_ISSET_POST('remove'))) { // Check if at least one entry was selected if (!REQUEST_ISSET_POST(('id'))) { // Nothing selected for editing / deleting??? REQUEST_UNSET_POST('edit'); REQUEST_UNSET_POST('del'); - REQUEST_UNSET_POST(('change')); - REQUEST_UNSET_POST(('remove')); - } elseif (REQUEST_ISSET_POST(('change'))) { + REQUEST_UNSET_POST('change'); + REQUEST_UNSET_POST('remove'); + } elseif (REQUEST_ISSET_POST('change')) { // Change entries here... foreach (REQUEST_POST('id') as $id => $sel) { // Secure ID @@ -85,7 +85,7 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE id // Generate message $MSG = getMessage('SPONSOR_PAY_ENTRIES_CHANGED'); - } elseif (REQUEST_ISSET_POST(('remove'))) { + } elseif (REQUEST_ISSET_POST('remove')) { // Remove entries here... foreach (REQUEST_POST('id') as $id => $sel) { // Remove entry diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 167b9c8f20..a8b9dba6cb 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -78,7 +78,7 @@ if (REQUEST_ISSET_POST('edit')) { array(), true ); -} elseif (REQUEST_ISSET_POST(('delete'))) { +} elseif (REQUEST_ISSET_POST('delete')) { // Show entries for deletion ADMIN_DELETE_ENTRIES_CONFIRM( REQUEST_POST('id'), diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index 649fc8dcfb..ec846b2e31 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -58,7 +58,7 @@ if (IS_FORM_SENT()) { } elseif (REQUEST_ISSET_POST(('sent'))) { // Sent mail YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), "normal"); -} elseif (REQUEST_ISSET_POST(('remove'))) { +} elseif (REQUEST_ISSET_POST('remove')) { // Add mail to exclude list YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), "normal"); } elseif (REQUEST_ISSET_POST(('unlist'))) { diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index 8243393bbd..f3f6eb7559 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR("admin", __FILE__); -if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET(('do'))) && (REQUEST_GET('do') == "add")) { +if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET('do')) && (REQUEST_GET('do') == "add")) { REQUEST_UNSET_POST('ok'); } diff --git a/inc/stylesheet.php b/inc/stylesheet.php index e981667175..4e58c9ad15 100644 --- a/inc/stylesheet.php +++ b/inc/stylesheet.php @@ -80,12 +80,12 @@ if (($GLOBALS['output_mode'] == "1") || (getConfig('css_php') == "DIRECT")) { } else { // Now we load all CSS files from css.php! OUTPUT_HTML(""); } -- 2.30.2