}
// NOTE: This will be replaced to use OCP
$userSession = \OC_User::getUserSession();
- $userSession->listen('postLogin', array('OC\Cache\File', 'loginListener'));
+ $userSession->listen('postLogin', '\OC\Cache\File', 'loginListener');
}
}
* See the COPYING-README file.
*/
-namespace OC\Cache;
+namespace OC;
class Cache {
/**
*/
static public function getGlobalCache() {
if (!self::$global_cache) {
- self::$global_cache = new FileGlobal();
+ self::$global_cache = new Cache\FileGlobal();
}
return self::$global_cache;
}
*/
static public function getUserCache() {
if (!self::$user_cache) {
- self::$user_cache = new File();
+ self::$user_cache = new Cache\File();
}
return self::$user_cache;
}
class FileGlobal {
static protected function getCacheDir() {
- $cache_dir = get_temp_dir().'/owncloud-'.OC_Util::getInstanceId().'/';
+ $cache_dir = get_temp_dir().'/owncloud-' . \OC_Util::getInstanceId().'/';
if (!is_dir($cache_dir)) {
mkdir($cache_dir);
}
* See the COPYING-README file.
*/
-class Cache extends OC\Cache {
+class OC_Cache extends \OC\Cache {
}
\ No newline at end of file