mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
SEF URLs: Automatically sync news and gallery (e_url) index entries.
This commit is contained in:
@@ -478,6 +478,20 @@ class eurl_admin_ui extends e_admin_controller_ui
|
|||||||
->set('url_locations', $locations)
|
->set('url_locations', $locations)
|
||||||
->save();
|
->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();
|
eRouter::clearCache();
|
||||||
e107::getCache()->clearAll('content'); // clear content - it may be using old url scheme.
|
e107::getCache()->clearAll('content'); // clear content - it may be using old url scheme.
|
||||||
|
@@ -30,7 +30,7 @@ class gallery_url // plugin-folder + '_url'
|
|||||||
'alias' => 'gallery',
|
'alias' => 'gallery',
|
||||||
'sef' => '{alias}', // used by e107::url(); to create a url from the db table.
|
'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.
|
'redirect' => '{e_PLUGIN}gallery/gallery.php', // file-path of what to load when the regex returns true.
|
||||||
|
'legacy' => '{e_PLUGIN}gallery/gallery.php',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user