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_sharing | |
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_sharing')
-rw-r--r-- | apps/files_sharing/lib/helper.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php index f444404c2b1..e7ca4fcccd4 100644 --- a/apps/files_sharing/lib/helper.php +++ b/apps/files_sharing/lib/helper.php @@ -106,7 +106,7 @@ class Helper { return false; } else { // Save item id in session for future requests - \OC::$session->set('public_link_authenticated', $linkItem['id']); + \OC::$server->getSession()->set('public_link_authenticated', $linkItem['id']); } } else { \OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type'] @@ -117,8 +117,8 @@ class Helper { } else { // not authenticated ? - if ( ! \OC::$session->exists('public_link_authenticated') - || \OC::$session->get('public_link_authenticated') !== $linkItem['id']) { + if ( ! \OC::$server->getSession()->exists('public_link_authenticated') + || \OC::$server->getSession()->get('public_link_authenticated') !== $linkItem['id']) { return false; } } diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 746bdf87c17..bcf99d01edb 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -63,7 +63,7 @@ if (isset($path)) { exit(); } else { // Save item id in session for future requests - \OC::$session->set('public_link_authenticated', $linkItem['id']); + \OC::$server->getSession()->set('public_link_authenticated', $linkItem['id']); } } else { OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type'] @@ -76,8 +76,8 @@ if (isset($path)) { } else { // Check if item id is set in session - if ( ! \OC::$session->exists('public_link_authenticated') - || \OC::$session->get('public_link_authenticated') !== $linkItem['id'] + if ( ! \OC::$server->getSession()->exists('public_link_authenticated') + || \OC::$server->getSession()->get('public_link_authenticated') !== $linkItem['id'] ) { // Prompt for password OCP\Util::addStyle('files_sharing', 'authenticate'); |