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
* Remove deprecated $wgOnlySysopsCanPatrol references; use User::isAllowed( 'patrol...
[lhc/web/wiklou.git]
/
includes
/
SpecialPopularpages.php
diff --git
a/includes/SpecialPopularpages.php
b/includes/SpecialPopularpages.php
index
23ad570
..
7a9557d
100644
(file)
--- a/
includes/SpecialPopularpages.php
+++ b/
includes/SpecialPopularpages.php
@@
-1,7
+1,20
@@
<?php
<?php
-
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
+
+/**
+ *
+ */
require_once( "QueryPage.php" );
require_once( "QueryPage.php" );
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
class PopularPagesPage extends QueryPage {
function getName() {
class PopularPagesPage extends QueryPage {
function getName() {
@@
-9,37
+22,41
@@
class PopularPagesPage extends QueryPage {
}
function isExpensive() {
}
function isExpensive() {
- #
cur
_counter is not indexed
+ #
page
_counter is not indexed
return true;
}
return true;
}
+ function isSyndicated() { return false; }
function getSQL() {
$dbr =& wfGetDB( DB_SLAVE );
function getSQL() {
$dbr =& wfGetDB( DB_SLAVE );
- $
cur = $dbr->tableName( 'cur
' );
+ $
page = $dbr->tableName( 'page
' );
return
"SELECT 'Popularpages' as type,
return
"SELECT 'Popularpages' as type,
-
cur
_namespace as namespace,
-
cur
_title as title,
-
cur
_counter as value
- FROM $
cur
- WHERE
cur_namespace=0 AND cur
_is_redirect=0";
+
page
_namespace as namespace,
+
page
_title as title,
+
page
_counter as value
+ FROM $
page
+ WHERE
page_namespace=".NS_MAIN." AND page
_is_redirect=0";
}
function formatResult( $skin, $result ) {
}
function formatResult( $skin, $result ) {
- global $wgLang;
- $link = $skin->makeKnownLink( $result->title, "" );
+ global $wgLang, $wgContLang;
+ $title = Title::makeTitle( $result->namespace, $result->title );
+ $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
$nv = wfMsg( "nviews", $wgLang->formatNum( $result->value ) );
return "{$link} ({$nv})";
}
}
$nv = wfMsg( "nviews", $wgLang->formatNum( $result->value ) );
return "{$link} ({$nv})";
}
}
-function wfSpecialPopularpages()
-{
+/**
+ * Constructor
+ */
+function wfSpecialPopularpages() {
list( $limit, $offset ) = wfCheckLimits();
list( $limit, $offset ) = wfCheckLimits();
-
+
$ppp = new PopularPagesPage();
$ppp = new PopularPagesPage();
-
+
return $ppp->doQuery( $offset, $limit );
}
return $ppp->doQuery( $offset, $limit );
}