From c96ee721c6ec04615a519f47fa31ae374ef51a3e Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 12 Aug 2011 14:12:27 +0200 Subject: [PATCH] Replaced StorageHandler with UserStorageHandler Since the StorageHandler "just" stores user data, shouldn't it be named UserStorageHandler? --- .../install/files/lib/data/user/User.class.php | 14 +++++++------- wcfsetup/install/files/lib/system/WCF.class.php | 6 +++--- .../lib/system/session/SessionHandler.class.php | 10 +++++----- .../storage/UserStorageHandler.class.php} | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) rename wcfsetup/install/files/lib/system/{storage/StorageHandler.class.php => user/storage/UserStorageHandler.class.php} (97%) diff --git a/wcfsetup/install/files/lib/data/user/User.class.php b/wcfsetup/install/files/lib/data/user/User.class.php index a30fe88470..c2218ffe96 100644 --- a/wcfsetup/install/files/lib/data/user/User.class.php +++ b/wcfsetup/install/files/lib/data/user/User.class.php @@ -4,7 +4,7 @@ use wcf\data\DatabaseObject; use wcf\data\user\group\UserGroup; use wcf\data\user\UserList; use wcf\system\cache\CacheHandler; -use wcf\system\storage\StorageHandler; +use wcf\system\user\storage\UserStorageHandler; use wcf\system\WCF; use wcf\util\StringUtil; @@ -89,10 +89,10 @@ class User extends DatabaseObject { } else { // load storage data - StorageHandler::getInstance()->loadStorage(array($this->userID), 1); + UserStorageHandler::getInstance()->loadStorage(array($this->userID), 1); // get group ids - $data = StorageHandler::getInstance()->getStorage(array($this->userID), 'groupIDs', 1); + $data = UserStorageHandler::getInstance()->getStorage(array($this->userID), 'groupIDs', 1); // cache does not exist or is outdated if ($data[$this->userID] === null) { @@ -107,7 +107,7 @@ class User extends DatabaseObject { } // update storage data - StorageHandler::getInstance()->update($this->userID, 'groupIDs', serialize($this->groupIDs), 1); + UserStorageHandler::getInstance()->update($this->userID, 'groupIDs', serialize($this->groupIDs), 1); } else { $this->groupIDs = unserialize($data[$this->userID]); @@ -128,8 +128,8 @@ class User extends DatabaseObject { // load storage data StorageHandler::getInstance()->loadStorage(array($this->userID), 1); - // get group ids - $data = StorageHandler::getInstance()->getStorage(array($this->userID), 'languageIDs', 1); + // get language ids + $data = UserStorageHandler::getInstance()->getStorage(array($this->userID), 'languageIDs', 1); // cache does not exist or is outdated if ($data[$this->userID] === null) { @@ -143,7 +143,7 @@ class User extends DatabaseObject { } // update storage data - StorageHandler::getInstance()->update($this->userID, 'languageIDs', serialize($this->languageIDs), 1); + UserStorageHandler::getInstance()->update($this->userID, 'languageIDs', serialize($this->languageIDs), 1); } else { $this->languageIDs = unserialize($data[$this->userID]); diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index de4de0583d..bdf91a8b3b 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -9,8 +9,8 @@ use wcf\system\language\LanguageFactory; use wcf\system\package\PackageInstallationDispatcher; use wcf\system\session\SessionFactory; use wcf\system\session\SessionHandler; -use wcf\system\storage\StorageHandler; use wcf\system\template\TemplateEngine; +use wcf\system\user\storage\UserStorageHandler; use wcf\system\exception; use wcf\util; @@ -142,8 +142,8 @@ class WCF { CacheHandler::getInstance()->getCacheSource()->close(); } - // execute shutdown actions - StorageHandler::getInstance()->shutdown(); + // execute shutdown actions of user storage handler + UserStorageHandler::getInstance()->shutdown(); } /** diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 69888381e1..e8416cd634 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -5,7 +5,7 @@ use wcf\data\user\User; use wcf\system\auth\UserAuth; use wcf\system\cache\CacheHandler; use wcf\system\exception\PermissionDeniedException; -use wcf\system\storage\StorageHandler; +use wcf\system\user\storage\UserStorageHandler; use wcf\system\SingletonFactory; use wcf\system\WCF; use wcf\util\StringUtil; @@ -602,12 +602,12 @@ class SessionHandler extends SingletonFactory { */ public static function resetSessions(array $userIDs = array()) { if (count($userIDs)) { - StorageHandler::getInstance()->reset($userIDs, 'groupIDs', 1); - StorageHandler::getInstance()->reset($userIDs, 'languageIDs', 1); + UserStorageHandler::getInstance()->reset($userIDs, 'groupIDs', 1); + UserStorageHandler::getInstance()->reset($userIDs, 'languageIDs', 1); } else { - StorageHandler::getInstance()->resetAll('groupIDs', 1); - StorageHandler::getInstance()->resetAll('languageIDs', 1); + UserStorageHandler::getInstance()->resetAll('groupIDs', 1); + UserStorageHandler::getInstance()->resetAll('languageIDs', 1); } } } diff --git a/wcfsetup/install/files/lib/system/storage/StorageHandler.class.php b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php similarity index 97% rename from wcfsetup/install/files/lib/system/storage/StorageHandler.class.php rename to wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php index cc2f631a7c..e3f03cbba7 100644 --- a/wcfsetup/install/files/lib/system/storage/StorageHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/storage/UserStorageHandler.class.php @@ -1,11 +1,11 @@ -- 2.20.1