From f1a52ea0f21cfec7b903c69514d462d2f5f7b6a8 Mon Sep 17 00:00:00 2001 From: dehart Date: Mon, 16 Dec 2024 12:38:39 +0100 Subject: [PATCH] Files: Fixed error when clicking on the Shared folder Calendar: No more timeout when calling calendar truncate. --- www/modules/calendar/model/Calendar.php | 3 +++ www/modules/files/FileBrowser.js | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/www/modules/calendar/model/Calendar.php b/www/modules/calendar/model/Calendar.php index c1c7f62777..2329a7aa0a 100644 --- a/www/modules/calendar/model/Calendar.php +++ b/www/modules/calendar/model/Calendar.php @@ -211,6 +211,9 @@ protected function afterSave($wasNew) { * Remove all events */ public function truncate(){ + // could take some time on large calendars. + set_time_limit(0); + $events = $this->events; foreach($events as $event){ diff --git a/www/modules/files/FileBrowser.js b/www/modules/files/FileBrowser.js index 72847bc465..4d09f7beaf 100644 --- a/www/modules/files/FileBrowser.js +++ b/www/modules/files/FileBrowser.js @@ -80,9 +80,10 @@ GO.files.FileBrowser = function(config){ this.treePanel.on('click', function(node) { this.setFolderID(node.id, true); this.cardPanel.show(); - - this.folderDetail.load(parseInt(node.id)); - this.eastPanel.getLayout().setActiveItem(this.folderDetail); + if(node.id !== 'shared') { + this.folderDetail.load(parseInt(node.id)); + this.eastPanel.getLayout().setActiveItem(this.folderDetail); + } }, this); this.treePanel.on('contextmenu', function(node, e){