Some fixes to avoid status error 500 when it should return 404
- Another thing to consider, the right enabling/disabling feature must be placed as following:
-----
class erikPlugin extends PMPlugin
{
...
public function enable()
{
$this->enableRestService(true);
}
public function disable()
{
$this->enableRestService(false);
}
}
This commit is contained in:
@@ -1415,11 +1415,11 @@ class PMPluginRegistry
|
||||
"filepath" => $classFile,
|
||||
"namespace" => $ns
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1432,6 +1432,7 @@ class PMPluginRegistry
|
||||
public function unregisterRestService ($sNamespace)
|
||||
{
|
||||
unset($this->_restServices[$sNamespace]);
|
||||
\Maveriks\WebApplication::purgeRestApiCache(basename(PATH_DATA_SITE));
|
||||
}
|
||||
|
||||
public function getRegisteredRestServices()
|
||||
|
||||
Reference in New Issue
Block a user