Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git] / includes / Title.php
index 1ddb2fc..f16f0c5 100644 (file)
@@ -21,6 +21,8 @@
  *
  * @file
  */
+
+use Wikimedia\Rdbms\IDatabase;
 use MediaWiki\Linker\LinkTarget;
 use MediaWiki\Interwiki\InterwikiLookup;
 use MediaWiki\MediaWikiServices;
@@ -2943,8 +2945,6 @@ class Title implements LinkTarget {
                                        continue;
                                }
 
-                               // This code should be refactored, now that it's being used more generally,
-                               // But I don't really see any harm in leaving it in Block for now -werdna
                                $expiry = $dbr->decodeExpiry( $row->pr_expiry );
 
                                // Only apply the restrictions if they haven't expired!
@@ -4030,7 +4030,10 @@ class Title implements LinkTarget {
                        $row = $db->selectRow( 'revision', Revision::selectFields(),
                                [ 'rev_page' => $pageId ],
                                __METHOD__,
-                               [ 'ORDER BY' => 'rev_timestamp ASC', 'LIMIT' => 1 ]
+                               [
+                                       'ORDER BY' => 'rev_timestamp ASC',
+                                       'IGNORE INDEX' => 'rev_timestamp'
+                               ]
                        );
                        if ( $row ) {
                                return new Revision( $row );