X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flogging%2FLogEventsList.php;h=3fd52af01b86b6a543c522cbcf39500edb103938;hb=7f2f49ad2368ae27f2d4db69b44c5f997197725e;hp=a5aa6879e9bf005d15ca6e8ddc424b0c39844f76;hpb=73380233aab4e2009acdbaa8d6ac928c499408af;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index a5aa6879e9..3fd52af01b 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' ) @@ -692,6 +692,8 @@ class LogEventsList extends ContextSource { $s .= $loglist->beginLogEventsList() . $logBody . $loglist->endLogEventsList(); + // add styles for change tags + $context->getOutput()->addModuleStyles( 'mediawiki.interface.helpers.styles' ); } elseif ( $showIfEmpty ) { $s = Html::rawElement( 'div', [ 'class' => 'mw-warning-logempty' ], $context->msg( 'logempty' )->parse() );