fix force report on current blog

This commit is contained in:
Jean-Christian Paul Denis 2022-11-27 22:19:52 +01:00
parent c60fc54b83
commit ee2aacda14
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
2 changed files with 5 additions and 2 deletions

View File

@ -194,6 +194,8 @@ if ($super) {
$i++; $i++;
} }
echo '</div>'; echo '</div>';
} else {
echo form::hidden('blogs[0]', dcCore::app()->blog->id);
} }
echo ' echo '
<div class="fieldset one-box" id="setting_report"><h4>' . __('Report') . '</h4> <div class="fieldset one-box" id="setting_report"><h4>' . __('Report') . '</h4>

View File

@ -121,7 +121,7 @@ class activityReport
} }
} }
# Force blog # Force blog
$this->settings[0]['blogs'] = [1 => $this->blog]; $this->settings[0]['blogs'] = [0 => $this->blog];
} }
public function getSetting($n) public function getSetting($n)
@ -563,7 +563,8 @@ class activityReport
} }
// lock file // lock file
if (!flock($fp, LOCK_EX | LOCK_NB)) { 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) { if ($this->_global) {
$this->lock_global = $fp; $this->lock_global = $fp;