r100761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100760‎ | r100761 | r100762 >
Date:23:18, 25 October 2011
Author:sean_colombo
Status:ok (Comments)
Tags:
Comment:
Followup to r97033 - removed wgWhatlinksherelimit and started the conversion to wgQueryPageDefaultLimit, but didn't see too many places using a default of 50.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -3813,9 +3813,9 @@
38143814
38153815 /**
38163816 * Integer defining default number of entries to show on
3817 - * Special:Whatlinkshere
 3817+ * special pages which are query-pages such as Special:Whatlinkshere.
38183818 */
3819 -$wgWhatlinkshereLimit = 50;
 3819+$wgQueryPageDefaultLimit = 50;
38203820
38213821 /**
38223822 * Limit password attempts to X attempts per Y seconds per IP per account.
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -47,7 +47,7 @@
4848 }
4949
5050 function execute( $par ) {
51 - global $wgWhatlinkshereLimit;
 51+ global $wgQueryPageDefaultLimit;
5252 $out = $this->getOutput();
5353
5454 $this->setHeaders();
@@ -56,7 +56,7 @@
5757
5858 $opts->add( 'target', '' );
5959 $opts->add( 'namespace', '', FormOptions::INTNULL );
60 - $opts->add( 'limit', $wgWhatlinkshereLimit );
 60+ $opts->add( 'limit', $wgQueryPageDefaultLimit );
6161 $opts->add( 'from', 0 );
6262 $opts->add( 'back', 0 );
6363 $opts->add( 'hideredirs', false );
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -257,6 +257,7 @@
258258 * @param $par String: (optional) user name of the user for which to show the contributions
259259 */
260260 function execute( $par ) {
 261+ global $wgQueryPageDefaultLimit;
261262 $this->setHeaders();
262263
263264 $user = $this->getUser();
@@ -283,7 +284,7 @@
284285 return;
285286 }
286287
287 - $options['limit'] = $request->getInt( 'limit', 50 );
 288+ $options['limit'] = $request->getInt( 'limit', $wgQueryPageDefaultLimit );
288289 $options['target'] = $target;
289290
290291 $nt = Title::makeTitleSafe( NS_USER, $target );

Follow-up revisions

RevisionCommit summaryAuthorDate
r100846Releasenotes for wgQueryPageDefaultLimit - followup for r100761.sean_colombo19:04, 26 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97033Merged wgWhatlinkshereLimit from Wikia. It defaults to the same value it was ...sean_colombo00:42, 14 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   12:55, 26 October 2011

Release notes?

Status & tagging log