r68306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68305‎ | r68306 | r68307 >
Date:10:51, 20 June 2010
Author:wwalc
Status:deferred
Tags:
Comment:
Fixed issue with rendering invalid preview when "show preview on first edit" is enabled (disabled previews until a better alternative is found).
Modified paths:
  • /trunk/extensions/FCKeditor/FCKeditorEditPage.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FCKeditor/FCKeditorEditPage.body.php
@@ -8,6 +8,9 @@
99 */
1010 public function previewOnOpen() {
1111 global $wgRequest, $wgUser;
 12+ if ( !$wgUser->getOption( 'riched_disable' ) ) {
 13+ return false;
 14+ }
1215 if( $wgRequest->getVal( 'preview' ) == 'yes' ) {
1316 // Explicit override from request
1417 return true;
@@ -31,11 +34,7 @@
3235 function getPreviewText() {
3336 if( !$this->isCssJsSubpage ) {
3437 wfRunHooks( 'EditPageBeforePreviewText', array( &$this, $this->previewOnOpen() ) );
35 - if( $this->previewOnOpen() ) {
36 - $result = html_entity_decode( parent::getPreviewText() );
37 - } else {
38 - $result = parent::getPreviewText();
39 - }
 38+ $result = parent::getPreviewText();
4039 wfRunHooks( 'EditPagePreviewTextEnd', array( &$this, $this->previewOnOpen() ) );
4140 } else {
4241 $result = parent::getPreviewText();

Status & tagging log