diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-07-16 19:40:22 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-08-29 10:22:21 +0200 |
commit | f551917a3ca2cedf748337646ed4b1d398ac8437 (patch) | |
tree | eccf53eb77c44019ef59e90c41af43297993ddf9 /apps/files_external | |
parent | ed2424c3822a3470065788ff113a3807d24d80dc (diff) | |
download | nextcloud-server-f551917a3ca2cedf748337646ed4b1d398ac8437.tar.gz nextcloud-server-f551917a3ca2cedf748337646ed4b1d398ac8437.zip |
kill OC::$session
maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession
restore order os OC::$session and OC::$CLI
remove unneded initialization of dummy session
write back session when $useCustomSession is true
log warning when deprecated app is used
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/smb_oc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_external/lib/smb_oc.php b/apps/files_external/lib/smb_oc.php index 0c79c06c5df..e6f3aaf4052 100644 --- a/apps/files_external/lib/smb_oc.php +++ b/apps/files_external/lib/smb_oc.php @@ -14,12 +14,12 @@ class SMB_OC extends \OC\Files\Storage\SMB { private $username_as_share; public function __construct($params) { - if (isset($params['host']) && \OC::$session->exists('smb-credentials')) { + if (isset($params['host']) && \OC::$server->getSession()->exists('smb-credentials')) { $host=$params['host']; $this->username_as_share = ($params['username_as_share'] === 'true'); - $params_auth = \OC::$session->get('smb-credentials'); - $user = \OC::$session->get('loginname'); + $params_auth = \OC::$server->getSession()->get('smb-credentials'); + $user = \OC::$server->getSession()->get('loginname'); $password = $params_auth['password']; $root=isset($params['root'])?$params['root']:'/'; @@ -45,7 +45,7 @@ class SMB_OC extends \OC\Files\Storage\SMB { } public static function login( $params ) { - \OC::$session->set('smb-credentials', $params); + \OC::$server->getSession()->set('smb-credentials', $params); } public function isSharable($path) { |