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
* (bug 10132, 10134) Restore back-compatibility Image::imageUrl() function
[lhc/web/wiklou.git]
/
includes
/
SpecialWantedpages.php
diff --git
a/includes/SpecialWantedpages.php
b/includes/SpecialWantedpages.php
index
dcae3ec
..
8b70020
100644
(file)
--- a/
includes/SpecialWantedpages.php
+++ b/
includes/SpecialWantedpages.php
@@
-1,19
+1,12
@@
<?php
/**
*
<?php
/**
*
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
/**
*/
/**
- *
- */
-require_once 'QueryPage.php';
-
-/**
- *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * implements Special:Wantedpages
+ * @addtogroup SpecialPage
*/
class WantedPagesPage extends QueryPage {
var $nlinks;
*/
class WantedPagesPage extends QueryPage {
var $nlinks;
@@
-35,7
+28,7
@@
class WantedPagesPage extends QueryPage {
function getSQL() {
global $wgWantedPagesThreshold;
$count = $wgWantedPagesThreshold - 1;
function getSQL() {
global $wgWantedPagesThreshold;
$count = $wgWantedPagesThreshold - 1;
- $dbr =
&
wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_SLAVE );
$pagelinks = $dbr->tableName( 'pagelinks' );
$page = $dbr->tableName( 'page' );
return
$pagelinks = $dbr->tableName( 'pagelinks' );
$page = $dbr->tableName( 'page' );
return
@@
-49,8
+42,9
@@
class WantedPagesPage extends QueryPage {
LEFT JOIN $page AS pg2
ON pl_from = pg2.page_id
WHERE pg1.page_namespace IS NULL
LEFT JOIN $page AS pg2
ON pl_from = pg2.page_id
WHERE pg1.page_namespace IS NULL
+ AND pl_namespace NOT IN ( 2, 3 )
AND pg2.page_namespace != 8
AND pg2.page_namespace != 8
- GROUP BY
pl_namespace, pl_title
+ GROUP BY
1,2,3
HAVING COUNT(*) > $count";
}
HAVING COUNT(*) > $count";
}
@@
-71,7
+65,7
@@
class WantedPagesPage extends QueryPage {
function formatResult( $skin, $result ) {
function formatResult( $skin, $result ) {
- global $wg
Cont
Lang;
+ global $wgLang;
$title = Title::makeTitleSafe( $result->namespace, $result->title );
$title = Title::makeTitleSafe( $result->namespace, $result->title );
@@
-81,8
+75,8
@@
class WantedPagesPage extends QueryPage {
# Make a redlink
$pageLink = $skin->makeBrokenLinkObj( $title );
} else {
# Make a redlink
$pageLink = $skin->makeBrokenLinkObj( $title );
} else {
- # Make a
struck-out blue
link
- $pageLink = "<s>" . $skin->make
Known
LinkObj( $title ) . "</s>";
+ # Make a
a struck-out normal
link
+ $pageLink = "<s>" . $skin->makeLinkObj( $title ) . "</s>";
}
} else {
# Not cached? Don't bother checking existence; it can't
}
} else {
# Not cached? Don't bother checking existence; it can't
@@
-91,10
+85,12
@@
class WantedPagesPage extends QueryPage {
# Make a link to "what links here" if it's required
$wlhLink = $this->nlinks
# Make a link to "what links here" if it's required
$wlhLink = $this->nlinks
- ? " (" . $this->makeWlhLink( $title, $skin, wfMsgHtml( 'nlinks', $result->value ) ) . ")"
- : "";
+ ? $this->makeWlhLink( $title, $skin,
+ wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
+ $wgLang->formatNum( $result->value ) ) )
+ : null;
- return
"{$pageLink}{$wlhLink}"
;
+ return
wfSpecialList($pageLink, $wlhLink)
;
}
/**
}
/**
@@
-105,8
+101,8
@@
class WantedPagesPage extends QueryPage {
* @return string
*/
function makeWlhLink( &$title, &$skin, $text ) {
* @return string
*/
function makeWlhLink( &$title, &$skin, $text ) {
- $wlhTitle =
Title::makeTitle( NS_SPECIAL,
'Whatlinkshere' );
- return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );
+ $wlhTitle =
SpecialPage::getTitleFor(
'Whatlinkshere' );
+ return $skin->makeKnownLinkObj( $wlhTitle, $text, 'target=' . $title->getPrefixedUrl() );
}
}
}
}