X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialPage.php;h=20571d7135a1377d331166eb01ac6f079120946d;hb=ca209473d1e94196a8f9d454bb6f6ab40841f9c8;hp=61630a9bab56194e93442afc63fe519e5be5299e;hpb=f1032105da960c0d4cdd2b15a2404831f5f38775;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 61630a9bab..20571d7135 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -259,11 +259,7 @@ class SpecialPage { */ public static function getTitleFor( $name, $subpage = false, $fragment = '' ) { $name = SpecialPageFactory::getLocalNameFor( $name, $subpage ); - if ( $name ) { - return Title::makeTitle( NS_SPECIAL, $name, $fragment ); - } else { - throw new MWException( "Invalid special page name \"$name\"" ); - } + return Title::makeTitle( NS_SPECIAL, $name, $fragment ); } /** @@ -982,7 +978,13 @@ abstract class FormSpecialPage extends SpecialPage { $form = new HTMLForm( $this->fields, $this->getContext(), $this->getMessagePrefix() ); $form->setSubmitCallback( array( $this, 'onSubmit' ) ); - $form->setWrapperLegendMsg( $this->getMessagePrefix() . '-legend' ); + // If the form is a compact vertical form, then don't output this ugly + // fieldset surrounding it. + // XXX Special pages can setDisplayFormat to 'vform' in alterForm(), but that + // is called after this. + if ( !$form->isVForm() ) { + $form->setWrapperLegendMsg( $this->getMessagePrefix() . '-legend' ); + } $headerMsg = $this->msg( $this->getMessagePrefix() . '-text' ); if ( !$headerMsg->isDisabled() ) { @@ -1227,7 +1229,7 @@ class SpecialListBots extends SpecialRedirectToSpecial { */ class SpecialCreateAccount extends SpecialRedirectToSpecial { function __construct() { - parent::__construct( 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) ); + parent::__construct( 'CreateAccount', 'Userlogin', 'signup', array( 'returnto', 'returntoquery', 'uselang' ) ); } // No reason to hide this link on Special:Specialpages