// iterate over $images to handle continue param correct
foreach ( $images as $image => $pageId ) {
if ( !isset( $sha1s[$image] ) ) {
- continue; //file does not exist
+ continue; // file does not exist
}
$sha1 = $sha1s[$image];
$dupFiles = $filesBySha1s[$sha1];
foreach ( $dupFiles as $dupFile ) {
$dupName = $dupFile->getName();
if ( $image == $dupName && $dupFile->isLocal() ) {
- continue; //ignore the local file itself
+ continue; // ignore the local file itself
}
if ( $skipUntilThisDup !== false && $dupName < $skipUntilThisDup ) {
- continue; //skip to pos after the image from continue param
+ continue; // skip to pos after the image from continue param
}
$skipUntilThisDup = false;
if ( ++$count > $params['limit'] ) {
- $fit = false; //break outer loop
+ $fit = false; // break outer loop
// We're one over limit which shows that
// there are additional images to be had. Stop here...
$this->setContinueEnumParameter( 'continue', $image . '|' . $dupName );
$r = array(
'name' => $dupName,
'user' => $dupFile->getUser( 'text' ),
- 'timestamp' => wfTimestamp( TS_ISO_8601, $dupFile->getTimestamp() )
+ 'timestamp' => wfTimestamp( TS_ISO_8601, $dupFile->getTimestamp() ),
+ 'shared' => !$dupFile->isLocal(),
);
- if ( !$dupFile->isLocal() ) {
- $r['shared'] = '';
- }
$fit = $this->addPageSubItem( $pageId, $r );
if ( !$fit ) {
$this->setContinueEnumParameter( 'continue', $image . '|' . $dupName );
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:Properties#duplicatefiles_.2F_df';
+ return 'https://www.mediawiki.org/wiki/API:Duplicatefiles';
}
}