]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rewrite_functions.php
A lot while() conditions rewritten to SQL_FETCHARRAY(), see bug #107, @TODO tags...
[mailer.git] / inc / libs / rewrite_functions.php
index 5a1929e6a2bd25f80e2b48a0441f192389980628..769fb7ad2f5cc8acb989766e59361de01c78c3f0 100644 (file)
@@ -39,24 +39,22 @@ if (!defined('__SECURITY')) {
 
 //
 function REWRITE_LINKS ($HTML) {
-       global $_CONFIG;
-
        // Skip rewriting for the admin area (which search engine may enter here???)
        if (ereg($GLOBALS['module'], getConfig('rewrite_skip'))) return $HTML;
 
        // Strip slashes with double-backslashes for the preg_replace() function
-       $URL = str_replace("/", "\\/", URL);
+       $URL = str_replace("/", "\\/", constant('URL'));
 
        // Generate target URL
-       $target = URL."/cms/";
+       $target = constant('URL')."/cms/";
 
        // Convert modules.php?module=...
        $test = preg_replace("/".$URL."\\/modules.php\\?module=/i", $target, $HTML);
 
        if (eregi(SERVER_URL, $test)) {
                // Konvert URLs from my server
-               $URL = str_replace("/", "\\/", SERVER_URL);
-               $test = preg_replace("/".$URL."\\/modules.php\\?module=/i", SERVER_URL."/cms/", $test);
+               $URL = str_replace("/", "\\/", constant('SERVER_URL'));
+               $test = preg_replace("/".$URL."\\/modules.php\\?module=/i", constant('SERVER_URL')."/cms/", $test);
        } // END - if
 
        // Strip slashes as above for the main URL
@@ -85,7 +83,7 @@ function REWRITE_LINKS ($HTML) {
 
        // Simple from->to replacements
        $REPLACE = array(
-               'search'  => array("u_id", "url", "page", "offset", "mid", "bid", "sub", "home"),
+               'search'  => array("uid", "url", "page", "offset", "mid", "bid", "sub", "home"),
                'replace' => array("u"   , "url", "page", "offset", "m"  , "b"  , "s"  , "h")
        );
 
@@ -98,7 +96,7 @@ function REWRITE_LINKS ($HTML) {
        // Replace all array elements through
        foreach ($REPLACE['search'] as $k => $v) {
                if (eregi("$v=", $test)) {
-                       // Replace &u_id= with /u/
+                       // Replace &uid= with /u/
                        $test = preg_replace("/&".$v."=/i", "/".$REPLACE['replace'][$k]."/", $test);
                } // END - if
        } // END - foreach