- $entry = array();
-
- $entry['pageid'] = intval( $row->page_id );
- $entry['ns'] = $row->page_namespace;
- $entry['title'] = $row->page_title;
-
- if ( $row->page_is_redirect ) {
- $entry['redirect'] = '';
- }
-
- if ( $iwprefix ) {
- $entry['iwprefix'] = $row->iwl_prefix;
- }
-
- if ( $iwtitle ) {
- $entry['iwtitle'] = $row->iwl_title;
- }
-
- $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
- if ( !$fit ) {
- $this->setContinueEnumParameter( 'continue', "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}" );
- break;
+ if ( !is_null( $resultPageSet ) ) {
+ $pages[] = Title::makeTitle( $row->page_namespace, $row->page_title )->getPrefixedText();
+ } else {
+ $entry = array();
+
+ $entry['pageid'] = intval( $row->page_id );
+ $entry['ns'] = $row->page_namespace;
+ $entry['title'] = $row->page_title;
+
+ if ( $row->page_is_redirect ) {
+ $entry['redirect'] = '';
+ }
+
+ if ( $iwprefix ) {
+ $entry['iwprefix'] = $row->iwl_prefix;
+ }
+
+ if ( $iwtitle ) {
+ $entry['iwtitle'] = $row->iwl_title;
+ }
+
+ $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $entry );
+ if ( !$fit ) {
+ $this->setContinueEnumParameter( 'continue', "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}" );
+ break;
+ }