r106129 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106128‎ | r106129 | r106130 >
Date:23:29, 13 December 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 32322) Fix for notice spew from FCKeditor on command-line scripts

Based on investigation from seeing Joerg's patch https://bugzilla.wikimedia.org/attachment.cgi?id=9404

Switched from disabling the entire extension to just skipping the browser compatibility check if running CLI; nothing else should be loading it up after that.
Modified paths:
  • /trunk/extensions/FCKeditor/FCKeditor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FCKeditor/FCKeditor.php
@@ -88,8 +88,15 @@
8989 $wgExtensionMessagesFiles['FCKeditor'] = $dir . 'FCKeditor.i18n.php';
9090
9191 // Initialize FCKeditor and the MediaWiki extension
92 -$fckeditor = new FCKeditor('fake');
93 -$wgFCKEditorIsCompatible = $fckeditor->IsCompatible();
 92+// @fixme something like this should be delayed until it's actually time
 93+// to work with the editor or something.
 94+if (php_sapi_name() == 'cli') {
 95+ // Command line
 96+ $wgFCKEditorIsCompatible = false;
 97+} else {
 98+ $fckeditor = new FCKeditor('fake');
 99+ $wgFCKEditorIsCompatible = $fckeditor->IsCompatible();
 100+}
94101
95102 $oFCKeditorExtension = new FCKeditor_MediaWiki();
96103

Status & tagging log