diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/ajax/delete.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/download.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/getstoragestats.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/list.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/mimeicon.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/move.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/newfile.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/newfolder.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/rename.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/scan.php | 2 | ||||
-rw-r--r-- | apps/files/ajax/upload.php | 2 | ||||
-rw-r--r-- | apps/files_encryption/lib/session.php | 22 | ||||
-rw-r--r-- | apps/files_external/lib/smb_oc.php | 8 | ||||
-rw-r--r-- | apps/files_sharing/lib/helper.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 6 |
15 files changed, 32 insertions, 32 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index aed53d5db5a..323b70706ce 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -2,7 +2,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); -\OC::$session->close(); +\OC::$server->getSession()->close(); // Get data diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php index 4b4a7f8948d..b2e144c4b8f 100644 --- a/apps/files/ajax/download.php +++ b/apps/files/ajax/download.php @@ -23,7 +23,7 @@ // Check if we are a user OCP\User::checkLoggedIn(); -\OC::$session->close(); +\OC::$server->getSession()->close(); $files = $_GET["files"]; $dir = $_GET["dir"]; diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php index dd8af39bada..4ab5b9a779c 100644 --- a/apps/files/ajax/getstoragestats.php +++ b/apps/files/ajax/getstoragestats.php @@ -7,7 +7,7 @@ if (isset($_GET['dir'])) { } OCP\JSON::checkLoggedIn(); -\OC::$session->close(); +\OC::$server->getSession()->close(); // send back json OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics($dir))); diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index b4641343ed4..2f2f7054566 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -1,7 +1,7 @@ <?php OCP\JSON::checkLoggedIn(); -\OC::$session->close(); +\OC::$server->getSession()->close(); $l = OC_L10N::get('files'); // Load the files diff --git a/apps/files/ajax/mimeicon.php b/apps/files/ajax/mimeicon.php index 6557ff941ac..fdbcc441a78 100644 --- a/apps/files/ajax/mimeicon.php +++ b/apps/files/ajax/mimeicon.php @@ -1,4 +1,4 @@ <?php -\OC::$session->close(); +\OC::$server->getSession()->close(); print OC_Helper::mimetypeIcon($_GET['mime']); diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 0a8dbc24a65..e9a34a1b2f9 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -2,7 +2,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); -\OC::$session->close(); +\OC::$server->getSession()->close(); // Get data $dir = stripslashes($_POST["dir"]); diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index 9cfe51a6218..8173816af3a 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -7,7 +7,7 @@ if(!OC_User::isLoggedIn()) { exit; } -\OC::$session->close(); +\OC::$server->getSession()->close(); // Get the params $dir = isset( $_REQUEST['dir'] ) ? '/'.trim($_REQUEST['dir'], '/\\') : ''; diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php index 89c241189d7..4ea2ee71de2 100644 --- a/apps/files/ajax/newfolder.php +++ b/apps/files/ajax/newfolder.php @@ -5,7 +5,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); -\OC::$session->close(); +\OC::$server->getSession()->close(); // Get the params $dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : ''; diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index fa3ddace63d..e5fdf8af98c 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -23,7 +23,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); -\OC::$session->close(); +\OC::$server->getSession()->close(); $files = new \OCA\Files\App( \OC\Files\Filesystem::getView(), diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index d5d88483801..3ec7f9394b1 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -1,6 +1,6 @@ <?php set_time_limit(0); //scanning can take ages -\OC::$session->close(); +\OC::$server->getSession()->close(); $force = (isset($_GET['force']) and ($_GET['force'] === 'true')); $dir = isset($_GET['dir']) ? $_GET['dir'] : ''; diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index b737d5f8710..4eca13f1933 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -68,7 +68,7 @@ if (empty($_POST['dirToken'])) { OCP\JSON::callCheck(); if (!\OCP\App::isEnabled('files_encryption')) { // encryption app need to create keys later, so can't close too early - \OC::$session->close(); + \OC::$server->getSession()->close(); } diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php index ff8fbd24ecb..7bd4fd02421 100644 --- a/apps/files_encryption/lib/session.php +++ b/apps/files_encryption/lib/session.php @@ -117,7 +117,7 @@ class Session { */ public function setPrivateKey($privateKey) { - \OC::$session->set('privateKey', $privateKey); + \OC::$server->getSession()->set('privateKey', $privateKey); return true; @@ -140,7 +140,7 @@ class Session { */ public function setInitialized($init) { - \OC::$session->set('encryptionInitialized', $init); + \OC::$server->getSession()->set('encryptionInitialized', $init); return true; @@ -150,8 +150,8 @@ class Session { * remove encryption keys and init status from session */ public function closeSession() { - \OC::$session->remove('encryptionInitialized'); - \OC::$session->remove('privateKey'); + \OC::$server->getSession()->remove('encryptionInitialized'); + \OC::$server->getSession()->remove('privateKey'); } @@ -162,8 +162,8 @@ class Session { * @note this doesn not indicate of the init was successful, we just remeber the try! */ public function getInitialized() { - if (!is_null(\OC::$session->get('encryptionInitialized'))) { - return \OC::$session->get('encryptionInitialized'); + if (!is_null(\OC::$server->getSession()->get('encryptionInitialized'))) { + return \OC::$server->getSession()->get('encryptionInitialized'); } else { return self::NOT_INITIALIZED; } @@ -179,8 +179,8 @@ class Session { if (\OCA\Encryption\Helper::isPublicAccess()) { return $this->getPublicSharePrivateKey(); } else { - if (!is_null(\OC::$session->get('privateKey'))) { - return \OC::$session->get('privateKey'); + if (!is_null(\OC::$server->getSession()->get('privateKey'))) { + return \OC::$server->getSession()->get('privateKey'); } else { return false; } @@ -194,7 +194,7 @@ class Session { */ public function setPublicSharePrivateKey($privateKey) { - \OC::$session->set('publicSharePrivateKey', $privateKey); + \OC::$server->getSession()->set('publicSharePrivateKey', $privateKey); return true; @@ -207,8 +207,8 @@ class Session { */ public function getPublicSharePrivateKey() { - if (!is_null(\OC::$session->get('publicSharePrivateKey'))) { - return \OC::$session->get('publicSharePrivateKey'); + if (!is_null(\OC::$server->getSession()->get('publicSharePrivateKey'))) { + return \OC::$server->getSession()->get('publicSharePrivateKey'); } else { return false; } 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) { 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'); |