*/
private $existingPropNames = null;
+ /**
+ * @var string|null
+ */
+ private $ns;
+
/**
* @var bool
*/
'label-message' => 'pageswithprop-prop',
'required' => true,
],
+ 'namespace' => [
+ 'type' => 'namespaceselect',
+ 'name' => 'namespace',
+ 'label-message' => 'namespace',
+ 'all' => null,
+ 'default' => null,
+ ],
'reverse' => [
'type' => 'check',
'name' => 'reverse',
public function onSubmit( $data, $form ) {
$this->propName = $data['propname'];
+ $this->ns = $data['namespace'];
parent::execute( $data['propname'] );
}
}
public function getQueryInfo() {
- return [
+ $query = [
'tables' => [ 'page_props', 'page' ],
'fields' => [
'page_id' => 'pp_page',
],
'options' => []
];
+
+ if ( $this->ns && isset( $this->ns ) ) {
+ $query['conds']['page_namespace'] = $this->ns;
+ }
+
+ return $query;
}
function getOrderFields() {