From 6e1ac0a9bbf7aea359f9e338f507d7d006396107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 17 Mar 2022 12:05:04 +0100 Subject: [PATCH] Do not update _lastChanged on auto-detected attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Configuration.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index ab5aa23f98d..63390a60fd4 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -262,6 +262,7 @@ class Configuration { */ public function saveConfiguration() { $cta = array_flip($this->getConfigTranslationArray()); + $changed = false; foreach ($this->unsavedChanges as $key) { $value = $this->config[$key]; switch ($key) { @@ -291,9 +292,12 @@ class Configuration { if (is_null($value)) { $value = ''; } + $changed = true; $this->saveValue($cta[$key], $value); } - $this->saveValue('_lastChange', time()); + if ($changed) { + $this->saveValue('_lastChange', (string)time()); + } $this->unsavedChanges = []; }