Some comments for Preferences.php
[lhc/web/wiklou.git] / includes / Preferences.php
index cb91153..6d6e581 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Form to edit user perferences.
+ * Form to edit user preferences.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -546,18 +546,6 @@ class Preferences {
                                'section' => 'rendering/skin',
                        );
                }
-
-               $selectedSkin = $user->getOption( 'skin' );
-               if ( in_array( $selectedSkin, array( 'cologneblue', 'standard' ) ) ) {
-                       $settings = array_flip( $context->getLanguage()->getQuickbarSettings() );
-
-                       $defaultPreferences['quickbar'] = array(
-                               'type' => 'radio',
-                               'options' => $settings,
-                               'section' => 'rendering/skin',
-                               'label-message' => 'qbsettings',
-                       );
-               }
        }
 
        /**
@@ -733,7 +721,7 @@ class Preferences {
         * @param $defaultPreferences Array
         */
        static function editingPreferences( $user, IContextSource $context, &$defaultPreferences ) {
-               global $wgUseExternalEditor, $wgAllowUserCssPrefs;
+               global $wgAllowUserCssPrefs;
 
                ## Editing #####################################
                $defaultPreferences['cols'] = array(
@@ -806,19 +794,6 @@ class Preferences {
                        );
                }
 
-               if ( $wgUseExternalEditor ) {
-                       $defaultPreferences['externaleditor'] = array(
-                               'type' => 'toggle',
-                               'section' => 'editing/advancedediting',
-                               'label-message' => 'tog-externaleditor',
-                       );
-                       $defaultPreferences['externaldiff'] = array(
-                               'type' => 'toggle',
-                               'section' => 'editing/advancedediting',
-                               'label-message' => 'tog-externaldiff',
-                       );
-               }
-
                $defaultPreferences['forceeditsummary'] = array(
                        'type' => 'toggle',
                        'section' => 'editing/advancedediting',
@@ -830,6 +805,13 @@ class Preferences {
                        'section' => 'editing/advancedediting',
                        'label-message' => 'tog-uselivepreview',
                );
+
+               $defaultPreferences['useeditwarning'] = array(
+                       'type' => 'toggle',
+                       'section' => 'editing/advancedediting',
+                       'label-message' => 'tog-useeditwarning',
+               );
+
        }
 
        /**
@@ -1244,7 +1226,7 @@ class Preferences {
         * @param $user User
         * @param $context IContextSource
         * @param $formClass string
-        * @param $remove Array: array of items to remove
+        * @param array $remove array of items to remove
         * @return HtmlForm
         */
        static function getFormObject( $user, IContextSource $context, $formClass = 'PreferencesForm', array $remove = array() ) {
@@ -1278,6 +1260,7 @@ class Preferences {
        }
 
        /**
+        * @param $context IContextSource
         * @return array
         */
        static function getTimezoneOptions( IContextSource $context ) {
@@ -1382,6 +1365,8 @@ class Preferences {
        }
 
        /**
+        * Handle the form submission if everything validated properly
+        *
         * @param $formData
         * @param $form PreferencesForm
         * @param $entryPoint string
@@ -1473,7 +1458,7 @@ class Preferences {
         *
         * @deprecated in 1.20; use User::setEmailWithConfirmation() instead.
         * @param $user User
-        * @param $newaddr string New email address
+        * @param string $newaddr New email address
         * @return Array (true on success or Status on failure, info string)
         */
        public static function trySetUserEmail( User $user, $newaddr ) {