*/
class SpecialBlock extends FormSpecialPage {
/** @var User|string|null User to be blocked, as passed either by parameter (url?wpTarget=Foo)
- * or as subpage (Special:Block/Foo) */
+ * or as subpage (Special:Block/Foo)
+ */
protected $target;
/** @var int DatabaseBlock::TYPE_ constant */
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();
}
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 );
$logId = $logEntry->insert();
if ( !empty( $data['Tags'] ) ) {
- $logEntry->setTags( $data['Tags'] );
+ $logEntry->addTags( $data['Tags'] );
}
$logEntry->publish( $logId );