Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / includes / specials / SpecialBlock.php
index f653454..07214af 100644 (file)
@@ -423,6 +423,8 @@ class SpecialBlock extends FormSpecialPage {
                                foreach ( $block->getRestrictions() as $restriction ) {
                                        switch ( $restriction->getType() ) {
                                                case PageRestriction::TYPE:
+                                                       /** @var PageRestriction $restriction */
+                                                       '@phan-var PageRestriction $restriction';
                                                        if ( $restriction->getTitle() ) {
                                                                $pageRestrictions[] = $restriction->getTitle()->getPrefixedText();
                                                        }
@@ -761,9 +763,6 @@ class SpecialBlock extends FormSpecialPage {
                        isset( $data['EditingRestriction'] ) &&
                        $data['EditingRestriction'] === 'partial';
 
-               // Handled by field validator callback
-               // self::validateTargetField( $data['Target'] );
-
                # This might have been a hidden field or a checkbox, so interesting data
                # can come from it
                $data['Confirm'] = !in_array( $data['Confirm'], [ '', '0', null, false ], true );
@@ -1034,7 +1033,7 @@ class SpecialBlock extends FormSpecialPage {
                $logId = $logEntry->insert();
 
                if ( !empty( $data['Tags'] ) ) {
-                       $logEntry->setTags( $data['Tags'] );
+                       $logEntry->addTags( $data['Tags'] );
                }
 
                $logEntry->publish( $logId );