}
$hash = $this->mFile->getSha1();
if ( !( $hash ) ) {
- $this->mDupes = array();
+ $this->mDupes = [];
return $this->mDupes;
}
$dupes = RepoGroup::singleton()->findBySha1( $hash );
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
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 */
$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 );