@@ -432,13 +432,13 @@ private function createRepositoryFromArrayInst($index, $repository)
432
432
*/
433
433
private function addRepositoryInst ($ oRepository )
434
434
{
435
- Controller::applyHook ("workspace.before_create " , array (Context::fromGlobalServices (), $ oRepository ));
435
+ Controller::applyHook ("workspace.before_create " , array (Context::emptyContext (), $ oRepository ));
436
436
$ confStorage = ConfService::getConfStorageImpl ();
437
437
$ res = $ confStorage ->saveRepository ($ oRepository );
438
438
if ($ res == -1 ) {
439
439
return $ res ;
440
440
}
441
- Controller::applyHook ("workspace.after_create " , array (Context::fromGlobalServices (), $ oRepository ));
441
+ Controller::applyHook ("workspace.after_create " , array (Context::emptyContext (), $ oRepository ));
442
442
Logger::info (__CLASS__ ,"Create Repository " , array ("repo_name " =>$ oRepository ->getDisplay ()));
443
443
CacheService::saveWithTimestamp (AJXP_CACHE_SERVICE_NS_SHARED , "pydio:repository: " .$ oRepository ->getId (), $ oRepository );
444
444
return null ;
@@ -469,13 +469,13 @@ private function getRepositoryByAliasInstDefaults($repoAlias)
469
469
*/
470
470
private function replaceRepositoryInst ($ oldId , $ oRepositoryObject )
471
471
{
472
- Controller::applyHook ("workspace.before_update " , array (Context::fromGlobalServices (), $ oRepositoryObject ));
472
+ Controller::applyHook ("workspace.before_update " , array (Context::emptyContext (), $ oRepositoryObject ));
473
473
$ confStorage = ConfService::getConfStorageImpl ();
474
474
$ res = $ confStorage ->saveRepository ($ oRepositoryObject , true );
475
475
if ($ res == -1 ) {
476
476
return -1 ;
477
477
}
478
- Controller::applyHook ("workspace.after_update " , array (Context::fromGlobalServices (), $ oRepositoryObject ));
478
+ Controller::applyHook ("workspace.after_update " , array (Context::emptyContext (), $ oRepositoryObject ));
479
479
Logger::info (__CLASS__ ,"Edit Repository " , array ("repo_name " =>$ oRepositoryObject ->getDisplay ()));
480
480
CacheService::saveWithTimestamp (AJXP_CACHE_SERVICE_NS_SHARED , "pydio:repository: " . $ oRepositoryObject ->getId (), $ oRepositoryObject );
481
481
return 0 ;
@@ -488,7 +488,7 @@ private function replaceRepositoryInst($oldId, $oRepositoryObject)
488
488
*/
489
489
private function deleteRepositoryInst ($ repoId )
490
490
{
491
- Controller::applyHook ("workspace.before_delete " , array (Context::fromGlobalServices (), $ repoId ));
491
+ Controller::applyHook ("workspace.before_delete " , array (Context::emptyContext (), $ repoId ));
492
492
$ confStorage = ConfService::getConfStorageImpl ();
493
493
$ shares = $ confStorage ->listRepositoriesWithCriteria (array ("parent_uuid " => $ repoId ));
494
494
$ toDelete = array ();
@@ -502,7 +502,7 @@ private function deleteRepositoryInst($repoId)
502
502
foreach ($ toDelete as $ deleteId ){
503
503
$ this ->deleteRepositoryInst ($ deleteId );
504
504
}
505
- Controller::applyHook ("workspace.after_delete " , array (Context::fromGlobalServices (), $ repoId ));
505
+ Controller::applyHook ("workspace.after_delete " , array (Context::emptyContext (), $ repoId ));
506
506
Logger::info (__CLASS__ ,"Delete Repository " , array ("repo_id " =>$ repoId ));
507
507
CacheService::delete (AJXP_CACHE_SERVICE_NS_SHARED , "pydio:repository: " .$ repoId );
508
508
return 0 ;
0 commit comments