r79420 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79419‎ | r79420 | r79421 >
Date:13:01, 1 January 2011
Author:ialex
Status:deferred
Tags:
Comment:
Using the $mediaWiki global is the best way to get this broken one day
Modified paths:
  • /trunk/extensions/FCKeditor/FCKeditor.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FCKeditor/FCKeditor.body.php
@@ -145,19 +145,19 @@
146146 }
147147
148148 public function onCustomEditor( $article, $user ) {
149 - global $wgRequest, $mediaWiki;
 149+ global $wgRequest, $wgUseExternalEditor;
150150
151 - $action = $mediaWiki->getVal( 'Action' );
 151+ $action = $wgRequest->getVal( 'action', 'view' );
152152
153153 $internal = $wgRequest->getVal( 'internaledit' );
154154 $external = $wgRequest->getVal( 'externaledit' );
155155 $section = $wgRequest->getVal( 'section' );
156156 $oldid = $wgRequest->getVal( 'oldid' );
157 - if( !$mediaWiki->getVal( 'UseExternalEditor' ) || $action == 'submit' || $internal ||
 157+ if( !$wgUseExternalEditor || $action == 'submit' || $internal ||
158158 $section || $oldid || ( !$user->getOption( 'externaleditor' ) && !$external ) ) {
159159 $editor = new FCKeditorEditPage( $article );
160160 $editor->submit();
161 - } elseif( $mediaWiki->getVal( 'UseExternalEditor' ) && ( $external || $user->getOption( 'externaleditor' ) ) ) {
 161+ } elseif( $wgUseExternalEditor && ( $external || $user->getOption( 'externaleditor' ) ) ) {
162162 $mode = $wgRequest->getVal( 'mode' );
163163 $extedit = new ExternalEdit( $article, $mode );
164164 $extedit->edit();

Status & tagging log