From 8bed38c78ddea18ed10a253d0838166d4342a171 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 15 Nov 2012 18:13:54 +0100 Subject: [PATCH] Rename install hook functions to register hook --- lib/base.php | 18 +++++++++--------- tests/lib/filesystem.php | 2 +- tests/lib/share/share.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/base.php b/lib/base.php index 74b53c56658..f600800b617 100644 --- a/lib/base.php +++ b/lib/base.php @@ -433,9 +433,9 @@ class OC{ //setup extra user backends OC_User::setupBackends(); - self::installCacheHooks(); - self::installFilesystemHooks(); - self::installShareHooks(); + self::registerCacheHooks(); + self::registerFilesystemHooks(); + self::registerShareHooks(); //make sure temporary files are cleaned up register_shutdown_function(array('OC_Helper', 'cleanTmp')); @@ -471,27 +471,27 @@ class OC{ } /** - * install hooks for the cache + * register hooks for the cache */ - public static function installCacheHooks() { + public static function registerCacheHooks() { // register cache cleanup jobs OC_BackgroundJob_RegularTask::register('OC_Cache_FileGlobal', 'gc'); OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener'); } /** - * install hooks for the filesystem + * register hooks for the filesystem */ - public static function installFilesystemHooks() { + public static function registerFilesystemHooks() { // Check for blacklisted files OC_Hook::connect('OC_Filesystem', 'write', 'OC_Filesystem', 'isBlacklisted'); OC_Hook::connect('OC_Filesystem', 'rename', 'OC_Filesystem', 'isBlacklisted'); } /** - * install hooks for sharing + * register hooks for sharing */ - public static function installShareHooks() { + public static function registerShareHooks() { OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser'); OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup'); OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup'); diff --git a/tests/lib/filesystem.php b/tests/lib/filesystem.php index 7b856ef020c..5cced4946d9 100644 --- a/tests/lib/filesystem.php +++ b/tests/lib/filesystem.php @@ -74,7 +74,7 @@ class Test_Filesystem extends UnitTestCase { public function testBlacklist() { OC_Hook::clear('OC_Filesystem'); - OC::installFilesystemHooks(); + OC::registerFilesystemHooks(); $run = true; OC_Hook::emit( diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 25656c6bcd5..92f5d065cf2 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -55,7 +55,7 @@ class Test_Share extends UnitTestCase { OC_Group::addToGroup($this->user4, $this->group2); OCP\Share::registerBackend('test', 'Test_Share_Backend'); OC_Hook::clear('OCP\\Share'); - OC::installShareHooks(); + OC::registerShareHooks(); } public function tearDown() {