]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rewrite_functions.php
New naming convention applied to many functions, see #118 for details
[mailer.git] / inc / libs / rewrite_functions.php
index ef3d16ea36445974c1cf49162523be6b46788600..467e6babfbbdcf8649ce0c3eb170973201098eb2 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 }
 
 // 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;
 
@@ -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)) {