public function __construct( $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'iwbl' );
}
-
+
public function execute() {
$this->run();
}
public function run( $resultPageSet = null ) {
$params = $this->extractRequestParams();
-
+
if ( isset( $params['title'] ) && !isset( $params['prefix'] ) ) {
$this->dieUsageMsg( array( 'missingparam', 'prefix' ) );
}
"iwl_from >= $from)))"
);
}
-
+
$prop = array_flip( $params['prop'] );
$iwprefix = isset( $prop['iwprefix'] );
$iwtitle = isset( $prop['iwtitle'] );
$this->addOption( 'LIMIT', $params['limit'] + 1 );
- $db = $this->getDB();
$res = $this->select( __METHOD__ );
-
+
$pages = array();
$count = 0;
$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();
+ $pages[] = Title::newFromRow( $row );
} else {
$entry = array();
-
+
$entry['pageid'] = intval( $row->page_id );
- $entry['ns'] = $row->page_namespace;
+ $entry['ns'] = intval( $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;
}
}
}
}
-
+
if ( is_null( $resultPageSet ) ) {
$result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'iw' );
} else {
}
}
+ public function getCacheMode( $params ) {
+ return 'public';
+ }
+
public function getAllowedParams() {
return array(
'prefix' => null,