Merge "escape HTML elements in docblock with double quotes"
[lhc/web/wiklou.git] / includes / api / ApiQueryBase.php
index fdaa630..2c48aca 100644 (file)
@@ -4,7 +4,7 @@
  *
  * 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
@@ -233,7 +233,7 @@ abstract class ApiQueryBase extends ApiBase {
         */
        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 );
        }
 
@@ -296,7 +296,7 @@ abstract class ApiQueryBase extends ApiBase {
        }
 
        /**
-        * 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
@@ -304,11 +304,6 @@ abstract class ApiQueryBase extends ApiBase {
         */
        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();
        }
 
@@ -397,7 +392,7 @@ abstract class ApiQueryBase extends ApiBase {
         * @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 );
@@ -524,7 +519,7 @@ abstract class ApiQueryBase extends ApiBase {
                        $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
@@ -576,6 +571,11 @@ abstract class ApiQueryGeneratorBase extends ApiQueryBase {
 
        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;