Cripple the wiki text stuff for now. It doesn't SEEM dangerous but I haven't tested...
[lhc/web/wiklou.git] / includes / SpecialPreferences.php
index 69a6813..9faba35 100644 (file)
@@ -104,7 +104,7 @@ class PreferencesForm {
                global $wgUser, $wgOut;
 
                if ( $wgUser->isAnon() ) {
-                       $wgOut->errorpage( 'prefsnologin', 'prefsnologintext' );
+                       $wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext' );
                        return;
                }
                if ( wfReadOnly() ) {
@@ -243,6 +243,9 @@ class PreferencesForm {
                        } else {
                                $this->mainPrefsForm( 'error', wfMsg( 'badsig' ) );
                        }
+               } else {
+                       // When no fancy sig used, make sure ~{3,5} get removed.
+                       $this->mNick = $wgParser->cleanSigInSig( $this->mNick );
                }
 
                $wgUser->setOption( 'language', $this->mUserLanguage );
@@ -444,7 +447,7 @@ class PreferencesForm {
         * @access private
         */
        function mainPrefsForm( $status , $message = '' ) {
-               global $wgUser, $wgOut, $wgLang, $wgContLang;
+               global $wgUser, $wgOut, $wgLang, $wgContLang, $wgValidSkinNames;
                global $wgAllowRealName, $wgImageLimits, $wgThumbLimits;
                global $wgDisableLangConversion;
                global $wgEnotifWatchlist, $wgEnotifUserTalk,$wgEnotifMinorEdits;
@@ -691,12 +694,14 @@ class PreferencesForm {
                }
                # </FIXME>
 
-               if ($wgAllowRealName || $wgEnableEmail) {
-                       $wgOut->addHTML("<div class='prefsectiontip'>");
-                       $rn = $wgAllowRealName ? wfMsg('prefs-help-realname') : '';
-                       $em = $wgEnableEmail ? '<br />' .  wfMsg('prefs-help-email') : '';
-                       $wgOut->addHTML( $rn . $em  . '</div>');
-               }
+               # Show little "help" tips for the real name and email address options
+               if( $wgAllowRealName || $wgEnableEmail ) {
+                       if( $wgAllowRealName )
+                               $tips[] = wfMsg( 'prefs-help-realname' );
+                       if( $wgEnableEmail )
+                               $tips[] = wfMsg( 'prefs-help-email' );
+                       $wgOut->addHtml( '<div class="prefsectiontip">' . implode( '<br />', $tips ) . '</div>' );
+               }               
 
                $wgOut->addHTML( '</fieldset>' );
 
@@ -723,7 +728,7 @@ class PreferencesForm {
                $previewtext = wfMsg('skinpreview');
                # Only show members of $wgValidSkinNames rather than
                # $skinNames (skins is all skin names from Language.php)
-               foreach (Skin::getSkinNames() as $skinkey => $skinname ) {
+               foreach ($wgValidSkinNames as $skinkey => $skinname ) {
                        if ( in_array( $skinkey, $wgSkipSkins ) ) {
                                continue;
                        }