File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ protected function configure() {
5959 protected function execute (InputInterface $ input , OutputInterface $ output ): int {
6060 $ configPrefix = $ this ->helper ->getNextServerConfigurationPrefix ();
6161 $ configHolder = new Configuration ($ configPrefix );
62+ $ configHolder ->ldapConfigurationActive = false ;
6263 $ configHolder ->saveConfiguration ();
6364
6465 $ prose = '' ;
Original file line number Diff line number Diff line change @@ -56,10 +56,9 @@ class Configuration {
5656 */
5757 protected $ configRead = false ;
5858 /**
59- * @var string[] pre-filled with one reference key so that at least one entry is written on save request and
60- * the config ID is registered
59+ * @var string[]
6160 */
62- protected $ unsavedChanges = [' ldapConfigurationActive ' => ' ldapConfigurationActive ' ];
61+ protected array $ unsavedChanges = [];
6362
6463 /**
6564 * @var array<string, mixed> settings
@@ -257,6 +256,7 @@ public function readConfiguration(): void {
257256 */
258257 public function saveConfiguration (): void {
259258 $ cta = array_flip ($ this ->getConfigTranslationArray ());
259+ $ changed = false ;
260260 foreach ($ this ->unsavedChanges as $ key ) {
261261 $ value = $ this ->config [$ key ];
262262 switch ($ key ) {
@@ -286,9 +286,12 @@ public function saveConfiguration(): void {
286286 if (is_null ($ value )) {
287287 $ value = '' ;
288288 }
289+ $ changed = true ;
289290 $ this ->saveValue ($ cta [$ key ], $ value );
290291 }
291- $ this ->saveValue ('_lastChange ' , (string )time ());
292+ if ($ changed ) {
293+ $ this ->saveValue ('_lastChange ' , (string )time ());
294+ }
292295 $ this ->unsavedChanges = [];
293296 }
294297
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ public function create() {
118118 try {
119119 $ configPrefix = $ this ->ldapHelper ->getNextServerConfigurationPrefix ();
120120 $ configHolder = new Configuration ($ configPrefix );
121+ $ configHolder ->ldapConfigurationActive = false ;
121122 $ configHolder ->saveConfiguration ();
122123 } catch (\Exception $ e ) {
123124 $ this ->logger ->logException ($ e );
You can’t perform that action at this time.
0 commit comments