1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-14 18:44:27 +02:00

SEF URLs: Automatically sync news and gallery (e_url) index entries.

This commit is contained in:
Cameron
2017-10-10 16:14:56 -07:00
parent d2444af931
commit 4bff6f2be8
2 changed files with 15 additions and 1 deletions

View File

@@ -478,6 +478,20 @@ class eurl_admin_ui extends e_admin_controller_ui
->set('url_locations', $locations)
->save();
if(!empty($_POST['eurl_config']['gallery'])) // disabled, so disable e_url on index also.
{
$val = ($_POST['eurl_config']['gallery'] === 'plugin') ? 0 : 'gallery';
e107::getConfig()->setPref('e_url_list/gallery', $val)->save(false,true,false);
}
if(!empty($_POST['eurl_config']['news'])) // disabled, so disable e_url on index also.
{
$val = ($_POST['eurl_config']['news'] === 'core') ? 0 : 'news';
e107::getConfig()->setPref('e_url_list/news', $val)->save(false,true,false);
}
// var_dump($_POST['eurl_config']);
eRouter::clearCache();
e107::getCache()->clearAll('content'); // clear content - it may be using old url scheme.