+ $this->subjectids[MWNamespace::getTalk( $row->page_namespace )][$row->page_title] =
+ intval( $row->page_id );
+ }
+ }
+
+ /**
+ * Get information about watched status and put it in $this->watched
+ */
+ private function getWatchedInfo()
+ {
+ global $wgUser;
+
+ if ( $wgUser->isAnon() || count( $this->titles ) == 0 )
+ return;
+
+ $this->watched = array();
+ $db = $this->getDB();
+
+ $lb = new LinkBatch( $this->titles );
+
+ $this->resetQueryParams();
+ $this->addTables( array( 'page', 'watchlist' ) );
+ $this->addFields( array( 'page_title', 'page_namespace' ) );
+ $this->addWhere( array(
+ $lb->constructSet( 'page', $db ),
+ 'wl_namespace=page_namespace',
+ 'wl_title=page_title',
+ 'wl_user' => $wgUser->getID()
+ ) );
+
+ $res = $this->select( __METHOD__ );
+
+ while ( $row = $db->fetchObject( $res ) ) {
+ $this->watched[$row->page_namespace][$row->page_title] = true;