[BUGFIX] Do not execute updatewizard twice for FilesReplacePermission 04/41604/3
authorGordon Brüggemann <gb@gb-web.de>
Fri, 17 Jul 2015 20:30:27 +0000 (22:30 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Fri, 17 Jul 2015 22:07:43 +0000 (00:07 +0200)
Resolves: #68260
Releases: master
Change-Id: I91e5f64fdd83a60b9a65b3431a33e25e617e72b9
Reviewed-on: http://review.typo3.org/41604
Reviewed-by: Nadir Tester <nadir.tester@gmail.com>
Tested-by: Nadir Tester <nadir.tester@gmail.com>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/install/Classes/Updates/FilesReplacePermissionUpdate.php

index 18af8d7..e0dfac3 100644 (file)
@@ -31,6 +31,9 @@ class FilesReplacePermissionUpdate extends AbstractUpdate {
         * @return bool Whether an update is required (TRUE) or not (FALSE)
         */
        public function checkForUpdate(&$description) {
+               if ($this->isWizardDone()) {
+                       return FALSE;
+               }
                $description = 'A new file permission was introduced regarding replacing files.' .
                        ' This update sets "Files:replace" for all BE users/groups with the permission "Files:write".';
                $updateNeeded = FALSE;
@@ -88,6 +91,7 @@ class FilesReplacePermissionUpdate extends AbstractUpdate {
                                }
                        }
                }
+               $this->markWizardAsDone();
                return TRUE;
        }
 
@@ -111,4 +115,4 @@ class FilesReplacePermissionUpdate extends AbstractUpdate {
        protected function getWhereClause() {
                return 'file_permissions LIKE "%writeFile%" AND file_permissions LIKE "%replaceFile%"';
        }
-}
\ No newline at end of file
+}