Merge "Allow minor edits to be filtered out of Special:Contributions"
[lhc/web/wiklou.git] / includes / specials / pagers / ContribsPager.php
index 201e4e8..8620eb1 100644 (file)
@@ -64,6 +64,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $this->deletedOnly = !empty( $options['deletedOnly'] );
                $this->topOnly = !empty( $options['topOnly'] );
                $this->newOnly = !empty( $options['newOnly'] );
+               $this->hideMinor = !empty( $options['hideMinor'] );
 
                $year = isset( $options['year'] ) ? $options['year'] : false;
                $month = isset( $options['month'] ) ? $options['month'] : false;
@@ -246,6 +247,10 @@ class ContribsPager extends ReverseChronologicalPager {
                        $condition[] = 'rev_parent_id = 0';
                }
 
+               if ( $this->hideMinor ) {
+                       $condition[] = 'rev_minor_edit = 0';
+               }
+
                return [ $tables, $index, $condition, $join_conds ];
        }