1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +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.

View File

@@ -30,7 +30,7 @@ class gallery_url // plugin-folder + '_url'
'alias' => 'gallery',
'sef' => '{alias}', // used by e107::url(); to create a url from the db table.
'redirect' => '{e_PLUGIN}gallery/gallery.php', // file-path of what to load when the regex returns true.
'legacy' => '{e_PLUGIN}gallery/gallery.php',
);