Eranroz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/107979
Change subject: Make Popularpages includeable
......................................................................
Make Popularpages includeable
This patch makes Special:Popularpages includeable so it will be possible to
show the most popular pages e.g:
{{Special:Popularpages/10}} shows the 10 most popular pages
See also:
*bug 33160 - request for such feature
*[[mediawiki:Extension:TopTenPages]] - "extension" (which stores its code on
mediawiki) that enables similar thing
Change-Id: Ifa9d394141c0fb59493fad7a0d7255a0cbcdbd09
---
M includes/specials/SpecialPopularpages.php
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/79/107979/1
diff --git a/includes/specials/SpecialPopularpages.php
b/includes/specials/SpecialPopularpages.php
index 2a80f65..bf0ebce 100644
--- a/includes/specials/SpecialPopularpages.php
+++ b/includes/specials/SpecialPopularpages.php
@@ -40,6 +40,10 @@
return false;
}
+ public function isIncludable() {
+ return true;
+ }
+
function getQueryInfo() {
return array(
'tables' => array( 'page' ),
@@ -53,6 +57,14 @@
)
);
}
+
+ public function execute( $par ) {
+ if ( $this->including() && is_numeric( $par ) ) {
+ $this->limit = min( intval( $par ), 500 );
+ }
+ $this->shownavigation = !$this->including();
+ parent::execute( $par );
+ }
/**
* @param Skin $skin
--
To view, visit https://gerrit.wikimedia.org/r/107979
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa9d394141c0fb59493fad7a0d7255a0cbcdbd09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Eranroz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits