dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix special case at Special:MediaStatistics"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialMostlinkedcategories.php
diff --git
a/includes/specials/SpecialMostlinkedcategories.php
b/includes/specials/SpecialMostlinkedcategories.php
index
f0ec664
..
f61a115
100644
(file)
--- a/
includes/specials/SpecialMostlinkedcategories.php
+++ b/
includes/specials/SpecialMostlinkedcategories.php
@@
-30,7
+30,6
@@
* @ingroup SpecialPage
*/
class MostlinkedCategoriesPage extends QueryPage {
* @ingroup SpecialPage
*/
class MostlinkedCategoriesPage extends QueryPage {
-
function __construct( $name = 'Mostlinkedcategories' ) {
parent::__construct( $name );
}
function __construct( $name = 'Mostlinkedcategories' ) {
parent::__construct( $name );
}
@@
-43,8
+42,9
@@
class MostlinkedCategoriesPage extends QueryPage {
return array(
'tables' => array( 'category' ),
'fields' => array( 'title' => 'cat_title',
return array(
'tables' => array( 'category' ),
'fields' => array( 'title' => 'cat_title',
- 'namespace' => NS_CATEGORY,
- 'value' => 'cat_pages' ),
+ 'namespace' => NS_CATEGORY,
+ 'value' => 'cat_pages' ),
+ 'conds' => array( 'cat_pages > 0' ),
);
}
);
}
@@
-83,15
+83,20
@@
class MostlinkedCategoriesPage extends QueryPage {
$nt = Title::makeTitleSafe( NS_CATEGORY, $result->title );
if ( !$nt ) {
$nt = Title::makeTitleSafe( NS_CATEGORY, $result->title );
if ( !$nt ) {
- return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
- Linker::getInvalidTitleDescription( $this->getContext(), NS_CATEGORY, $result->title ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ NS_CATEGORY,
+ $result->title )
+ );
}
$text = $wgContLang->convert( $nt->getText() );
}
$text = $wgContLang->convert( $nt->getText() );
-
$plink = Linker::link( $nt, htmlspecialchars( $text ) );
$plink = Linker::link( $nt, htmlspecialchars( $text ) );
-
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
+
return $this->getLanguage()->specialList( $plink, $nlinks );
}
return $this->getLanguage()->specialList( $plink, $nlinks );
}