fix force report on current blog

This commit is contained in:
Jean-Christian 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++;
}
echo '</div>';
} else {
echo form::hidden('blogs[0]', dcCore::app()->blog->id);
}
echo '
<div class="fieldset one-box" id="setting_report"><h4>' . __('Report') . '</h4>

View file

@ -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;