X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Flogging%2FLogEventsList.php;h=c66aa59cc0cf5f7bb813ece4e67e4fe12fa908d6;hb=54b0e8d1562cfae72ff13de1951250fdda499505;hp=a5aa6879e9bf005d15ca6e8ddc424b0c39844f76;hpb=fe25fde55bc9e58741965ad0f2275a7ba2ac77fa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index a5aa6879e9..c66aa59cc0 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -148,7 +148,7 @@ class LogEventsList extends ContextSource { $formDescriptor['date'] = [ 'type' => 'date', 'label-message' => 'date', - 'default' => sprintf( "%04d-%02d-%02d", $year, $month, $day ), + 'default' => $year && $month && $day ? sprintf( "%04d-%02d-%02d", $year, $month, $day ) : '', ]; // Tag filter @@ -174,7 +174,7 @@ class LogEventsList extends ContextSource { $context = new DerivativeContext( $this->getContext() ); $context->setTitle( SpecialPage::getTitleFor( 'Log' ) ); // Remove subpage - $htmlForm = new HTMLForm( $formDescriptor, $context ); + $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $context ); $htmlForm ->setSubmitText( $this->msg( 'logeventslist-submit' )->text() ) ->setMethod( 'get' )