X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Frewrite_functions.php;h=68a1ea633d3c4fe0f9aa5440d02d6d14f77e8291;hb=09f5758c42a33a56bdd461c946ffe759a59c54aa;hp=3c3bbbf8d4005656be3bc0ee2c02e76871ee0a09;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 3c3bbbf8d4..68a1ea633d 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -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 * @@ -48,12 +49,16 @@ function rewriteLinksInCode ($HTML) { // Generate target URL $target = '{?URL?}/cms/'; + $output = $HTML; - // Convert modules.php?module=... - $output = str_replace(getConfig('URL') . '/modules.php?module=', $target, $HTML); + // Final eval() + $eval = '$output = "' . compileCode(escapeQuotes($output)) . '";'; + eval($eval); // Convert modules.php?module=... - $output = str_replace('{?URL?}/modules.php?module=', $target, $output); + foreach (array(getConfig('URL'), '{?URL?}') as $rewrite) { + $output = str_replace($rewrite . '/modules.php?module=', $target, $output); + } // END - foreach // Do we have an URL linked to mxchange.org? if (eregi(getConfig('SERVER_URL'), $output)) { @@ -74,7 +79,7 @@ function rewriteLinksInCode ($HTML) { $output = preg_replace('/' . $target2 . '(.*)&action=/i', $action, $output); // "The same procedure as last variable"... now for &what= - $what = $target.'$1/wht/'; + $what = $target . '$1/wht/'; $output = preg_replace('/' . $target2 . '(.*)&what=/i', $what, $output); // Repair missed &what=??? entries