X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBrokenRedirects.php;h=4c3fbe5b18ebf02b8be1305fcb1864319231a73c;hb=4f3fbda7235fb6f7c2e77d3fbc6492e26fde9ecc;hp=9ea18daa87a40ca91d6f28fa9752d778edb78eb2;hpb=ca5c234d189fbbf348e3e5a74d0070ac4ee1db4b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBrokenRedirects.php b/includes/specials/SpecialBrokenRedirects.php index 9ea18daa87..4c3fbe5b18 100644 --- a/includes/specials/SpecialBrokenRedirects.php +++ b/includes/specials/SpecialBrokenRedirects.php @@ -51,44 +51,44 @@ class BrokenRedirectsPage extends QueryPage { public function getQueryInfo() { $dbr = wfGetDB( DB_SLAVE ); - return array( - 'tables' => array( + return [ + 'tables' => [ 'redirect', 'p1' => 'page', 'p2' => 'page', - ), - 'fields' => array( + ], + 'fields' => [ 'namespace' => 'p1.page_namespace', 'title' => 'p1.page_title', 'value' => 'p1.page_title', 'rd_namespace', 'rd_title', - ), - 'conds' => array( + ], + 'conds' => [ // Exclude pages that don't exist locally as wiki pages, // but aren't "broken" either. // Special pages and interwiki links 'rd_namespace >= 0', 'rd_interwiki IS NULL OR rd_interwiki = ' . $dbr->addQuotes( '' ), 'p2.page_namespace IS NULL', - ), - 'join_conds' => array( - 'p1' => array( 'JOIN', array( + ], + 'join_conds' => [ + 'p1' => [ 'JOIN', [ 'rd_from=p1.page_id', - ) ), - 'p2' => array( 'LEFT JOIN', array( + ] ], + 'p2' => [ 'LEFT JOIN', [ 'rd_namespace=p2.page_namespace', 'rd_title=p2.page_title' - ) ), - ), - ); + ] ], + ], + ]; } /** * @return array */ function getOrderFields() { - return array( 'rd_namespace', 'rd_title', 'rd_from' ); + return [ 'rd_namespace', 'rd_title', 'rd_from' ]; } /** @@ -117,10 +117,10 @@ class BrokenRedirectsPage extends QueryPage { $from = Linker::linkKnown( $fromObj, null, - array(), - array( 'redirect' => 'no' ) + [], + [ 'redirect' => 'no' ] ); - $links = array(); + $links = []; // if the page is editable, add an edit link if ( // check user permissions @@ -131,16 +131,16 @@ class BrokenRedirectsPage extends QueryPage { $links[] = Linker::linkKnown( $fromObj, $this->msg( 'brokenredirects-edit' )->escaped(), - array(), - array( 'action' => 'edit' ) + [], + [ 'action' => 'edit' ] ); } $to = Linker::link( $toObj, null, - array(), - array(), - array( 'broken' ) + [], + [], + [ 'broken' ] ); $arr = $this->getLanguage()->getArrow(); @@ -150,8 +150,8 @@ class BrokenRedirectsPage extends QueryPage { $links[] = Linker::linkKnown( $fromObj, $this->msg( 'brokenredirects-delete' )->escaped(), - array(), - array( 'action' => 'delete' ) + [], + [ 'action' => 'delete' ] ); } @@ -164,7 +164,6 @@ class BrokenRedirectsPage extends QueryPage { return $out; } - /** * Cache page content model for performance *