|
@@ 279-288 (lines=10) @@
|
| 276 |
|
$count = 0; |
| 277 |
|
$result = $this->getResult(); |
| 278 |
|
foreach ( $res as $row ) { |
| 279 |
|
if ( ++$count > $limit ) { |
| 280 |
|
// We've reached the one extra which shows that there are |
| 281 |
|
// additional pages to be had. Stop here... |
| 282 |
|
if ( $params['sort'] == 'name' ) { |
| 283 |
|
$this->setContinueEnumParameter( 'continue', $row->img_name ); |
| 284 |
|
} else { |
| 285 |
|
$this->setContinueEnumParameter( 'continue', "$row->img_timestamp|$row->img_name" ); |
| 286 |
|
} |
| 287 |
|
break; |
| 288 |
|
} |
| 289 |
|
|
| 290 |
|
if ( is_null( $resultPageSet ) ) { |
| 291 |
|
$file = $repo->newFileFromRow( $row ); |
|
@@ 297-304 (lines=8) @@
|
| 294 |
|
self::addTitleInfo( $info, $file->getTitle() ); |
| 295 |
|
|
| 296 |
|
$fit = $result->addValue( [ 'query', $this->getModuleName() ], null, $info ); |
| 297 |
|
if ( !$fit ) { |
| 298 |
|
if ( $params['sort'] == 'name' ) { |
| 299 |
|
$this->setContinueEnumParameter( 'continue', $row->img_name ); |
| 300 |
|
} else { |
| 301 |
|
$this->setContinueEnumParameter( 'continue', "$row->img_timestamp|$row->img_name" ); |
| 302 |
|
} |
| 303 |
|
break; |
| 304 |
|
} |
| 305 |
|
} else { |
| 306 |
|
$titles[] = Title::makeTitle( NS_FILE, $row->img_name ); |
| 307 |
|
} |