Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -331,6 +331,7 @@ |
332 | 332 | // Get normal protections for existing titles |
333 | 333 | if(count($this->titles)) |
334 | 334 | { |
| 335 | + $this->resetQueryParams(); |
335 | 336 | $this->addTables(array('page_restrictions', 'page')); |
336 | 337 | $this->addWhere('page_id=pr_page'); |
337 | 338 | $this->addFields(array('pr_page', 'pr_type', 'pr_level', |
— | — | @@ -505,8 +506,8 @@ |
506 | 507 | } |
507 | 508 | |
508 | 509 | /** |
509 | | - * Get information about watched status and put it in $watched |
510 | | - */ |
| 510 | + * Get information about watched status and put it in $watched |
| 511 | + */ |
511 | 512 | private function getWatchedInfo() |
512 | 513 | { |
513 | 514 | global $wgUser; |
— | — | @@ -519,12 +520,15 @@ |
520 | 521 | |
521 | 522 | $lb = new LinkBatch($this->titles); |
522 | 523 | |
| 524 | + $this->resetQueryParams(); |
523 | 525 | $this->addTables(array('page', 'watchlist')); |
524 | 526 | $this->addFields(array('page_title', 'page_namespace')); |
525 | | - $this->addWhere($lb->constructSet('page', $db)); |
526 | | - $this->addWhere('wl_title=page_title'); |
527 | | - $this->addWhere('wl_namespace=page_namespace'); |
528 | | - $this->addWhereFld('wl_user', $wgUser->getID()); |
| 527 | + $this->addWhere(array( |
| 528 | + $lb->constructSet('page', $db), |
| 529 | + 'wl_namespace=page_namespace', |
| 530 | + 'wl_title=page_title', |
| 531 | + 'wl_user' => $wgUser->getID() |
| 532 | + )); |
529 | 533 | |
530 | 534 | $res = $this->select(__METHOD__); |
531 | 535 | |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | */ |
70 | 70 | // Check the session key |
71 | 71 | if( !isset( $_SESSION['wsUploadData'][$this->mParams['sessionkey']] ) ) |
72 | | - return $this->dieUsageMsg( array( 'invalid-session-key' ) ); |
| 72 | + return $this->dieUsageMsg( array( 'invalid-session-key' ) ); |
73 | 73 | |
74 | 74 | $this->mUpload = new UploadFromStash(); |
75 | 75 | $this->mUpload->initialize( $this->mParams['filename'], |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | |
248 | 248 | // Append imageinfo to the result |
249 | 249 | $imParam = ApiQueryImageInfo::getPropertyNames(); |
250 | | - $result['imageinfo'] = ApiQueryImageInfo::getInfo( $file, |
| 250 | + $result['imageinfo'] = ApiQueryImageInfo::getInfo( $file, |
251 | 251 | array_flip( $imParam ), $this->getResult() ); |
252 | 252 | |
253 | 253 | return $result; |
— | — | @@ -322,5 +322,3 @@ |
323 | 323 | return __CLASS__ . ': $Id: ApiUpload.php 51812 2009-06-12 23:45:20Z dale $'; |
324 | 324 | } |
325 | 325 | } |
326 | | - |
327 | | - |