diff --git a/e107_admin/eurl.php b/e107_admin/eurl.php index b555ee422..bee0b9404 100644 --- a/e107_admin/eurl.php +++ b/e107_admin/eurl.php @@ -211,6 +211,8 @@ class eurl_admin_ui extends e_admin_controller_ui $frm = e107::getForm(); $tp = e107::getParser(); $cfg = e107::getConfig(); + $pref = e107::getPref(); + if(!empty($_POST['saveSimpleSef'])) { @@ -243,8 +245,15 @@ class eurl_admin_ui extends e_admin_controller_ui foreach($eUrl as $plug=>$val) { - $text .= "

".$plug."

"; - $text .= ""; + $active = !empty($pref['e_url_list'][$plug]) ? 1 : 0; + $text .= "
+ + + + + "; + + $text .= ""; $text .= " @@ -263,10 +272,10 @@ class eurl_admin_ui extends e_admin_controller_ui $aliasRender = str_replace('{alias}', $aliasForm, $v['regex']); $text .= " - - + + - + "; } diff --git a/index.php b/index.php index 38767a1e8..fccedcaf8 100644 --- a/index.php +++ b/index.php @@ -96,6 +96,11 @@ foreach($tmp as $plug=>$cfg) { + if(empty($pref['e_url_list'][$plug])) // disabled. + { + e107::getDebug()->log('e_URL for '.$plug.' disabled.'); + continue; + } foreach($cfg as $k=>$v) { @@ -125,7 +130,7 @@ $newLocation = preg_replace($regex, $v['redirect'], $req); - if($newLocation !=$req) + if($newLocation != $req) { $redirect = e107::getParser()->replaceConstants($newLocation); list($file,$query) = explode("?",$redirect,2);

".$plug."

".$frm->radio_switch($plug,$plug,$active)."
KeyRegular Expression
".$k."".$aliasRender."".$k."".$aliasRender."". $v['redirect']."". $v['redirect']."