r52064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52063‎ | r52064 | r52065 >
Date:18:23, 17 June 2009
Author:raymond
Status:ok
Tags:
Comment:
* Show user preference 'Use live preview' if $wgLivePreview is enabled only
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Preferences.php
@@ -574,7 +574,7 @@
575575 }
576576
577577 static function editingPreferences( $user, &$defaultPreferences ) {
578 - global $wgUseExternalEditor;
 578+ global $wgUseExternalEditor, $wgLivePreview;
579579
580580 ## Editing #####################################
581581 $defaultPreferences['cols'] =
@@ -663,12 +663,14 @@
664664 'section' => 'editing/advancedediting',
665665 'label-message' => 'tog-forceeditsummary',
666666 );
667 - $defaultPreferences['uselivepreview'] =
668 - array(
669 - 'type' => 'toggle',
670 - 'section' => 'editing/advancedediting',
671 - 'label-message' => 'tog-uselivepreview',
672 - );
 667+ if ( $wgLivePreview ) {
 668+ $defaultPreferences['uselivepreview'] =
 669+ array(
 670+ 'type' => 'toggle',
 671+ 'section' => 'editing/advancedediting',
 672+ 'label-message' => 'tog-uselivepreview',
 673+ );
 674+ }
673675 }
674676
675677 static function rcPreferences( $user, &$defaultPreferences ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -186,6 +186,7 @@
187187 * (bug 19170) Special:Version should follow the content language direction
188188 * (bug 19160) maintenance/purgeOldText.inc is now compatible with PostgreSQL
189189 * Fixed performance regression in "bad image list" feature
 190+* Show user preference 'Use live preview' if $wgLivePreview is enabled only
190191
191192 == API changes in 1.16 ==
192193

Status & tagging log