r26139 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26138‎ | r26139 | r26140 >
Date:03:24, 26 September 2007
Author:amidaniel
Status:old
Tags:
Comment:
(bug 11218) Add 'allrev' parameter option to feedwatchlist, to allow multiple revisions for each page to displayed.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiFeedWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFeedWatchlist.php
@@ -62,8 +62,8 @@
6363 // limit to the number of hours going from now back
6464 $endTime = wfTimestamp(TS_MW, time() - intval($params['hours'] * 60 * 60));
6565
66 - // Prepare nested request
67 - $fauxReq = new FauxRequest(array (
 66+ // Prepare parameters for nested request
 67+ $fauxReqArr = array (
6868 'action' => 'query',
6969 'meta' => 'siteinfo',
7070 'siprop' => 'general',
@@ -72,7 +72,13 @@
7373 'wldir' => 'older', // reverse order - from newest to oldest
7474 'wlend' => $endTime, // stop at this time
7575 'wllimit' => 50
76 - ));
 76+ );
 77+
 78+ // Check for 'allrev' parameter, and if found, show all revisions to each page on wl.
 79+ if ( ! is_null ( $params['allrev'] ) ) $fauxReqArr['wlallrev'] = '';
 80+
 81+ // Create the request
 82+ $fauxReq = new FauxRequest ( $fauxReqArr );
7783
7884 // Execute
7985 $module = new ApiMain($fauxReq);
@@ -144,14 +150,16 @@
145151 ApiBase :: PARAM_TYPE => 'integer',
146152 ApiBase :: PARAM_MIN => 1,
147153 ApiBase :: PARAM_MAX => 72,
148 - )
 154+ ),
 155+ 'allrev' => null
149156 );
150157 }
151158
152159 protected function getParamDescription() {
153160 return array (
154161 'feedformat' => 'The format of the feed',
155 - 'hours' => 'List pages modified within this many hours from now'
 162+ 'hours' => 'List pages modified within this many hours from now',
 163+ 'allrev' => 'Include multiple revisions of the same page within given timeframe.'
156164 );
157165 }
158166
Index: trunk/phase3/RELEASE-NOTES
@@ -80,6 +80,7 @@
8181 * (bug 11296) Temporary fix for escaping of ampersands inside links in pretty-printed
8282 help document.
8383 * (bug 11405) Expand templates implementation in the API
 84+* (bug 11218) Add option to feedwatchlist to display multiple revisions for each page.
8485
8586 === Languages updated in 1.12 ===
8687

Follow-up revisions

RevisionCommit summaryAuthorDate
r26257Merged revisions 26134-26247 via svnmerge from...david19:06, 30 September 2007

Status & tagging log