]> git.mxchange.org Git - mailer.git/commitdiff
Fixed endless loop, if no sql_patches is installed and modules.php?module=index was...
authorquix0r <quix0r@mxchange.org>
Mon, 22 Dec 2008 13:32:44 +0000 (13:32 +0000)
committerquix0r <quix0r@mxchange.org>
Mon, 22 Dec 2008 13:32:44 +0000 (13:32 +0000)
inc/databases.php
inc/functions.php
inc/language/de.php
inc/language/en.ph
inc/modules/admin/action-logout.php
inc/modules/index.php
inc/mysql-manager.php

index e020097b9dec5f76aa49667c26a6c0bf116f2455..59153f0a29f710cd97d6deb17547d1d7c37d7269 100644 (file)
@@ -115,7 +115,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // Current SVN revision
-define('CURR_SVN_REVISION', "695");
+define('CURR_SVN_REVISION', "696");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 0ef88afef5cd572dfc706ba36227a7b22d9b362f..e255045bb0f459f463401a1a8cc05877383636b2 100644 (file)
@@ -940,7 +940,7 @@ function LOAD_URL($URL, $addUrlData=true) {
        if (((!defined('__COOKIES')) || (!__COOKIES)) && ($addUrlData)) $URL = ADD_URL_DATA($URL);
 
        // Probe for bot from search engine
-       if ((eregi("spider", GET_USER_AGENT())) || (eregi("bot", GET_USER_AGENT())) || (eregi("spider", GET_USER_AGENT()))) {
+       if ((eregi("spider", GET_USER_AGENT())) || (eregi("bot", GET_USER_AGENT()))) {
                // Search engine bot detected so let's rewrite many chars for the link
                $URL = htmlentities(strip_tags($URL), ENT_QUOTES);
 
index b6284cfd5c9f1e949ae049476eef30acf02cf53c..1ed76cb73a044086c01fa96e7831b2574e51a8fe 100644 (file)
@@ -900,7 +900,7 @@ define('ADMIN_VERBOSE_SQL', "SQL-Anweisungen beim Registrieren/Updates/Entfernen
 define('ADMIN_REMOVING_THESE_EXTENSIONS', "Diese Erweiterungen werden deinstalliert");
 define('ADMIN_REMOVE_EXTENSIONS', "Erweiterungen jetzt entfernen");
 define('ADMIN_SQLS_EXECUTED_ON_REMOVAL', "Beim Entfernen ausgef&uuml;hrte SQL-Anweisungen");
-define('ADMIN_NO_ADDIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausf&uuml;hren!");
+define('ADMIN_NO_ADDITIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausf&uuml;hren!");
 define('ADMIN_SQLS_EXECUTED_ON_UPDATE', "Beim Aktualisieren ausgef&uuml;hrte SQL-Anweisungen");
 define('ADMIN_SQLS_EXECUTED_ON_REGISTER', "Beim Registrieren ausgef&uuml;hrte SQL-Anweisungen");
 define('ADMIN_UNKNOWN_FIELD_TYPE_1', "Unbekannter Datentyp <strong>");
index 0ccb9e1fbe5a9b572df7504164ed9b90b0936522..fecebe180353e7109f8b2fc494ee130b68c754fc 100644 (file)
@@ -591,7 +591,7 @@ define('ADMIN_VERBOSE_SQL', "SQL-Anweisungen beim Registrieren/Updates/Entfernen
 define('ADMIN_REMOVING_THESE_EXTENSIONS', "Diese Erweiterungen werden deinstalliert");
 define('ADMIN_REMOVE_EXTENSIONS', "Erweiterungen jetzt entfernen");
 define('ADMIN_SQLS_EXECUTED_ON_REMOVAL', "Beim Entfernen ausgef&uuml;hrte SQL-Anweisungen");
-define('ADMIN_NO_ADDIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausf&uuml;hren!");
+define('ADMIN_NO_ADDITIONAL_SQLS', "Keine weiteren SQL-Anweisungen zum Ausf&uuml;hren!");
 define('ADMIN_SQLS_EXECUTED_ON_UPDATE', "Beim Aktualisieren ausgef&uuml;hrte SQL-Anweisungen");
 define('ADMIN_SQLS_EXECUTED_ON_REGISTER', "Beim Registrieren ausgef&uuml;hrte SQL-Anweisungen");
 define('ADMIN_UNKNOWN_FIELD_TYPE_1', "Unbekannter Datentyp <STRONG>");
index 5dbcecf292eaa9579adbe6ac4a1a18c2c608069e..82b4aeacda42f508ce2eb1889759268c14429198 100644 (file)
@@ -42,7 +42,7 @@ ADD_DESCR("admin", __FILE__);
 
 if (!empty($_POST['no'])) {
        // Do not logout now
-       LOAD_URL("modules.php?module=admin");
+       LOAD_URL("admin.php");
 } elseif ((!empty($_POST['yes'])) && ($GLOBALS['action'] == "logout")) {
        // Redirect to logout link
        LOAD_URL("modules.php?module=admin&amp;logout=1");
index 6180e3e9416df571a71fffe6e163713f1bb3fc0b..eae4c4c11163cc8cc192fab8d2152fca5df3d4aa 100644 (file)
@@ -35,9 +35,9 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
-} elseif ((!EXT_IS_ACTIVE("sql_patches", true)) && (!IS_ADMIN())) {
+} elseif (!EXT_IS_ACTIVE("sql_patches")) {
        // The extension "sql_patches" *MUST* be activated or you have lot's of problems!
-       LOAD_URL("modules.php?module=admin");
+       LOAD_URL("admin.php");
 }
 
 // Load adverstising template
@@ -95,13 +95,10 @@ if (empty($GLOBALS['action'])) {
        $GLOBALS['action'] = GET_ACTION("guest", $GLOBALS['what']);
 } // END - if
 
-// Get action value directly from URL
-$act = COMPILE_CODE($GLOBALS['action']);
-
 // Add the guest's menu here...
 if ((getConfig('guest_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
        // Show only when guest menu is active
-       ADD_MENU("guest", $act, $GLOBALS['what']);
+       ADD_MENU("guest", $GLOBALS['action'], $GLOBALS['what']);
 } // END - if
 
 // TDs between menu and content
@@ -110,8 +107,11 @@ LOAD_TEMPLATE("guest_menu_content");
 // Disable block-mode by default
 $BLOCK_MODE = false;
 
-$INC_ACTION = sprintf("%sinc/modules/guest/action-%s.php", PATH, $act);
-if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $act, $GLOBALS['what']))) {
+// Construct FQFN
+$INC_ACTION = sprintf("%sinc/modules/guest/action-%s.php", PATH, $GLOBALS['action']);
+
+// Is the file there?
+if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("guest", $GLOBALS['action'], $GLOBALS['what']))) {
        // Requested module is available so we load it
        require_once($INC_ACTION);
 } else {
index ef9e1cc911cf6505a28ff8575ac193e68ba38e30..504e0ebb11d4f4e3de64293675cbbf1e0546f3fb 100644 (file)
@@ -891,6 +891,7 @@ function GET_ACTION ($MODE, &$wht) {
        }
        //* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />\n";
 
+       // Does the module have a menu?
        if (MODULE_HAS_MENU($MODE)) {
                // Rewriting modules to menu
                switch ($MODE) {
@@ -911,7 +912,10 @@ function GET_ACTION ($MODE, &$wht) {
 
                // Free memory
                SQL_FREERESULT($result);
-       } // END - if
+       } elseif (GET_EXT_VERSION("sql_patches") == "") {
+               // No sql_patches installed!
+               LOAD_URL("admin.php");
+       }
 
        // Return action value
        return $ret;