]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rewrite_functions.php
Fixed logfile writing in installation phase, .revision is now ignored
[mailer.git] / inc / libs / rewrite_functions.php
index 5a1929e6a2bd25f80e2b48a0441f192389980628..36c07942bb37ee4d140ae63c639540e62d9367c0 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Spezielle Funktion fuer rewrite-Erweiterung      *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009)              $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: stelzi                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -39,24 +44,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 +88,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 +101,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