Merge "Improve logging of exceptions which are not thrown but attached to context"
[lhc/web/wiklou.git] / includes / specials / SpecialBlock.php
index 7e02974..c18ae0e 100644 (file)
@@ -127,15 +127,7 @@ class SpecialBlock extends FormSpecialPage {
         */
        protected function getFormFields() {
                global $wgBlockAllowsUTEdit;
-               if ( !wfMessage( 'ipbreason-dropdown' )->inContentLanguage()->isDisabled() ) {
-                       $reasonsList = Xml::getArrayFromWikiTextList(
-                               wfMessage( 'ipbreason-dropdown' )->inContentLanguage()->text()
-                       );
-                       $this->getOutput()->addModules( 'mediawiki.reasonSuggest' );
-                       $this->getOutput()->addJsConfigVars( [
-                               'reasons' => $reasonsList
-                       ] );
-               }
+
                $user = $this->getUser();
 
                $suggestedDurations = self::getSuggestedDurations();
@@ -836,9 +828,13 @@ class SpecialBlock extends FormSpecialPage {
                $blockIds = array_merge( [ $status['id'] ], $status['autoIds'] );
                $logEntry->setRelations( [ 'ipb_id' => $blockIds ] );
                $logId = $logEntry->insert();
+
+               if ( !empty( $data['Tags'] ) ) {
+                       $logEntry->setTags( $data['Tags'] );
+               }
+
                $logEntry->publish( $logId );
 
-               # Report to the user
                return true;
        }