X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FWikiFilePage.php;h=a6b991588df5196c3d2577f391b56fbc88d97029;hb=b5d8f3aed16e7d9ab5e7f7a480a274db6e1e9c04;hp=92a14afa9501e31aca54a31c198675840035148e;hpb=35aca38c58ca09d35395a4a156a2457195894027;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiFilePage.php b/includes/page/WikiFilePage.php index 92a14afa95..a6b991588d 100644 --- a/includes/page/WikiFilePage.php +++ b/includes/page/WikiFilePage.php @@ -137,7 +137,7 @@ class WikiFilePage extends WikiPage { } $hash = $this->mFile->getSha1(); if ( !( $hash ) ) { - $this->mDupes = array(); + $this->mDupes = []; return $this->mDupes; } $dupes = RepoGroup::singleton()->findBySha1( $hash ); @@ -171,13 +171,13 @@ class WikiFilePage extends WikiPage { wfDebug( 'ImagePage::doPurge purging ' . $this->mFile->getName() . "\n" ); DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, 'imagelinks' ) ); $this->mFile->upgradeRow(); - $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) ); + $this->mFile->purgeCache( [ 'forThumbRefresh' => true ] ); } else { wfDebug( 'ImagePage::doPurge no image for ' . $this->mFile->getName() . "; limiting purge to cache only\n" ); // even if the file supposedly doesn't exist, force any cached information // to be updated (in case the cached information is wrong) - $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) ); + $this->mFile->purgeCache( [ 'forThumbRefresh' => true ] ); } if ( $this->mRepo ) { // Purge redirect cache @@ -202,7 +202,7 @@ class WikiFilePage extends WikiPage { if ( !$file instanceof LocalFile ) { wfDebug( __CLASS__ . '::' . __METHOD__ . " is not supported for this file\n" ); - return TitleArray::newFromResult( new FakeResultWrapper( array() ) ); + return TitleArray::newFromResult( new FakeResultWrapper( [] ) ); } /** @var LocalRepo $repo */ @@ -210,18 +210,18 @@ class WikiFilePage extends WikiPage { $dbr = $repo->getSlaveDB(); $res = $dbr->select( - array( 'page', 'categorylinks' ), - array( + [ 'page', 'categorylinks' ], + [ 'page_title' => 'cl_to', 'page_namespace' => NS_CATEGORY, - ), - array( + ], + [ 'page_namespace' => $title->getNamespace(), 'page_title' => $title->getDBkey(), - ), + ], __METHOD__, - array(), - array( 'categorylinks' => array( 'INNER JOIN', 'page_id = cl_from' ) ) + [], + [ 'categorylinks' => [ 'INNER JOIN', 'page_id = cl_from' ] ] ); return TitleArray::newFromResult( $res );