summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/session.php
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-29 09:21:00 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-29 09:21:00 +0200
commitc398fc59ad870751cee73a2fbef8bc75233a7515 (patch)
treef686bab6d58a62fefd231b8132b5efa0001ba0ec /apps/files_encryption/lib/session.php
parent09b54ccb2b01c558b1d9ccad1e335492d97b4fe1 (diff)
parent7c0c6bd779cb73c4fdc9993f6dc78f9dd1138a88 (diff)
downloadnextcloud-server-c398fc59ad870751cee73a2fbef8bc75233a7515.tar.gz
nextcloud-server-c398fc59ad870751cee73a2fbef8bc75233a7515.zip
Merge branch 'master' into remove_unused_vars
Conflicts: apps/files_encryption/hooks/hooks.php apps/files_encryption/lib/proxy.php apps/files_encryption/lib/session.php apps/files_encryption/lib/stream.php
Diffstat (limited to 'apps/files_encryption/lib/session.php')
-rw-r--r--apps/files_encryption/lib/session.php24
1 files changed, 10 insertions, 14 deletions
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index dbf9a487995..bff1737554b 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -105,7 +105,7 @@ class Session {
*/
public function setPrivateKey($privateKey) {
- $_SESSION['privateKey'] = $privateKey;
+ \OC::$session->set('privateKey', $privateKey);
return true;
@@ -121,8 +121,8 @@ class Session {
if (\OCA\Encryption\Helper::isPublicAccess()) {
return $this->getPublicSharePrivateKey();
} else {
- if (isset($_SESSION['privateKey']) && !empty($_SESSION['privateKey'])) {
- return $_SESSION['privateKey'];
+ if (!is_null( \OC::$session->get('privateKey') )) {
+ return \OC::$session->get('privateKey');
} else {
return false;
}
@@ -136,7 +136,7 @@ class Session {
*/
public function setPublicSharePrivateKey($privateKey) {
- $_SESSION['publicSharePrivateKey'] = $privateKey;
+ \OC::$session->set('publicSharePrivateKey', $privateKey);
return true;
@@ -149,12 +149,11 @@ class Session {
*/
public function getPublicSharePrivateKey() {
- if (isset($_SESSION['publicSharePrivateKey']) && !empty($_SESSION['publicSharePrivateKey'])) {
- return $_SESSION['publicSharePrivateKey'];
+ if (!is_null( \OC::$session->get('publicSharePrivateKey') )) {
+ return \OC::$session->get('publicSharePrivateKey');
} else {
return false;
}
-
}
@@ -165,7 +164,7 @@ class Session {
*/
public function setLegacyKey($legacyKey) {
- $_SESSION['legacyKey'] = $legacyKey;
+ \OC::$session->set('legacyKey', $legacyKey);
return true;
}
@@ -177,12 +176,9 @@ class Session {
*/
public function getLegacyKey() {
- if (
- isset($_SESSION['legacyKey'])
- && !empty($_SESSION['legacyKey'])
- ) {
+ if ( !is_null( \OC::$session->get('legacyKey') ) ) {
- return $_SESSION['legacyKey'];
+ return \OC::$session->get('legacyKey');
} else {
@@ -192,4 +188,4 @@ class Session {
}
-} \ No newline at end of file
+}