HOR-1249 Plugin's end points routes aren't generated when disabling/enabling a plugin.

c Fix routes path
c Fix Fix class loader multiple classes
c Fix plugin.singleton serialization
This commit is contained in:
davidcallizaya
2016-06-10 16:22:56 -04:00
parent e73140f17d
commit 5d0fc61985
3 changed files with 4 additions and 3 deletions

View File

@@ -279,7 +279,7 @@ class WebApplication
// Setting current workspace to Api class
Services\Api::setWorkspace(SYS_SYS);
$cacheDir = defined("PATH_C")? PATH_C: sys_get_temp_dir();
$cacheDir = defined("PATH_WORKSPACE") ? PATH_WORKSPACE : (defined("PATH_C")? PATH_C: sys_get_temp_dir());
$sysConfig = \System::getSystemConfiguration();
@@ -602,6 +602,7 @@ class WebApplication
public static function purgeRestApiCache($workspace)
{
@unlink(PATH_DATA . 'compiled' . DS . 'routes.php');
@unlink(PATH_DATA_SITE . 'routes.php');
@unlink(PATH_DATA . 'sites' . DS . $workspace . DS . 'api-config.php');
}
}