*
* Created on Sep 7, 2006
*
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
protected function addTimestampWhereRange( $field, $dir, $start, $end, $sort = true ) {
$db = $this->getDb();
- return $this->addWhereRange( $field, $dir,
+ $this->addWhereRange( $field, $dir,
$db->timestampOrNull( $start ), $db->timestampOrNull( $end ), $sort );
}
}
/**
- * Add information (title, ID and namespace) about a Title object to a
+ * Add information (title and namespace) about a Title object to a
* result array
* @param $arr array Result array à la ApiResult
* @param $title Title
*/
public static function addTitleInfo( &$arr, $title, $prefix = '' ) {
$arr[$prefix . 'ns'] = intval( $title->getNamespace() );
- // TODO: This is a workaround for bug 28901, as the Article ID isn't always loaded
- // Saves many DB queries, but does need cleaning up, so callers have always loaded the Article ID also
- if ( $title->isArticleIDLoaded() ) {
- $arr[$prefix . 'pageid'] = $title->getArticleID();
- }
$arr[$prefix . 'title'] = $title->getPrefixedText();
}
* @param $name string Name to assign to the database connection
* @param $db int One of the DB_* constants
* @param $groups array Query groups
- * @return Database
+ * @return DatabaseBase
*/
public function selectNamedDB( $name, $db, $groups ) {
$this->mDb = $this->getQuery()->getNamedDB( $name, $db, $groups );
$this->addFields( 'ipb_deleted' );
if ( $showBlockInfo ) {
- $this->addFields( array( 'ipb_reason', 'ipb_by_text', 'ipb_expiry' ) );
+ $this->addFields( array( 'ipb_id', 'ipb_by', 'ipb_by_text', 'ipb_reason', 'ipb_expiry' ) );
}
// Don't show hidden names
private $mIsGenerator;
+ /**
+ * @param $query ApiBase
+ * @param $moduleName string
+ * @param $paramPrefix string
+ */
public function __construct( $query, $moduleName, $paramPrefix = '' ) {
parent::__construct( $query, $moduleName, $paramPrefix );
$this->mIsGenerator = false;