Fix log type and name in revdeleted messages: suppressions are stored in the suppress...
[lhc/web/wiklou.git] / includes / Preferences.php
index 96f49b3..4cbeaf4 100644 (file)
@@ -574,7 +574,7 @@ class Preferences {
        }
        
        static function editingPreferences( $user, &$defaultPreferences ) {
-               global $wgUseExternalEditor;
+               global $wgUseExternalEditor, $wgLivePreview;
 
                ## Editing #####################################
                $defaultPreferences['cols'] =
@@ -663,12 +663,14 @@ class Preferences {
                                        'section' => 'editing/advancedediting',
                                        'label-message' => 'tog-forceeditsummary',
                                );
-               $defaultPreferences['uselivepreview'] =
-                               array(
-                                       'type' => 'toggle',
-                                       'section' => 'editing/advancedediting',
-                                       'label-message' => 'tog-uselivepreview',
-                               );
+               if ( $wgLivePreview ) {
+                       $defaultPreferences['uselivepreview'] =
+                                       array(
+                                               'type' => 'toggle',
+                                               'section' => 'editing/advancedediting',
+                                               'label-message' => 'tog-uselivepreview',
+                                       );
+               }
        }
        
        static function rcPreferences( $user, &$defaultPreferences ) {