Convert all array() syntax to []
[lhc/web/wiklou.git] / includes / revisiondelete / RevDelRevisionList.php
index ebce504..bc2b2e9 100644 (file)
@@ -59,19 +59,19 @@ class RevDelRevisionList extends RevDelList {
         */
        public function doQuery( $db ) {
                $ids = array_map( 'intval', $this->ids );
-               $queryInfo = array(
-                       'tables' => array( 'revision', 'user' ),
+               $queryInfo = [
+                       'tables' => [ 'revision', 'user' ],
                        'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
-                       'conds' => array(
+                       'conds' => [
                                'rev_page' => $this->title->getArticleID(),
                                'rev_id' => $ids,
-                       ),
-                       'options' => array( 'ORDER BY' => 'rev_id DESC' ),
-                       'join_conds' => array(
+                       ],
+                       'options' => [ 'ORDER BY' => 'rev_id DESC' ],
+                       'join_conds' => [
                                'page' => Revision::pageJoinCond(),
                                'user' => Revision::userJoinCond(),
-                       ),
-               );
+                       ],
+               ];
                ChangeTags::modifyDisplayQuery(
                        $queryInfo['tables'],
                        $queryInfo['fields'],
@@ -95,12 +95,12 @@ class RevDelRevisionList extends RevDelList {
                }
 
                // Check if any requested revisions are available fully deleted.
-               $archived = $db->select( array( 'archive' ), Revision::selectArchiveFields(),
-                       array(
+               $archived = $db->select( [ 'archive' ], Revision::selectArchiveFields(),
+                       [
                                'ar_rev_id' => $ids
-                       ),
+                       ],
                        __METHOD__,
-                       array( 'ORDER BY' => 'ar_rev_id DESC' )
+                       [ 'ORDER BY' => 'ar_rev_id DESC' ]
                );
 
                if ( $archived->numRows() == 0 ) {
@@ -109,7 +109,7 @@ class RevDelRevisionList extends RevDelList {
                        return $archived;
                } else {
                        // Combine the two! Whee
-                       $rows = array();
+                       $rows = [];
                        foreach ( $live as $row ) {
                                $rows[$row->rev_id] = $row;
                        }
@@ -153,7 +153,7 @@ class RevDelRevisionList extends RevDelList {
        public function doPostCommitUpdates() {
                $this->title->purgeSquid();
                // Extensions that require referencing previous revisions may need this
-               Hooks::run( 'ArticleRevisionVisibilitySet', array( $this->title, $this->ids ) );
+               Hooks::run( 'ArticleRevisionVisibilitySet', [ $this->title, $this->ids ] );
                return Status::newGood();
        }
 }