* @param array $conds Extra conditions for the query
* @param int|bool $year The year to start from. Default: false
* @param int|bool $month The month to start from. Default: false
+ * @param int|bool $day The day to start from. Default: false
* @param string $tagFilter Tag
* @param string $action Specific action (subtype) requested
* @param int $logId Log entry ID, to limit to a single log entry.
*/
public function __construct( $list, $types = [], $performer = '', $title = '',
- $pattern = false, $conds = [], $year = false, $month = false, $tagFilter = '',
- $action = '', $logId = false
+ $pattern = false, $conds = [], $year = false, $month = false, $day = false,
+ $tagFilter = '', $action = '', $logId = false
) {
parent::__construct( $list->getContext() );
$this->mConds = $conds;
$this->limitPerformer( $performer );
$this->limitTitle( $title, $pattern );
$this->limitAction( $action );
- $this->getDateCond( $year, $month );
+ $this->getDateCond( $year, $month, $day );
$this->mTagFilter = $tagFilter;
$this->limitLogId( $logId );
$query = parent::getDefaultQuery();
$query['type'] = $this->typeCGI; // arrays won't work here
$query['user'] = $this->performer;
+ $query['day'] = $this->mDay;
$query['month'] = $this->mMonth;
$query['year'] = $this->mYear;
if ( count( $this->types ) ) {
return $filters;
}
+
+ $wpfilters = $this->getRequest()->getArray( "wpfilters" );
+ $request_filters = $wpfilters === null ? [] : $wpfilters;
+
foreach ( $wgFilterLogTypes as $type => $default ) {
- $hide = $this->getRequest()->getInt( "hide_{$type}_log", $default );
+ $hide = !in_array( $type, $request_filters );
+
+ // Back-compat: Check old URL params if the new param wasn't passed
+ if ( $wpfilters === null ) {
+ $hide = $this->getRequest()->getBool( "hide_{$type}_log", $default );
+ }
$filters[$type] = $hide;
if ( $hide ) {
return $this->mMonth;
}
+ public function getDay() {
+ return $this->mDay;
+ }
+
public function getTagFilter() {
return $this->mTagFilter;
}