Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | | - * Get the main Query module |
| 50 | + * Get the main Query module |
51 | 51 | */ |
52 | 52 | public function getQuery() { |
53 | 53 | return $this->mQueryModule; |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | |
103 | 103 | public function __construct($query, $moduleName, $paramPrefix = '') { |
104 | 104 | parent :: __construct($query, $moduleName, $paramPrefix); |
105 | | - $mIsGenerator = false; |
| 105 | + $this->mIsGenerator = false; |
106 | 106 | } |
107 | 107 | |
108 | 108 | public function setGeneratorMode() { |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -319,8 +319,10 @@ |
320 | 320 | case 'timestamp' : |
321 | 321 | if ($multi) |
322 | 322 | ApiBase :: dieDebug(__METHOD__, "Multi-values not supported for $paramName"); |
323 | | - if (!preg_match('/^[0-9]{14}$/', $value)) |
| 323 | + if (!preg_match('/^[0-9]{14}$/', $value)) { |
| 324 | + $valueName = ""; // TODO: initialization |
324 | 325 | $this->dieUsage("Invalid value '$value' for timestamp parameter $paramName", "badtimestamp_{$valueName}"); |
| 326 | + } |
325 | 327 | break; |
326 | 328 | default : |
327 | 329 | ApiBase :: dieDebug(__METHOD__, "Param $paramName's type is unknown - $type"); |
— | — | @@ -365,8 +367,6 @@ |
366 | 368 | * Validate the value against the minimum and user/bot maximum limits. Prints usage info on failure. |
367 | 369 | */ |
368 | 370 | function validateLimit($varname, $value, $min, $max, $botMax) { |
369 | | - global $wgUser; |
370 | | - |
371 | 371 | if ($value < $min) { |
372 | 372 | $this->dieUsage("$varname may not be less than $min (set to $value)", $varname); |
373 | 373 | } |
Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -142,7 +142,6 @@ |
143 | 143 | // |
144 | 144 | // User entered incorrect parameters - print usage screen |
145 | 145 | // |
146 | | - $httpRespCode = $e->getCode(); |
147 | 146 | $errMessage = array ( |
148 | 147 | 'code' => $e->getCodeString(), |
149 | 148 | 'info' => $e->getMessage() |
— | — | @@ -153,7 +152,6 @@ |
154 | 153 | // |
155 | 154 | // Something is seriously wrong |
156 | 155 | // |
157 | | - $httpRespCode = 0; |
158 | 156 | $errMessage = array ( |
159 | 157 | 'code' => 'internal_api_error', |
160 | 158 | 'info' => "Exception Caught: {$e->getMessage()}" |
Index: trunk/phase3/includes/api/ApiFeedWatchlist.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | $data = & $result->GetData(); |
65 | 65 | |
66 | 66 | $feedItems = array (); |
67 | | - foreach ($data['query']['watchlist'] as $index => & $info) { |
| 67 | + foreach ($data['query']['watchlist'] as $index => $info) { |
68 | 68 | $title = $info['title']; |
69 | 69 | $titleUrl = Title :: newFromText($title)->getFullUrl(); |
70 | 70 | $feedItems[] = new FeedItem($title, '', $titleUrl, $info['timestamp'], $info['user']); |
Index: trunk/phase3/includes/api/ApiPageSet.php |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | */ |
236 | 236 | public function populateFromRevisionIDs($revIDs) { |
237 | 237 | $this->profileIn(); |
238 | | - $pageIDs = array_map('intval', $revIDs); // paranoia |
| 238 | + $revIDs = array_map('intval', $revIDs); // paranoia |
239 | 239 | $this->initFromRevIDs($revIDs); |
240 | 240 | $this->profileOut(); |
241 | 241 | } |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -160,8 +160,6 @@ |
161 | 161 | if ($title->userCanRead()) { |
162 | 162 | |
163 | 163 | if (is_null($resultPageSet)) { |
164 | | - $id = intval($row->page_id); |
165 | | - |
166 | 164 | $vals = array (); |
167 | 165 | $vals['pageid'] = intval($row->page_id); |
168 | 166 | $vals['revid'] = intval($row->rev_id); |