Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-03-20 14:07:21 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2014-03-20 14:07:21 +0400
commit8a81df0f2c349416124480e80d0141ec724ffcf4 (patch)
tree4f7907896193fe4f52775c02c2d6e99dfd5647d4 /apps
parent3aa8647634d02ee97c8e31119049af506b9918dd (diff)
parentc216c4777be147a04ab27c6af9e25e8b2fc9677d (diff)
Merge pull request #7651 from owncloud/close-session-faster-master
Close session faster
Diffstat (limited to 'apps')
-rw-r--r--apps/files/ajax/delete.php5
-rw-r--r--apps/files/ajax/download.php1
-rw-r--r--apps/files/ajax/getstoragestats.php1
-rw-r--r--apps/files/ajax/list.php1
-rw-r--r--apps/files/ajax/mimeicon.php1
-rw-r--r--apps/files/ajax/move.php4
-rw-r--r--apps/files/ajax/newfile.php3
-rw-r--r--apps/files/ajax/newfolder.php1
-rw-r--r--apps/files/ajax/rawlist.php1
-rw-r--r--apps/files/ajax/rename.php1
-rw-r--r--apps/files/ajax/scan.php2
-rw-r--r--apps/files/ajax/upload.php1
-rwxr-xr-xapps/files_encryption/lib/helper.php11
13 files changed, 22 insertions, 11 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php
index 99f49188384..f6aa4f0c90e 100644
--- a/apps/files/ajax/delete.php
+++ b/apps/files/ajax/delete.php
@@ -1,10 +1,9 @@
<?php
-// Init owncloud
-
-
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
+\OC::$session->close();
+
// Get data
$dir = stripslashes($_POST["dir"]);
diff --git a/apps/files/ajax/download.php b/apps/files/ajax/download.php
index 6a34cbe4ef1..1f7e42e0d3e 100644
--- a/apps/files/ajax/download.php
+++ b/apps/files/ajax/download.php
@@ -29,6 +29,7 @@ $RUNTIME_APPTYPES=array('filesystem');
// Check if we are a user
OCP\User::checkLoggedIn();
+\OC::$session->close();
$files = $_GET["files"];
$dir = $_GET["dir"];
diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php
index dd7c7dc5571..17415b6933f 100644
--- a/apps/files/ajax/getstoragestats.php
+++ b/apps/files/ajax/getstoragestats.php
@@ -10,6 +10,7 @@ if (isset($_GET['dir'])) {
}
OCP\JSON::checkLoggedIn();
+\OC::$session->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 c8286bc15ca..667209599a0 100644
--- a/apps/files/ajax/list.php
+++ b/apps/files/ajax/list.php
@@ -7,6 +7,7 @@ $RUNTIME_APPTYPES=array('filesystem');
OCP\JSON::checkLoggedIn();
+\OC::$session->close();
// Load the files
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
diff --git a/apps/files/ajax/mimeicon.php b/apps/files/ajax/mimeicon.php
index dbb8b60112a..6557ff941ac 100644
--- a/apps/files/ajax/mimeicon.php
+++ b/apps/files/ajax/mimeicon.php
@@ -1,3 +1,4 @@
<?php
+\OC::$session->close();
print OC_Helper::mimetypeIcon($_GET['mime']);
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php
index 04a260265c2..0a8dbc24a65 100644
--- a/apps/files/ajax/move.php
+++ b/apps/files/ajax/move.php
@@ -1,10 +1,8 @@
<?php
-// Init owncloud
-
-
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
+\OC::$session->close();
// Get data
$dir = stripslashes($_POST["dir"]);
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 0187b200759..1234cf11394 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -7,7 +7,8 @@ if(!OC_User::isLoggedIn()) {
exit;
}
-session_write_close();
+\OC::$session->close();
+
// Get the params
$dir = isset( $_REQUEST['dir'] ) ? '/'.trim($_REQUEST['dir'], '/\\') : '';
$filename = isset( $_REQUEST['filename'] ) ? trim($_REQUEST['filename'], '/\\') : '';
diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php
index b2b4fb27f74..032447460f3 100644
--- a/apps/files/ajax/newfolder.php
+++ b/apps/files/ajax/newfolder.php
@@ -5,6 +5,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
+\OC::$session->close();
// Get the params
$dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : '';
diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php
index 6433ddefd69..6c2569e2ebb 100644
--- a/apps/files/ajax/rawlist.php
+++ b/apps/files/ajax/rawlist.php
@@ -4,6 +4,7 @@
$RUNTIME_APPTYPES = array('filesystem');
OCP\JSON::checkLoggedIn();
+\OC::$session->close();
// Load the files
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php
index 5b07c306af8..fa3ddace63d 100644
--- a/apps/files/ajax/rename.php
+++ b/apps/files/ajax/rename.php
@@ -23,6 +23,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
+\OC::$session->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 5b32b6db9b7..d5d88483801 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
-session_write_close();
+\OC::$session->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 145f40c50da..37c600e91da 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -58,6 +58,7 @@ if (empty($_POST['dirToken'])) {
OCP\JSON::callCheck();
+\OC::$session->close();
// get array with current storage stats (e.g. max file size)
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index ef3775875f0..8cbbe8a45a6 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -367,9 +367,14 @@ class Helper {
$post = 0;
if(count($_POST) > 0) {
$post = 1;
- }
- header('Location: ' . $location . '?p=' . $post . '&errorCode=' . $errorCode);
- exit();
+ }
+
+ if(defined('PHPUNIT_RUN') and PHPUNIT_RUN) {
+ throw new \Exception("Encryption error: $errorCode");
+ }
+
+ header('Location: ' . $location . '?p=' . $post . '&errorCode=' . $errorCode);
+ exit();
}
/**