| 1 |
<?php |
| 2 |
|
| 3 |
ason |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
namespace MediaWiki\Specials; |
| 24 |
|
| 25 |
use MediaWiki\SpecialPage\ImageQueryPage; |
| 26 |
use Wikimedia\Rdbms\IConnectionProvider; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
om> |
| 33 |
|
| 34 |
class SpecialMostImages extends ImageQueryPage { |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public function __construct( IConnectionProvider $dbProvider ) { |
| 40 |
parent::__construct( 'Mostimages' ); |
| 41 |
$this->setDatabaseProvider( $dbProvider ); |
| 42 |
} |
| 43 |
|
| 44 |
public function isExpensive() { |
| 45 |
return true; |
| 46 |
} |
| 47 |
|
| 48 |
public function isSyndicated() { |
| 49 |
return false; |
| 50 |
} |
| 51 |
|
| 52 |
public function getQueryInfo() { |
| 53 |
return [ |
| 54 |
'tables' => [ 'imagelinks' ], |
| 55 |
'fields' => [ |
| 56 |
'namespace' => NS_FILE, |
| 57 |
'title' => 'il_to', |
| 58 |
'value' => 'COUNT(*)' |
| 59 |
], |
| 60 |
'options' => [ |
| 61 |
'GROUP BY' => 'il_to', |
| 62 |
'HAVING' => 'COUNT(*) > 1' |
| 63 |
] |
| 64 |
]; |
| 65 |
} |
| 66 |
|
| 67 |
protected function getCellHtml( $row ) { |
| 68 |
return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '<br />'; |
| 69 |
} |
| 70 |
|
| 71 |
protected function getGroupName() { |
| 72 |
return 'highuse'; |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
class_alias( SpecialMostImages::class, 'MostimagesPage' ); |