DifferenceEngine: show undo links for non-text content
authordaniel <dkinzler@wikimedia.org>
Fri, 6 Sep 2019 13:58:31 +0000 (15:58 +0200)
committerdaniel <dkinzler@wikimedia.org>
Fri, 6 Sep 2019 13:58:31 +0000 (15:58 +0200)
In Ia94521b78 I introduced code that would suppress undo links in diffs
of non-textual content. However, extensions that define non-textual
content, such as Wikibase, may override action handles to provide undo
functionality. So my reasoning for removing these links was flawed.

Bug: T232214
Change-Id: I0316d8c0683b0782b9940e0e1e8f70d5bcb6b468

includes/diff/DifferenceEngine.php

index b8697e5..7fcda4c 100644 (file)
@@ -1511,10 +1511,6 @@ class DifferenceEngine extends ContextSource {
        private function userCanEdit( Revision $rev ) {
                $user = $this->getUser();
 
-               if ( !$rev->getContentHandler()->supportsDirectEditing() ) {
-                       return false;
-               }
-
                if ( !$rev->userCan( RevisionRecord::DELETED_TEXT, $user ) ) {
                        return false;
                }