]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rewrite_functions.php
Even more rewrites/fixes from EL branch (please report any broken part after you...
[mailer.git] / inc / libs / rewrite_functions.php
index 867346178a9bab90cf695cfc95a50ca52c3f00c4..5b76d5a1b31859742baf55c5e72d3f37c8086820 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -44,14 +45,13 @@ if (!defined('__SECURITY')) {
 // Rewrite links in HTML for better SEO (ugly part of mx!)
 function rewriteLinksInCode ($HTML) {
        // Skip rewriting for configured modules
-       if (eregi(getModule(), getConfig('rewrite_skip')) !== false) return $HTML;
+       if (isInStringIgnoreCase(getModule(), getConfig('rewrite_skip')) !== false) return $HTML;
 
        // Generate target URL
        $target = '{?URL?}/cms/';
-       $output = $HTML;
 
        // Final eval()
-       $eval = '$output = "' . compileCode(escapeQuotes($output)) . '";';
+       $eval = '$output = "' . preCompileCode(escapeQuotes($HTML)) . '";';
        eval($eval);
 
        // Convert modules.php?module=...
@@ -60,7 +60,7 @@ function rewriteLinksInCode ($HTML) {
        } // END - foreach
 
        // Do we have an URL linked to mxchange.org?
-       if (eregi(getConfig('SERVER_URL'), $output)) {
+       if (isInStringIgnoreCase(getConfig('SERVER_URL'), $output)) {
                // Convert URLs from my server
                $output = str_replace('{?URL?}/modules.php?module=', getConfig('SERVER_URL') . '/cms/', $output);