[Pkg-owncloud-commits] [owncloud] 68/172: remove legacy aka deprecated code: OC_Cache
David Prévot
taffit at moszumanska.debian.org
Sun May 18 20:09:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 33987eea8302e5b8f7889c934debdc2b9dd0296c
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Mon May 12 16:23:33 2014 +0200
remove legacy aka deprecated code: OC_Cache
---
apps/user_ldap/lib/connection.php | 2 +-
apps/user_ldap/lib/proxy.php | 2 +-
core/avatar/controller.php | 8 ++++----
lib/private/legacy/cache.php | 10 ----------
lib/private/route/router.php | 2 +-
5 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 173c4eb..1ac803d 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -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();
diff --git a/apps/user_ldap/lib/proxy.php b/apps/user_ldap/lib/proxy.php
index 0eb294e..1e10164 100644
--- a/apps/user_ldap/lib/proxy.php
+++ b/apps/user_ldap/lib/proxy.php
@@ -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) {
diff --git a/core/avatar/controller.php b/core/avatar/controller.php
index 2269382..06efbec 100644
--- a/core/avatar/controller.php
+++ b/core/avatar/controller.php
@@ -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()) ));
diff --git a/lib/private/legacy/cache.php b/lib/private/legacy/cache.php
deleted file mode 100644
index f915eb5..0000000
--- a/lib/private/legacy/cache.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-/**
- * Copyright (c) 2013 Thomas Tanghus (thomas at 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 {
-}
\ No newline at end of file
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index f790036..44b0b94 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list