Provisional workaround for router inconsistencies in background processes that switch site configs.
Ensure that router is cleared when we do site setup; we can still fetch the data from cache, so it should stay fast, but should ensure that we don't end up with someone else's routes still set up, which may be an issue breaking some of the bookmark handling that needs routing with a rare plugin.
This commit is contained in:
parent
83d1997f59
commit
02c2c3a6cc
@ -126,6 +126,15 @@ class Router
|
||||
return Router::$inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the global singleton instance for this class.
|
||||
* Needed to ensure reset when switching site configurations.
|
||||
*/
|
||||
static function clear()
|
||||
{
|
||||
Router::$inst = null;
|
||||
}
|
||||
|
||||
function __construct()
|
||||
{
|
||||
if (empty($this->m)) {
|
||||
|
@ -107,6 +107,8 @@ class StatusNet
|
||||
*/
|
||||
public static function init($server=null, $path=null, $conffile=null)
|
||||
{
|
||||
Router::clear();
|
||||
|
||||
StatusNet::initDefaults($server, $path);
|
||||
StatusNet::loadConfigFile($conffile);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user