From: Roland Häder Date: Mon, 27 Jul 2009 20:18:23 +0000 (+0000) Subject: Code cleanup: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2ec9007220186d54f84846871ed1f7638c29baf7;p=mailer.git Code cleanup: - Initialization of 'action' and 'what' is no longer needed in all root scripts - Some more double-quotes converted to single-quotes - Minor cleanups --- diff --git a/admin.php b/admin.php index 8de27a1209..410750546d 100644 --- a/admin.php +++ b/admin.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'admin'; $GLOBALS['output_mode'] = -1; diff --git a/agb.php b/agb.php index 8d5e13d97c..19947b5efa 100644 --- a/agb.php +++ b/agb.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'agb'; $GLOBALS['output_mode'] = -1; diff --git a/beg.php b/beg.php index 3de49a3a9b..cdfbfc70be 100644 --- a/beg.php +++ b/beg.php @@ -39,10 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init start time $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; // Set module $GLOBALS['module'] = 'beg'; diff --git a/birthday_confirm.php b/birthday_confirm.php index 003c93fbd1..d1284aec6b 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -39,9 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; +// Init start time +$GLOBALS['startTime'] = microtime(true); // Set module $GLOBALS['module'] = 'birthday_confirm'; diff --git a/click.php b/click.php index ac9d1b6199..6a17401d26 100644 --- a/click.php +++ b/click.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'click'; $GLOBALS['output_mode'] = -1; diff --git a/confirm.php b/confirm.php index c53046e347..41ca856c24 100644 --- a/confirm.php +++ b/confirm.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module to confirm $GLOBALS['module'] = 'confirm'; $GLOBALS['output_mode'] = -1; diff --git a/css.php b/css.php index 45ad87d954..4a9c8ed36f 100644 --- a/css.php +++ b/css.php @@ -42,10 +42,6 @@ require('inc/libs/security_functions.php'); // Footer is disabled in CSS mode $GLOBALS['footer_sent'] = '-1'; -// Init variables -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // This is a CSS file loader! $GLOBALS['output_mode'] = '1'; $GLOBALS['module'] = 'css'; diff --git a/debug.php b/debug.php index ef780e4740..8dfc9d42c3 100644 --- a/debug.php +++ b/debug.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module and fake "CSS mode" $GLOBALS['module'] = 'debug'; $GLOBALS['output_mode'] = -1; diff --git a/doubler.php b/doubler.php index bb9201f179..a521ad4709 100644 --- a/doubler.php +++ b/doubler.php @@ -39,10 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init start time $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; // Set module $GLOBALS['module'] = 'doubler'; diff --git a/img.php b/img.php index 444b1b96f5..adaa3e271e 100644 --- a/img.php +++ b/img.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'img'; $GLOBALS['output_mode'] = -1; diff --git a/inc/filters.php b/inc/filters.php index 83438eab3e..6d92d6a654 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -330,7 +330,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) { // Handle failed logins here if not in guest //* DEBUG: */ print __FUNCTION__."(".__LINE__."):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}
\n"; - if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) { + if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) { // Handle failure $content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']); } // END - if @@ -475,7 +475,7 @@ function FILTER_UPDATE_LOGIN_DATA () { $GLOBALS['last']['module'] = $mod; $GLOBALS['last']['online'] = $onl; } // END - if - // "what" not set? + // 'what' not set? if (empty($GLOBALS['what'])) { // Fix it to default $GLOBALS['what'] = "welcome"; diff --git a/inc/functions.php b/inc/functions.php index 2900e464e0..9589c5e15c 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -929,11 +929,11 @@ function redirectToUrl ($URL) { clearOutputBuffer(); } // END - if - // Secure the URL against bad things such als HTML insertions and so on... - $URL = htmlentities(strip_tags($URL), ENT_QUOTES); - // Simple probe for bots/spiders from search engines if ((strpos(detectUserAgent(), 'spider') !== false) || (strpos(detectUserAgent(), 'bot') !== false)) { + // Secure the URL against bad things such als HTML insertions and so on... + $URL = htmlentities(strip_tags($URL), ENT_QUOTES); + // Output new location link as anchor OUTPUT_HTML('' . $URL . ''); } elseif (!headers_sent()) { diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index b78e6ba253..9a9eab41e0 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -518,7 +518,7 @@ function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $non // Create a menu selection box for given menu system function ADMIN_MENU_SELECTION ($mode, $default = '', $defid = '') { $wht = "`what` != ''"; - if ($mode == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'"; + if ($mode == 'action') $wht = "(`what`='' OR `what` IS NULL) AND action !='login'"; $result = SQL_QUERY_ESC("SELECT %s, title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY `sort`", array($mode), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 34a57b82f0..d99ec7e678 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -157,8 +157,8 @@ if (!isFormSent()) $OUT .= ""; define('__BELOW_SELECTION' , $OUT); - define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('admin', "what", "name")); - define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('admin', "action", "menu")); + define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('admin', 'what', "name")); + define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('admin', 'action', "menu")); // Display form LOAD_TEMPLATE("admin_admin_add"); diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index f5743113d5..6db7d69647 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -47,11 +47,10 @@ ADD_DESCR('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (REQUEST_ISSET_GET('sub')) -{ +if (REQUEST_ISSET_GET('sub')) { $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub')); $SUB = REQUEST_GET('sub'); -} +} // END - if // Get count of (maybe) selected menu points $chk = 0; @@ -60,67 +59,59 @@ if (REQUEST_ISSET_POST('sel')) $chk = countPostSelection(); // List all menu points and make them editable if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { // Edit menu entries + // @TODO Kill all constants in this file define('__SUB_VALUE', $SUB); define('__CHK_VALUE', $chk); $cnt = 0; $SW = 2; - foreach (REQUEST_POST('sel') as $sel => $confirm) - { - if ($confirm == 1) - { + foreach (REQUEST_POST('sel') as $sel => $confirm) { + if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Entry found so we load the stuff... list($menu, $act, $wht, $descr) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Prepare data for the row template $content = array( - 'action' => ADMIN_MAKE_MENU_SELECTION('admin', "action", "sel_action[".$sel."]", $act), - 'what' => ADMIN_MAKE_MENU_SELECTION('admin', "what", "sel_what[".$sel."]", $wht), + 'action' => ADMIN_MAKE_MENU_SELECTION('admin', 'action', 'sel_action[' . $sel . ']', $act), + 'what' => ADMIN_MAKE_MENU_SELECTION('admin', 'what', 'sel_what[' . $sel . ']', $wht), 'sw' => $SW, 'sel' => $sel, 'menu' => $menu, 'descr' => $descr, 'cnt' => $cnt, ); - $OUT .= LOAD_TEMPLATE("admin_amenu_edit_row", true, $content); - } - else - { + $OUT .= LOAD_TEMPLATE('admin_amenu_edit_row', true, $content); + } else { // Entry not found? $content = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE("admin_menu_404_row", true, $content); + $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); } $SW = 3 - $SW; - } - } + } // END - if + } // END - foreach + define('__MENU_ROWS', $OUT); define('__CNT_VALUE', $cnt); // Load template - LOAD_TEMPLATE("admin_amenu_edit_form"); -} -elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) -{ + LOAD_TEMPLATE('admin_amenu_edit_form'); +} elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) { define('__SUB_VALUE', $SUB); define('__CHK_VALUE', $chk); // Del menu entries with or without confirmation $SW = 2; $cnt = 0; $OUT = ''; - foreach (REQUEST_POST('sel') as $sel => $confirm) - { - if ($confirm == 1) - { + foreach (REQUEST_POST('sel') as $sel => $confirm) { + if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Entry found so we load the stuff... list($menu) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -132,16 +123,14 @@ elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) 'sel' => $sel, 'sw' => $SW ); - $OUT .= LOAD_TEMPLATE("admin_amenu_delete_row", true, $content); - } - else - { + $OUT .= LOAD_TEMPLATE('admin_amenu_delete_row', true, $content); + } else { // Entry not found? $content = array( 'sw' => $SW, 'sel' => $sel ); - $OUT .= LOAD_TEMPLATE("admin_menu_404_row", true, $content); + $OUT .= LOAD_TEMPLATE('admin_menu_404_row', true, $content); } $SW = 3 - $SW; } @@ -150,11 +139,10 @@ elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) define('__CNT_VALUE', $cnt); // Load template - LOAD_TEMPLATE("admin_amenu_delete"); + LOAD_TEMPLATE('admin_amenu_delete'); } elseif ((isFormSent()) && (!IS_DEMO())) { // An action is done... - switch (REQUEST_POST('ok')) - { + switch (REQUEST_POST('ok')) { case 'edit': // Edit menu foreach (REQUEST_POST('sel') as $sel => $menu) { // Secure ID diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index a9ceac643f..871cd7039d 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -160,8 +160,8 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`", $OUT .= ""; define('__BELOW_SELECTION' , $OUT); - define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('guest', "what", "name")); - define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('guest', "action", "menu")); + define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('guest', 'what', "name")); + define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('guest', 'action', "menu")); // Display form LOAD_TEMPLATE("admin_guest_add"); diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index f36e508510..96ec6ce285 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -80,8 +80,8 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) $DATA = array( 'cnt' => $cnt, 'sel' => $sel, - 'action' => ADMIN_MAKE_MENU_SELECTION('guest', "action", "sel_action[".$sel."]", $act), - 'what' => ADMIN_MAKE_MENU_SELECTION('guest', "what", "sel_what[".$sel."]", $wht), + 'action' => ADMIN_MAKE_MENU_SELECTION('guest', 'action', 'sel_action[' . $sel . ']', $act), + 'what' => ADMIN_MAKE_MENU_SELECTION('guest', 'what', 'sel_what[' . $sel . ']', $wht), 'menu' => $menu, 'sw' => $SW, ); diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 5004189a9e..da8684ad91 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -158,8 +158,8 @@ if (!isFormSent()) { $OUT .= ""; define('__BELOW_SELECTION' , $OUT); - define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('member', "what", "name")); - define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('member', "action", "menu")); + define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('member', 'what', "name")); + define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('member', 'action', "menu")); // Display form LOAD_TEMPLATE("admin_member_add"); diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index a9d1e0dae4..40173a3b41 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -78,7 +78,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { 'menu' => $menu, 'sw' => $SW, 'act' => ADMIN_MAKE_MENU_SELECTION('member', "act", "sel_act[".$sel."]", $act), - 'what' => ADMIN_MAKE_MENU_SELECTION('member', "what", "sel_what[".$sel."]", $wht), + 'what' => ADMIN_MAKE_MENU_SELECTION('member', 'what', 'sel_what[' . $sel . ']', $wht), ); // Load template $OUT .= LOAD_TEMPLATE("admin_mmenu_edit_row", true, $content); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 2d5d26fa9a..9fc243f214 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -85,7 +85,7 @@ function getModuleTitle ($mod) { // "Getter" for module description function getModuleDescription ($mode, $wht, $column = 'what') { - // Fix empty "what" + // Fix empty 'what' if (empty($wht)) { $wht = "welcome"; if (getConfig('index_home') != '') $wht = getConfig('index_home'); @@ -268,7 +268,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) { // First we have to do some analysis... if (substr($file, 0, 7) == "action-") { // This is an action file! - $type = "action"; + $type = 'action'; $search = substr($file, 7); switch ($ACC_LVL) { case 'admin': @@ -284,7 +284,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) { $AND = " AND (`what`='' OR `what` IS NULL)"; } elseif (substr($file, 0, 5) == "what-") { // This is an admin what file! - $type = "what"; + $type = 'what'; $search = substr($file, 5); $AND = ''; switch ($ACC_LVL) { @@ -304,7 +304,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) { $AND .= " AND `action`='".getModeAction($ACC_LVL, $dummy)."'"; } elseif (($ACC_LVL == 'sponsor') || ($ACC_LVL == "engine")) { // Sponsor / engine menu - $type = "what"; + $type = 'what'; $search = $file; $modCheck = $GLOBALS['module']; $AND = ''; @@ -352,7 +352,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) { // Can we close the you-are-here navigation? //* DEBUG: */ echo __LINE__."*".$type.'/'.$GLOBALS['what']."*
\n"; - if (($type == "what") || (($type == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview")))) { + if (($type == 'what') || (($type == 'action') && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview")))) { //* DEBUG: */ echo __LINE__.'+'.$type."+
\n"; // Add closing div and br-tag $OUT .= "
\n"; diff --git a/index.php b/index.php index 4079b95efe..e13c8536ac 100644 --- a/index.php +++ b/index.php @@ -40,9 +40,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; +// Init start time +$GLOBALS['startTime'] = microtime(true); // Set module $GLOBALS['module'] = 'index'; diff --git a/install.php b/install.php index 75638936e4..9e28d9c2aa 100644 --- a/install.php +++ b/install.php @@ -49,13 +49,12 @@ // Load security system require('inc/libs/security_functions.php'); +// Init start time +$GLOBALS['startTime'] = microtime(true); + // Tell every module / include file we are installing $GLOBALS['mxchange_installing'] = true; -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set CSS variable for "normal mode" $GLOBALS['output_mode'] = 0; diff --git a/js.php b/js.php index b666aac864..2868eb1291 100644 --- a/js.php +++ b/js.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // This is a fake-CSS file loader, more a JavaScript loader... // This is in one way good and in one not. The whole reset part will be // by-passed even in this "faked" CSS mode. The bad news is that this makes all diff --git a/lead-confirm.php b/lead-confirm.php index 38b94017ab..fc693eea44 100644 --- a/lead-confirm.php +++ b/lead-confirm.php @@ -39,10 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init start time $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; // Set module $GLOBALS['module'] = 'lead-confirm'; diff --git a/login.php b/login.php index 9a63243365..89cf5207b0 100644 --- a/login.php +++ b/login.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'login'; diff --git a/mailid.php b/mailid.php index 6321d30a30..58b41d6b75 100644 --- a/mailid.php +++ b/mailid.php @@ -39,9 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; +// Init start time +$GLOBALS['startTime'] = microtime(true); // Tell everyone we are in this module $GLOBALS['module'] = 'mailid'; diff --git a/mailid_top.php b/mailid_top.php index b757543e89..e7eccc98c6 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -39,9 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; +// Init start time +$GLOBALS['startTime'] = microtime(true); // Tell everyone we are in this module $GLOBALS['module'] = 'mailid'; diff --git a/modules.php b/modules.php index 71a861f0cd..d77af8437d 100644 --- a/modules.php +++ b/modules.php @@ -42,11 +42,11 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init start time $GLOBALS['startTime'] = microtime(true); + +// Init output mode and module $GLOBALS['output_mode'] = 0; -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; $GLOBALS['module'] = ''; // Needed include files diff --git a/ref.php b/ref.php index 527d4e9ffc..4a2129716d 100644 --- a/ref.php +++ b/ref.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'ref'; $GLOBALS['output_mode'] = -1; diff --git a/show_bonus.php b/show_bonus.php index 5daf345ce8..130f7147c3 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -39,10 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init start time $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; // Set this because we have no module in URI $GLOBALS['module'] = 'show_bonus'; diff --git a/sponsor_confirm.php b/sponsor_confirm.php index 6fc90cdcff..69d458077d 100644 --- a/sponsor_confirm.php +++ b/sponsor_confirm.php @@ -38,10 +38,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'sponsor_confirm'; diff --git a/sponsor_ref.php b/sponsor_ref.php index 9c1920254f..2a46697143 100644 --- a/sponsor_ref.php +++ b/sponsor_ref.php @@ -38,10 +38,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'sponsor_ref'; diff --git a/surfbar.php b/surfbar.php index d119e1bd83..f6092ad36a 100644 --- a/surfbar.php +++ b/surfbar.php @@ -39,11 +39,9 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init surfbar cache and start time $GLOBALS['cache_array']['surfbar'] = array(); $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; // Set module $GLOBALS['module'] = 'surfbar'; diff --git a/view.php b/view.php index 536b8257ac..90441e0055 100644 --- a/view.php +++ b/view.php @@ -39,10 +39,6 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; - // Set module $GLOBALS['module'] = 'view'; $GLOBALS['output_mode'] = -1;