* @return FormOptions
*/
public function getDefaultOptions() {
+ $config = $this->getConfig();
$opts = new FormOptions();
$opts->add( 'hideminor', false );
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
$opts->add( 'hidemyself', false );
- $opts->add( 'hidecategorization', false );
+
+ if ( $config->get( 'RCWatchCategoryMembership' ) ) {
+ $opts->add( 'hidecategorization', false );
+ }
$opts->add( 'namespace', '', FormOptions::INTNULL );
$opts->add( 'invert', false );
$conds[] = 'rc_user_text != ' . $dbr->addQuotes( $user->getName() );
}
}
- if ( $opts['hidecategorization'] === true ) {
+ if ( $this->getConfig()->get( 'RCWatchCategoryMembership' )
+ && $opts['hidecategorization'] === true
+ ) {
$conds[] = 'rc_type != ' . $dbr->addQuotes( RC_CATEGORIZE );
}
*
* @param FormOptions $opts
*/
- function setTopText( FormOptions $opts ) {
+ public function setTopText( FormOptions $opts ) {
// nothing by default
}
*
* @param FormOptions $opts
*/
- function setBottomText( FormOptions $opts ) {
+ public function setBottomText( FormOptions $opts ) {
// nothing by default
}
* @param FormOptions $opts
* @return array
*/
- function getExtraOptions( $opts ) {
+ public function getExtraOptions( $opts ) {
return array();
}
/**
* Return the legend displayed within the fieldset
- * @todo This should not be static, then we can drop the parameter
- * @todo Not called by anything, should be called by doHeader()
*
- * @param IContextSource $context The object available as $this in non-static functions
* @return string
*/
- public static function makeLegend( IContextSource $context ) {
+ public function makeLegend() {
+ $context = $this->getContext();
$user = $context->getUser();
# The legend showing what the letters and stuff mean
$legend = Html::openElement( 'dl' ) . "\n";