$defaults = $opts->getAllValues();
$nondefaults = $opts->getChangedValues();
- $opts->consumeValues( array(
- 'namespace', 'invert', 'associated', 'tagfilter',
- 'categories', 'categories_any'
- ) );
$panel = array();
$panel[] = $this->optionsPanel( $defaults, $nondefaults );
* @return array
*/
function getExtraOptions( $opts ) {
+ $opts->consumeValues( array(
+ 'namespace', 'invert', 'associated', 'tagfilter', 'categories', 'categories_any'
+ ) );
+
$extraOpts = array();
$extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
$extraOpts['tagfilter'] = $tagFilter;
}
- wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
+ // Don't fire the hook for subclasses. (Or should we?)
+ if ( $this->getName() === 'Recentchanges' ) {
+ wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
+ }
return $extraOpts;
}
}
/**
- * @param $opts FormOptions
+ * Get options to be displayed in a form
+ *
+ * @param FormOptions $opts
* @return array
*/
function getExtraOptions( $opts ) {
- $opts->consumeValues( array( 'showlinkedto', 'target', 'tagfilter' ) );
- $extraOpts = array();
- $extraOpts['namespace'] = $this->namespaceFilterForm( $opts );
+ $extraOpts = parent::getExtraOptions( $opts );
+
+ $opts->consumeValues( array( 'showlinkedto', 'target' ) );
+
$extraOpts['target'] = array( $this->msg( 'recentchangeslinked-page' )->escaped(),
Xml::input( 'target', 40, str_replace( '_', ' ', $opts['target'] ) ) .
Xml::check( 'showlinkedto', $opts['showlinkedto'], array( 'id' => 'showlinkedto' ) ) . ' ' .
Xml::label( $this->msg( 'recentchangeslinked-to' )->text(), 'showlinkedto' ) );
- $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'] );
- if ( $tagFilter ) {
- $extraOpts['tagfilter'] = $tagFilter;
- }
+
return $extraOpts;
}