From ee2aacda145b93d19bffd075feea2cfeace9ce59 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 27 Nov 2022 22:19:52 +0100 Subject: [PATCH] fix force report on current blog --- _config.php | 2 ++ inc/class.activity.report.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/_config.php b/_config.php index 9a46def..7e83852 100644 --- a/_config.php +++ b/_config.php @@ -194,6 +194,8 @@ if ($super) { $i++; } echo ''; +} else { + echo form::hidden('blogs[0]', dcCore::app()->blog->id); } echo '

' . __('Report') . '

diff --git a/inc/class.activity.report.php b/inc/class.activity.report.php index 3c6220b..2b3dc7e 100644 --- a/inc/class.activity.report.php +++ b/inc/class.activity.report.php @@ -121,7 +121,7 @@ class activityReport } } # Force blog - $this->settings[0]['blogs'] = [1 => $this->blog]; + $this->settings[0]['blogs'] = [0 => $this->blog]; } public function getSetting($n) @@ -563,7 +563,8 @@ class activityReport } // lock file if (!flock($fp, LOCK_EX | LOCK_NB)) { - throw new Exception("Can't lock file"); + //throw new Exception("Can't lock file"); + return false; } if ($this->_global) { $this->lock_global = $fp;