remove legacy aka deprecated code: OC_Cache

This commit is contained in:
Thomas Müller 2014-05-12 16:23:33 +02:00
parent 4dd1a49a68
commit 33987eea83
5 changed files with 7 additions and 17 deletions

View File

@ -56,7 +56,7 @@ class Connection extends LDAPUtility {
if($memcache->isAvailable()) {
$this->cache = $memcache->create();
} else {
$this->cache = \OC_Cache::getGlobalCache();
$this->cache = \OC\Cache::getGlobalCache();
}
$this->hasPagedResultSupport =
$this->ldap->hasPagedResultSupport();

View File

@ -31,7 +31,7 @@ abstract class Proxy {
public function __construct(ILDAPWrapper $ldap) {
$this->ldap = $ldap;
$this->cache = \OC_Cache::getGlobalCache();
$this->cache = \OC\Cache::getGlobalCache();
}
private function addAccess($configPrefix) {

View File

@ -71,7 +71,7 @@ class Controller {
$image = new \OC_Image($newAvatar);
if ($image->valid()) {
\OC_Cache::set('tmpavatar', $image->data(), 7200);
\OC\Cache::set('tmpavatar', $image->data(), 7200);
\OC_JSON::error(array("data" => "notsquare"));
} else {
$l = new \OC_L10n('core');
@ -109,7 +109,7 @@ class Controller {
\OC_JSON::checkLoggedIn();
\OC_JSON::callCheck();
$tmpavatar = \OC_Cache::get('tmpavatar');
$tmpavatar = \OC\Cache::get('tmpavatar');
if (is_null($tmpavatar)) {
$l = new \OC_L10n('core');
\OC_JSON::error(array("data" => array("message" => $l->t("No temporary profile picture available, try again")) ));
@ -136,7 +136,7 @@ class Controller {
return;
}
$tmpavatar = \OC_Cache::get('tmpavatar');
$tmpavatar = \OC\Cache::get('tmpavatar');
if (is_null($tmpavatar)) {
$l = new \OC_L10n('core');
\OC_JSON::error(array("data" => array("message" => $l->t("No temporary profile picture available, try again")) ));
@ -149,7 +149,7 @@ class Controller {
$avatar = new \OC_Avatar($user);
$avatar->set($image->data());
// Clean up
\OC_Cache::remove('tmpavatar');
\OC\Cache::remove('tmpavatar');
\OC_JSON::success();
} catch (\Exception $e) {
\OC_JSON::error(array("data" => array("message" => $e->getMessage()) ));

View File

@ -1,10 +0,0 @@
<?php
/**
* Copyright (c) 2013 Thomas Tanghus (thomas@tanghus.net)
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
class OC_Cache extends \OC\Cache {
}

View File

@ -90,7 +90,7 @@ class Router implements IRouter {
$files[] = 'settings/routes.php';
$files[] = 'core/routes.php';
$files[] = 'ocs/routes.php';
$this->cacheKey = \OC_Cache::generateCacheKeyFromFiles($files);
$this->cacheKey = \OC\Cache::generateCacheKeyFromFiles($files);
}
return $this->cacheKey;
}