// Get normal protections for existing titles
if(count($this->titles))
{
+ $this->resetQueryParams();
$this->addTables(array('page_restrictions', 'page'));
$this->addWhere('page_id=pr_page');
$this->addFields(array('pr_page', 'pr_type', 'pr_level',
}
/**
- * Get information about watched status and put it in $watched
- */
+ * Get information about watched status and put it in $watched
+ */
private function getWatchedInfo()
{
global $wgUser;
$lb = new LinkBatch($this->titles);
+ $this->resetQueryParams();
$this->addTables(array('page', 'watchlist'));
$this->addFields(array('page_title', 'page_namespace'));
- $this->addWhere($lb->constructSet('page', $db));
- $this->addWhere('wl_title=page_title');
- $this->addWhere('wl_namespace=page_namespace');
- $this->addWhereFld('wl_user', $wgUser->getID());
+ $this->addWhere(array(
+ $lb->constructSet('page', $db),
+ 'wl_namespace=page_namespace',
+ 'wl_title=page_title',
+ 'wl_user' => $wgUser->getID()
+ ));
$res = $this->select(__METHOD__);
*/
// Check the session key
if( !isset( $_SESSION['wsUploadData'][$this->mParams['sessionkey']] ) )
- return $this->dieUsageMsg( array( 'invalid-session-key' ) );
+ return $this->dieUsageMsg( array( 'invalid-session-key' ) );
$this->mUpload = new UploadFromStash();
$this->mUpload->initialize( $this->mParams['filename'],
// Append imageinfo to the result
$imParam = ApiQueryImageInfo::getPropertyNames();
- $result['imageinfo'] = ApiQueryImageInfo::getInfo( $file,
+ $result['imageinfo'] = ApiQueryImageInfo::getInfo( $file,
array_flip( $imParam ), $this->getResult() );
return $result;
return __CLASS__ . ': $Id: ApiUpload.php 51812 2009-06-12 23:45:20Z dale $';
}
}
-
-