X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Frewrite_functions.php;h=e6ca8694c995323a35220fd95957de7aa0d407bd;hp=467e6babfbbdcf8649ce0c3eb170973201098eb2;hb=66b91ce490ab549425619c95fc12086e126d541b;hpb=7b0f17cd637e388049d2167811e4332cec1e979b diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 467e6babfb..e6ca8694c9 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -45,24 +45,24 @@ if (!defined('__SECURITY')) { // Rewrite links in HTML for better SEO (ugly part of mx!) function rewriteLinksInCode ($HTML) { // Skip rewriting for configured modules - if (eregi($GLOBALS['module'], getConfig('rewrite_skip')) !== false) return $HTML; + if (eregi(getModule(), getConfig('rewrite_skip')) !== false) return $HTML; // Generate target URL - $target = "{!URL!}/cms/"; + $target = "{?URL?}/cms/"; // Convert modules.php?module=... - $output = str_replace(constant('URL') . "/modules.php?module=", $target, $HTML); + $output = str_replace(getConfig('URL') . "/modules.php?module=", $target, $HTML); // Convert modules.php?module=... - $output = str_replace("{!URL!}/modules.php?module=", $target, $output); + $output = str_replace("{?URL?}/modules.php?module=", $target, $output); // Do we have an URL linked to mxchange.org? - if (eregi(constant('SERVER_URL'), $output)) { + if (eregi(getConfig('SERVER_URL'), $output)) { // Convert URLs from my server - $output = str_replace("{!URL!}/modules.php?module=", constant('SERVER_URL')."/cms/", $output); + $output = str_replace("{?URL?}/modules.php?module=", getConfig('SERVER_URL') . '/cms/', $output); // Convert URLs from my server - $output = str_replace(constant('URL') . "/modules.php?module=", constant('SERVER_URL')."/cms/", $output); + $output = str_replace(getConfig('URL') . "/modules.php?module=", getConfig('SERVER_URL') . '/cms/', $output); } // END - if // Strip slashes as above for the main URL