aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-05-28 01:04:09 +0200
committerRobin Appelman <icewind@owncloud.com>2013-05-28 01:04:09 +0200
commit44f9af5a7fb6f0f9846bfb36ff99f9bf8aee5985 (patch)
tree542dda23ae155538850908d14536f3cc3a27aa6c /apps/files_sharing
parent76d13120eaf0bb6ed5661baa898b13cc6d35b111 (diff)
downloadnextcloud-server-44f9af5a7fb6f0f9846bfb36ff99f9bf8aee5985.tar.gz
nextcloud-server-44f9af5a7fb6f0f9846bfb36ff99f9bf8aee5985.zip
Use the new session wrapper
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/public.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 59598e35fa2..98d2a84fb66 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -84,7 +84,7 @@ if (isset($path)) {
exit();
} else {
// Save item id in session for future requests
- $_SESSION['public_link_authenticated'] = $linkItem['id'];
+ \OC::$session->set('public_link_authenticated', $linkItem['id']);
}
} else {
OCP\Util::writeLog('share', 'Unknown share type '.$linkItem['share_type']
@@ -97,8 +97,8 @@ if (isset($path)) {
} else {
// Check if item id is set in session
- if (!isset($_SESSION['public_link_authenticated'])
- || $_SESSION['public_link_authenticated'] !== $linkItem['id']
+ if ( ! \OC::$session->exists('public_link_authenticated')
+ || \OC::$session->get('public_link_authenticated') !== $linkItem['id']
) {
// Prompt for password
$tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest');