]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove deprecated \OC:$session
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 26 Nov 2014 12:16:22 +0000 (13:16 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 26 Nov 2014 14:32:47 +0000 (15:32 +0100)
lib/base.php
lib/private/user/session.php

index 82c0c7aa6d0e2ed75dc0957dfc00afb3890b1e4d..5c33be351a4114b85bdc6b1114e1649137789d16 100644 (file)
@@ -66,16 +66,10 @@ class OC {
        public static $REQUESTEDAPP = '';
 
        /**
-        * check if owncloud runs in cli mode
+        * check if ownCloud runs in cli mode
         */
        public static $CLI = false;
 
-       /**
-        * @deprecated use \OC::$server->getSession() instead
-        * @var \OC\Session\Session
-        */
-       public static $session = null;
-
        /**
         * @var \OC\Autoloader $loader
         */
@@ -531,9 +525,7 @@ class OC {
 
                \OC::$server->getEventLogger()->start('init_session', 'Initialize session');
                OC_App::loadApps(array('session'));
-               if (self::$CLI) {
-                       self::$session = new \OC\Session\Memory('');
-               } else {
+               if (!self::$CLI) {
                        self::initSession();
                }
                \OC::$server->getEventLogger()->end('init_session');
index ca0265dfb23b993f0e4136dea65d5647a6b40c1e..94abaca3e76b87c2dc5991dd2624fd2b0b21ce35 100644 (file)
@@ -88,15 +88,6 @@ class Session implements IUserSession, Emitter {
         * @return \OCP\ISession
         */
        public function getSession() {
-               // fetch the deprecated \OC::$session if it changed for backwards compatibility
-               if (isset(\OC::$session) && \OC::$session !== $this->session) {
-                       \OC::$server->getLogger()->warning(
-                               'One of your installed apps still seems to use the deprecated ' .
-                               '\OC::$session and has replaced it with a new instance. Please file a bug against it.' .
-                               'Closing and replacing session in UserSession instance.'
-                       );
-                       $this->setSession(\OC::$session);
-               }
                return $this->session;
        }
 
@@ -111,14 +102,6 @@ class Session implements IUserSession, Emitter {
                }
                $this->session = $session;
                $this->activeUser = null;
-
-               // maintain deprecated \OC::$session
-               if (\OC::$session !== $this->session) {
-                       if (\OC::$session instanceof \OCP\ISession) {
-                               \OC::$session->close();
-                       }
-                       \OC::$session = $session;
-               }
        }
 
        /**