Index: trunk/phase3/includes/api/ApiFeedWatchlist.php |
— | — | @@ -62,8 +62,8 @@ |
63 | 63 | // limit to the number of hours going from now back |
64 | 64 | $endTime = wfTimestamp(TS_MW, time() - intval($params['hours'] * 60 * 60)); |
65 | 65 | |
66 | | - // Prepare nested request |
67 | | - $fauxReq = new FauxRequest(array ( |
| 66 | + // Prepare parameters for nested request |
| 67 | + $fauxReqArr = array ( |
68 | 68 | 'action' => 'query', |
69 | 69 | 'meta' => 'siteinfo', |
70 | 70 | 'siprop' => 'general', |
— | — | @@ -72,7 +72,13 @@ |
73 | 73 | 'wldir' => 'older', // reverse order - from newest to oldest |
74 | 74 | 'wlend' => $endTime, // stop at this time |
75 | 75 | '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 ); |
77 | 83 | |
78 | 84 | // Execute |
79 | 85 | $module = new ApiMain($fauxReq); |
— | — | @@ -144,14 +150,16 @@ |
145 | 151 | ApiBase :: PARAM_TYPE => 'integer', |
146 | 152 | ApiBase :: PARAM_MIN => 1, |
147 | 153 | ApiBase :: PARAM_MAX => 72, |
148 | | - ) |
| 154 | + ), |
| 155 | + 'allrev' => null |
149 | 156 | ); |
150 | 157 | } |
151 | 158 | |
152 | 159 | protected function getParamDescription() { |
153 | 160 | return array ( |
154 | 161 | '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.' |
156 | 164 | ); |
157 | 165 | } |
158 | 166 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -80,6 +80,7 @@ |
81 | 81 | * (bug 11296) Temporary fix for escaping of ampersands inside links in pretty-printed |
82 | 82 | help document. |
83 | 83 | * (bug 11405) Expand templates implementation in the API |
| 84 | +* (bug 11218) Add option to feedwatchlist to display multiple revisions for each page. |
84 | 85 | |
85 | 86 | === Languages updated in 1.12 === |
86 | 87 | |