X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Frewrite_functions.php;h=561d281f4e5b71aae3a395f47aa56bf6f5af689c;hb=e1c0f940af34a6ed5b00b3f37ad739f0a05b2793;hp=236b440a3c213843401217d5ef643a1506ec1f01;hpb=6c1386d944095ef81ec01b395bab748656341800;p=mailer.git diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 236b440a3c..561d281f4e 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -38,14 +38,14 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // Rewrite links in HTML for better SEO (ugly part of mx!) -function REWRITE_LINKS ($HTML) { +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/"; @@ -66,17 +66,17 @@ function REWRITE_LINKS ($HTML) { } // END - if // Strip slashes as above for the main URL - $target2 = preg_quote($target, "/"); + $target2 = preg_quote($target, '/'); // Action variable $act = $target."\$1/act/"; // Convert &|&action=... - $output = preg_replace("/" . $target2 . "(.*)&action=/i", $act, $output); + $output = preg_replace('/' . $target2 . "(.*)&action=/i", $act, $output); // "The same procedure as last variable"... now for &what= $wht = $target."\$1/wht/"; - $output = preg_replace("/" . $target2 . "(.*)&what=/i", $wht, $output); + $output = preg_replace('/' . $target2 . "(.*)&what=/i", $wht, $output); // Repair missed &what=??? entries while (preg_match("/&what=(.*)\/(.*)\/(.*)/i", $output)) {