$this->mTitle = clone $imagePage->getTitle();
$this->mTitle->setFragment( '#filehistory' );
$this->mImg = null;
- $this->mHist = array();
- $this->mRange = array( 0, 0 ); // display range
+ $this->mHist = [];
+ $this->mRange = [ 0, 0 ]; // display range
}
/**
if ( $this->mQueryDone ) {
return;
}
- $this->mImg = $this->mImagePage->getFile(); // ensure loading
+ $this->mImg = $this->mImagePage->getPage()->getFile(); // ensure loading
if ( !$this->mImg->exists() ) {
return;
}
// The current rev may not meet the offset/limit
$numRows = count( $this->mHist );
if ( $numRows <= $this->mLimit && $this->mImg->getTimestamp() > $this->mOffset ) {
- $this->mHist = array_merge( array( $this->mImg ), $this->mHist );
+ $this->mHist = array_merge( [ $this->mImg ], $this->mHist );
}
} else {
// The current rev may not meet the offset
# Index value of bottom item in the list
$lastIndex = $this->mHist[1]->getTimestamp();
# Display range
- $this->mRange = array( 1, $numRows - 1 );
+ $this->mRange = [ 1, $numRows - 1 ];
} else {
# Index value of item past the index
$this->mPastTheEndIndex = $this->mHist[$numRows - 1]->getTimestamp();
# Index value of bottom item in the list
$lastIndex = $this->mHist[$numRows - 2]->getTimestamp();
# Display range
- $this->mRange = array( 0, $numRows - 2 );
+ $this->mRange = [ 0, $numRows - 2 ];
}
} else {
# Setting indexes to an empty string means that they will be
$lastIndex = $this->mIsBackwards ?
$this->mHist[0]->getTimestamp() : $this->mHist[$numRows - 1]->getTimestamp();
# Display range
- $this->mRange = array( 0, $numRows - 1 );
+ $this->mRange = [ 0, $numRows - 1 ];
}
} else {
$firstIndex = '';