Fixes for rewrite extension (thx 2 monakoianar again)
authorRoland Häder <roland@mxchange.org>
Thu, 28 Aug 2008 13:47:25 +0000 (13:47 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 28 Aug 2008 13:47:25 +0000 (13:47 +0000)
inc/extensions/ext-rewrite.php
inc/libs/rewrite_functions.php
inc/modules/admin/what-config_rewrite.php
inc/mysql-manager.php

index f162c64..c38ca09 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
  * MXChange v0.2.1                                    Start: 10/24/2004 *
- * ================                             Last change: 10/29/2004 *
+ * ================                             Last change: 08/28/2008 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : ext-rewrite.php                                  *
index e282612..308b42d 100644 (file)
@@ -44,7 +44,7 @@ function REWRITE_LINKS($HTML)
        global $_CONFIG;
 
        // Skip rewriting for the admin area (which search engine may enter here???)
-       if (ereg($GLOBALS['module'], $_CONFIG['rewrite_skipped_mods'])) return $HTML;
+       if (ereg($GLOBALS['module'], $_CONFIG['rewrite_skip'])) return $HTML;
 
        // Strip slashes with double-backslashes for the preg_replace() function
        $URL = str_replace("/", "\\/", URL);
index b9276d5..f02d461 100644 (file)
@@ -72,7 +72,7 @@ if (isset($_POST['ok']))
                if (empty($title)) $title = "---";
 
                // Already registered module?
-               if (ereg($mod, $_CONFIG['rewrite_skipped_mods']))
+               if (ereg($mod, $_CONFIG['rewrite_skip']))
                {
                        // Found
                        $y = ' checked';
index f11a84b..23a57e5 100644 (file)
@@ -1522,8 +1522,10 @@ function LOAD_CONFIG($no="0")
                        $CFG_DUMMY[$key] = $value;
                }
 
-               // Count cache hits
-               $CFG_DUMMY['cache_hits']++;
+               // Count cache hits if exists
+               if ((isset($CFG_DUMMY['cache_hits'])) && (EXT_IS_ACTIVE("cache"))) {
+                       $CFG_DUMMY['cache_hits']++;
+               } // END - if
        } else {
                // Load config from DB
                $result_config = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_config WHERE config=%d LIMIT 1",