Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeebi <Flakebi@users.noreply.github.com>2019-03-24 22:22:16 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-03-24 22:22:16 +0300
commitb8e71ea1748362a0e6553cf3273f28e96c515220 (patch)
tree93443d8095f244ad0af412ca15257e5072ac059d /plugins/PrivacyManager
parentbb5abcf7d75d606984137e8b5dc9933f072a1ede (diff)
Only print warning if locking failed, fixes #14167 (#14257)
Diffstat (limited to 'plugins/PrivacyManager')
-rw-r--r--plugins/PrivacyManager/LogDataPurger.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/PrivacyManager/LogDataPurger.php b/plugins/PrivacyManager/LogDataPurger.php
index 5d524a7fa7..fcaf9ba84a 100644
--- a/plugins/PrivacyManager/LogDataPurger.php
+++ b/plugins/PrivacyManager/LogDataPurger.php
@@ -71,11 +71,13 @@ class LogDataPurger
$logTables = self::getDeleteTableLogTables();
// delete unused actions from the log_action table (but only if we can lock tables)
- if ($deleteUnusedLogActions && Db::isLockPrivilegeGranted()) {
- $this->rawLogDao->deleteUnusedLogActions();
- } else {
- $logMessage = get_class($this) . ": LOCK TABLES privilege not granted; skipping unused actions purge";
- Log::warning($logMessage);
+ if ($deleteUnusedLogActions) {
+ if (Db::isLockPrivilegeGranted()) {
+ $this->rawLogDao->deleteUnusedLogActions();
+ } else {
+ $logMessage = get_class($this) . ": LOCK TABLES privilege not granted; skipping unused actions purge";
+ Log::warning($logMessage);
+ }
}
/**