mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 01:25:01 +02:00
Issue #2610 - attempt to auto-remove legacy URL files from forum.
This commit is contained in:
@@ -98,6 +98,30 @@ class forum_setup
|
||||
{
|
||||
$sql = e107::getDb();
|
||||
|
||||
$config = e107::getPref('url_config');
|
||||
|
||||
if(!empty($config['forum']))
|
||||
{
|
||||
e107::getConfig()
|
||||
->removePref('url_config/forum')
|
||||
->removePref('url_locations/forum')
|
||||
->save(false,true);
|
||||
|
||||
if(file_exists(e_PLUGIN."forum/url/url.php"))
|
||||
{
|
||||
@unlink(e_PLUGIN."forum/url/url.php");
|
||||
@unlink(e_PLUGIN."forum/url/rewrite_url.php");
|
||||
}
|
||||
|
||||
$bld = new eRouter;
|
||||
$bld->buildGlobalConfig();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($sql->isEmpty('forum_thread') === true && $sql->isTable('forum_t') && $sql->isEmpty('forum_t') === false)
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
|
Reference in New Issue
Block a user