Merge "Change special page group for BookSources"
[lhc/web/wiklou.git] / includes / specials / SpecialBlock.php
index 3b73a37..1aa8006 100644 (file)
@@ -221,6 +221,9 @@ class SpecialBlock extends FormSpecialPage {
 
                $this->maybeAlterFormDefaults( $a );
 
+               // Allow extensions to add more fields
+               wfRunHooks( 'SpecialBlockModifyFormFields', array( $this, &$a ) );
+
                return $a;
        }
 
@@ -293,14 +296,14 @@ class SpecialBlock extends FormSpecialPage {
                if ( $this->requestedHideUser ) {
                        $fields['Confirm']['type'] = 'check';
                        unset( $fields['Confirm']['default'] );
-                       $this->preErrors[] = 'ipb-confirmhideuser';
+                       $this->preErrors[] = array( 'ipb-confirmhideuser', 'ipb-confirmaction' );
                }
 
                # Or if the user is trying to block themselves
                if ( (string)$this->target === $this->getUser()->getName() ) {
                        $fields['Confirm']['type'] = 'check';
                        unset( $fields['Confirm']['default'] );
-                       $this->preErrors[] = 'ipb-blockingself';
+                       $this->preErrors[] = array( 'ipb-blockingself', 'ipb-confirmaction' );
                }
        }
 
@@ -627,7 +630,7 @@ class SpecialBlock extends FormSpecialPage {
                        if ( $target === $performer->getName() &&
                                ( $data['PreviousTarget'] !== $target || !$data['Confirm'] )
                        ) {
-                               return array( 'ipb-blockingself' );
+                               return array( 'ipb-blockingself', 'ipb-confirmaction' );
                        }
                } elseif ( $type == Block::TYPE_RANGE ) {
                        $userId = 0;
@@ -675,7 +678,7 @@ class SpecialBlock extends FormSpecialPage {
                                # Disallow hiding users with many edits for performance.
                                return array( 'ipb_hide_invalid' );
                        } elseif ( !$data['Confirm'] ) {
-                               return array( 'ipb-confirmhideuser' );
+                               return array( 'ipb-confirmhideuser', 'ipb-confirmaction' );
                        }
                }