Merge "Remove $wgAjaxWatch configuration variable"
[lhc/web/wiklou.git] / includes / specialpage / ChangesListSpecialPage.php
index 23bd394..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 );
@@ -145,6 +146,10 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                $opts->add( 'hidepatrolled', false );
                $opts->add( 'hidemyself', false );
 
+               if ( $config->get( 'RCWatchCategoryMembership' ) ) {
+                       $opts->add( 'hidecategorization', false );
+               }
+
                $opts->add( 'namespace', '', FormOptions::INTNULL );
                $opts->add( 'invert', false );
                $opts->add( 'associated', false );
@@ -249,6 +254,11 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                                $conds[] = 'rc_user_text != ' . $dbr->addQuotes( $user->getName() );
                        }
                }
+               if ( $this->getConfig()->get( 'RCWatchCategoryMembership' )
+                       && $opts['hidecategorization'] === true
+               ) {
+                       $conds[] = 'rc_type != ' . $dbr->addQuotes( RC_CATEGORIZE );
+               }
 
                // Namespace filtering
                if ( $opts['namespace'] !== '' ) {
@@ -383,7 +393,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * @param FormOptions $opts
         */
-       function setTopText( FormOptions $opts ) {
+       public function setTopText( FormOptions $opts ) {
                // nothing by default
        }
 
@@ -393,7 +403,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * @param FormOptions $opts
         */
-       function setBottomText( FormOptions $opts ) {
+       public function setBottomText( FormOptions $opts ) {
                // nothing by default
        }
 
@@ -405,7 +415,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         * @param FormOptions $opts
         * @return array
         */
-       function getExtraOptions( $opts ) {
+       public function getExtraOptions( $opts ) {
                return array();
        }