Move addition of prefs.js down, to avoid errors when you can't view the form as in...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Jul 2009 14:03:45 +0000 (14:03 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Jul 2009 14:03:45 +0000 (14:03 +0000)
includes/specials/SpecialPreferences.php

index 51ef9c5..adcaead 100644 (file)
@@ -10,9 +10,6 @@ class SpecialPreferences extends SpecialPage {
 
                $this->setHeaders();
                $this->outputHeader();
-
-               $wgOut->addScriptFile( 'prefs.js' );
-
                $wgOut->disallowUserJs();  # Prevent hijacked user scripts from sniffing passwords etc.
 
                if ( $wgUser->isAnon() ) {
@@ -28,6 +25,8 @@ class SpecialPreferences extends SpecialPage {
                        $this->showResetForm();
                        return;
                }
+               
+               $wgOut->addScriptFile( 'prefs.js' );
 
                if ( $wgRequest->getCheck( 'success' ) ) {
                        $wgOut->wrapWikiMsg(