From 2cd35e94b4cd36f8f3e1691bc7da56583daca672 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Wed, 29 Oct 2014 22:53:59 +0100 Subject: [PATCH] Close session for files_trashbin When restoring huge folders the interface will be unresponsive otherwise --- apps/files_trashbin/ajax/delete.php | 2 ++ apps/files_trashbin/ajax/isEmpty.php | 1 + apps/files_trashbin/ajax/list.php | 1 + apps/files_trashbin/ajax/preview.php | 1 + apps/files_trashbin/ajax/undelete.php | 1 + 5 files changed, 6 insertions(+) diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php index a230280264..72553fa0ee 100644 --- a/apps/files_trashbin/ajax/delete.php +++ b/apps/files_trashbin/ajax/delete.php @@ -2,6 +2,8 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); +\OC::$server->getSession()->close(); + $folder = isset($_POST['dir']) ? $_POST['dir'] : '/'; // "empty trash" command diff --git a/apps/files_trashbin/ajax/isEmpty.php b/apps/files_trashbin/ajax/isEmpty.php index 2e54c7e77b..897ee26289 100644 --- a/apps/files_trashbin/ajax/isEmpty.php +++ b/apps/files_trashbin/ajax/isEmpty.php @@ -6,6 +6,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); +\OC::$server->getSession()->close(); $trashStatus = OCA\Files_Trashbin\Trashbin::isEmpty(OCP\User::getUser()); diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php index 6cad101d34..e25301a26c 100644 --- a/apps/files_trashbin/ajax/list.php +++ b/apps/files_trashbin/ajax/list.php @@ -1,6 +1,7 @@ getSession()->close(); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; diff --git a/apps/files_trashbin/ajax/preview.php b/apps/files_trashbin/ajax/preview.php index 32905b2a71..1401e3b7a7 100644 --- a/apps/files_trashbin/ajax/preview.php +++ b/apps/files_trashbin/ajax/preview.php @@ -6,6 +6,7 @@ * See the COPYING-README file. */ \OC_Util::checkLoggedIn(); +\OC::$server->getSession()->close(); if(!\OC_App::isEnabled('files_trashbin')){ exit; diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php index 02d651925c..ab7d57f5a7 100644 --- a/apps/files_trashbin/ajax/undelete.php +++ b/apps/files_trashbin/ajax/undelete.php @@ -2,6 +2,7 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); +\OC::$server->getSession()->close(); $files = $_POST['files']; $dir = '/';