Fix bulk revert of edit history
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 5 Oct 2017 22:43:07 +0000 (00:43 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 5 Oct 2017 22:43:07 +0000 (00:43 +0200)
wcfsetup/install/files/lib/system/edit/EditHistoryManager.class.php

index b6787987bf7d5c2f41e1af423c441be344535ff1..77792bdea7a36e0bb996c422f832d42916449f3d 100644 (file)
@@ -121,6 +121,7 @@ class EditHistoryManager extends SingletonFactory {
                        WHERE           revertTo.objectID = vandalizedEntries2.objectID
                                AND     revertTo.objectTypeID = vandalizedEntries2.objectTypeID
                                AND     (       revertTo.obsoletedAt <= ?
+                                       OR      revertTo.time <= ?
                                        OR      revertTo.userID NOT IN(".$userIDPlaceholders."))
                        GROUP BY revertTo.objectTypeID, revertTo.objectID";
                $statement = WCF::getDB()->prepareStatement($sql);
@@ -128,6 +129,7 @@ class EditHistoryManager extends SingletonFactory {
                        [TIME_NOW - $timeframe],
                        $userIDs,
                        [TIME_NOW - $timeframe],
+                       [TIME_NOW - $timeframe],
                        $userIDs
                ));