Big blitz on unused variables (a lot of $db = $this->getDb() )
[lhc/web/wiklou.git] / includes / api / ApiQueryInfo.php
index 96f2bb9..896e200 100644 (file)
@@ -247,7 +247,6 @@ class ApiQueryInfo extends ApiQueryBase {
                $this->pageLatest = $pageSet->getCustomField( 'page_latest' );
                $this->pageLength = $pageSet->getCustomField( 'page_len' );
 
-               $db = $this->getDB();
                // Get protection info if requested
                if ( $this->fld_protection ) {
                        $this->getProtectionInfo();
@@ -364,7 +363,7 @@ class ApiQueryInfo extends ApiQueryBase {
                        if ( isset( $this->displaytitles[$title->getArticleId()] ) ) {
                                $pageInfo['displaytitle'] = $this->displaytitles[$title->getArticleId()];
                        } else {
-                               $pageInfo['displaytitle'] = $title;
+                               $pageInfo['displaytitle'] = $title->getPrefixedText();
                        }
                }
 
@@ -556,17 +555,13 @@ class ApiQueryInfo extends ApiQueryBase {
        }
        
        private function getDisplayTitle() {
-               $pageIds = $this->displaytitles = array();
+               $this->displaytitles = array();
                
-               foreach ( $this->everything as $t ) {
-                       $pageIds = $t->getArticleID();
-               }
+               $pageIds = array_keys( $this->titles );
        
                if ( !count( $pageIds ) ) {
                        return;
                }
-               
-               $db = $this->getDB();
 
                $this->resetQueryParams();
                $this->addTables( 'page_props' );