1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

e107::url() legacy path fix.

This commit is contained in:
Cameron 2015-04-03 18:41:21 -07:00
parent 5be3a86e71
commit 71961be7af

View File

@ -2624,16 +2624,15 @@ class e107
} }
else // Legacy URL. else // Legacy URL.
{ {
preg_match('#({[a-z_]*})#', $tmp[$plugin][$key]['sef'],$matches);
unset($matches[0]); preg_match_all('#({[a-z_]*})#', $tmp[$plugin][$key]['sef'],$matches);
$srch = array(); $srch = array();
$repl = array(); $repl = array();
foreach($matches as $k=>$val) foreach($matches[1] as $k=>$val)
{ {
$srch[] = '$'.$k; $srch[] = '$'.($k+1);
$repl[] = $val; $repl[] = $val;
} }
@ -3413,7 +3412,7 @@ class e107
} }
else else
{ {
define('e_CURRENT_PLUGIN', ''); // define('e_CURRENT_PLUGIN', ''); // leave it undefined so it can be added later during sef-url detection.
define('e_PLUGIN_DIR', ''); define('e_PLUGIN_DIR', '');
define('e_PLUGIN_DIR_ABS', ''); define('e_PLUGIN_DIR_ABS', '');
} }