Update psr/log to v1.0.2
[lhc/web/wiklou.git] / includes / specialpage / ChangesListSpecialPage.php
index 2051948..00439a1 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  * @ingroup SpecialPage
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * Special page which uses a ChangesList to show query results.
@@ -77,6 +78,14 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                $this->webOutput( $rows, $opts );
 
                $rows->free();
+
+               if ( $this->getConfig()->get( 'EnableWANCacheReaper' ) ) {
+                       // Clean up any bad page entries for titles showing up in RC
+                       DeferredUpdates::addUpdate( new WANCacheReapUpdate(
+                               $this->getDB(),
+                               LoggerFactory::getInstance( 'objectcache' )
+                       ) );
+               }
        }
 
        /**
@@ -140,6 +149,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                $opts = new FormOptions();
 
                $opts->add( 'hideminor', false );
+               $opts->add( 'hidemajor', false );
                $opts->add( 'hidebots', false );
                $opts->add( 'hidehumans', false );
                $opts->add( 'hideanons', false );
@@ -235,7 +245,10 @@ abstract class ChangesListSpecialPage extends SpecialPage {
 
                // Toggles
                if ( $opts['hideminor'] ) {
-                       $conds['rc_minor'] = 0;
+                       $conds[] = 'rc_minor = 0';
+               }
+               if ( $opts['hidemajor'] ) {
+                       $conds[] = 'rc_minor = 1';
                }
                if ( $opts['hidebots'] ) {
                        $conds['rc_bot'] = 0;