Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git] / includes / revisiondelete / RevDelRevisionList.php
index 27e5148..f0b1907 100644 (file)
@@ -60,13 +60,16 @@ class RevDelRevisionList extends RevDelList {
        public function doQuery( $db ) {
                $ids = array_map( 'intval', $this->ids );
                $queryInfo = [
-                       'tables' => [ 'revision', 'user' ],
+                       'tables' => [ 'revision', 'page', 'user' ],
                        'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
                        'conds' => [
                                'rev_page' => $this->title->getArticleID(),
                                'rev_id' => $ids,
                        ],
-                       'options' => [ 'ORDER BY' => 'rev_id DESC' ],
+                       'options' => [
+                               'ORDER BY' => 'rev_id DESC',
+                               'USE INDEX' => [ 'revision' => 'PRIMARY' ] // workaround for MySQL bug (T104313)
+                       ],
                        'join_conds' => [
                                'page' => Revision::pageJoinCond(),
                                'user' => Revision::userJoinCond(),
@@ -170,10 +173,10 @@ class RevDelRevisionList extends RevDelList {
                return Status::newGood();
        }
 
-       public function doPostCommitUpdates() {
+       public function doPostCommitUpdates( array $visibilityChangeMap ) {
                $this->title->purgeSquid();
                // Extensions that require referencing previous revisions may need this
-               Hooks::run( 'ArticleRevisionVisibilitySet', [ $this->title, $this->ids ] );
+               Hooks::run( 'ArticleRevisionVisibilitySet', [ $this->title, $this->ids, $visibilityChangeMap ] );
                return Status::newGood();
        }
 }