Merge "Remove $wgAjaxWatch configuration variable"
[lhc/web/wiklou.git] / includes / specialpage / ChangesListSpecialPage.php
index 0938316..74842aa 100644 (file)
@@ -136,6 +136,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         * @return FormOptions
         */
        public function getDefaultOptions() {
+               $config = $this->getConfig();
                $opts = new FormOptions();
 
                $opts->add( 'hideminor', false );
@@ -144,7 +145,10 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                $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 );
@@ -250,7 +254,9 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                                $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 );
                }
 
@@ -387,7 +393,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * @param FormOptions $opts
         */
-       function setTopText( FormOptions $opts ) {
+       public function setTopText( FormOptions $opts ) {
                // nothing by default
        }
 
@@ -397,7 +403,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * @param FormOptions $opts
         */
-       function setBottomText( FormOptions $opts ) {
+       public function setBottomText( FormOptions $opts ) {
                // nothing by default
        }
 
@@ -409,7 +415,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         * @param FormOptions $opts
         * @return array
         */
-       function getExtraOptions( $opts ) {
+       public function getExtraOptions( $opts ) {
                return array();
        }