From 9b87babf90b27658be4a1cef2c0465e2ce9ed681 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 1 Mar 2009 04:11:56 +0000 Subject: [PATCH] More fixes for what/action deprecation in modules.php --- inc/config.php | 12 ++++++------ inc/functions.php | 10 +++++----- inc/mysql-manager.php | 13 +++++++++++-- modules.php | 4 ++-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/inc/config.php b/inc/config.php index 963738bfcb..4cfa57bbbf 100644 --- a/inc/config.php +++ b/inc/config.php @@ -99,10 +99,10 @@ define('PATH', $PATH); define('WEBMASTER', "you@some-hoster.tld.invalid"); // CFG: INSTALLED -define('mxchange_installed', true); +define('mxchange_installed', false); // CFG: ADMIN-SETUP -define('admin_registered', true); +define('admin_registered', false); // CFG: FRAMESET define('frameset_active', false); @@ -130,11 +130,11 @@ $MySQL = array( // CFG: MYSQL-HOST 'host' => "localhost", // CFG: MYSQL-DBASE - 'dbase' => "mxchange", + 'dbase' => "db", // CFG: MYSQL-LOGIN - 'login' => "root", + 'login' => "user", // CFG: MYSQL-PASSWORD - 'password' => "ab57dk90", + 'password' => "pass", ); // CFG: MYSQL-PREIFX @@ -151,7 +151,7 @@ define('LEAD_EXPIRY_TIME' , (30*24*60*60)); // == 30 days // CFG: SMTP-HOSTNAME define('SMTP_HOSTNAME', ""); // CFG: SMTP-USER -define('SMTP_USER', ""); +define('SMTP_USER' , ""); // CFG: SMTP-PASSWORD define('SMTP_PASSWORD', ""); diff --git a/inc/functions.php b/inc/functions.php index 8bfa1eaac3..e779bae692 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1221,12 +1221,12 @@ function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") { } // -function TRANSLATE_YESNO($yn) { +function TRANSLATE_YESNO ($yn) { // Default - $yn = "??? (".$yn.")"; + $translated = "??? (".$yn.")"; switch ($yn) { - case "Y": $yn = getMessage('YES'); break; - case "N": $yn = getMessage('NO'); break; + case "Y": $translated = getMessage('YES'); break; + case "N": $translated = getMessage('NO'); break; default: // Log unknown value DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected Y/N!", $yn)); @@ -1234,7 +1234,7 @@ function TRANSLATE_YESNO($yn) { } // Return it - return $yn; + return $translated; } // diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 2b93a5cbf0..1c0185e520 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -883,7 +883,10 @@ function GET_ACTION ($MODE, &$wht) { if ($MODE == "admin") { // Action value for admin area - if (!empty($GLOBALS['action'])) { + if (REQUEST_ISSET_GET('action')) { + // Use from request! + return REQUEST_GET('action'); + } elseif (!empty($GLOBALS['action'])) { // Get it directly from URL return $GLOBALS['action']; } elseif (($wht == "overview") || (empty($GLOBALS['what']))) { @@ -1660,7 +1663,13 @@ function LOAD_CONFIG ($no="0") { return $CFG_DUMMY; } // Gets the matching what name from module -function GET_WHAT($modCheck) { +function GET_WHAT ($modCheck) { + // Is the request element set? + if (REQUEST_ISSET_GET('what')) { + // Then return this! + return REQUEST_GET('what'); + } // END - if + $wht = ""; //* DEBUG: */ echo __LINE__."!".$modCheck."!
\n"; switch ($modCheck) diff --git a/modules.php b/modules.php index 323b0d9189..9cdeacb18a 100644 --- a/modules.php +++ b/modules.php @@ -64,11 +64,11 @@ if (IS_MEMBER()) { // Additionally admin? if (IS_ADMIN()) { // Add it - $username .= " ({!_ADMIN_SHORT!})"; + $username .= " ({--_ADMIN_SHORT--})"; } // END - if } else { // Hmmm, logged in and no valid userid? - $username = "{!_UNKNOWN!}"; + $username = "{--_UNKNOWN--}"; // Destroy session destroy_user_session(); -- 2.39.5