r66468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66467‎ | r66468 | r66469 >
Date:12:59, 15 May 2010
Author:ialex
Status:ok
Tags:
Comment:
WikiEditor: same as r66467: put javascript variables with other variables
Modified paths:
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php
@@ -443,15 +443,11 @@
444444 basename( dirname( __FILE__ ) ) . '/' . $script['src'], $script['version']
445445 );
446446 }
447 - // Preferences (maybe the UsabilityInitiative class could do most of this for us?)
448 - $wgOut->addScript(
449 - Xml::tags(
450 - 'script',
451 - array( 'type' => $wgJsMimeType ),
452 - 'var wgWikiEditorPreferences = ' . FormatJson::encode( $preferences, true ) . ";\n" .
453 - 'var wgWikiEditorEnabledModules = ' . FormatJson::encode( $enabledModules, true ) . ';'
454 - )
455 - );
 447+ // Preferences
 448+ UsabilityInitiativeHooks::addVariables( array(
 449+ 'wgWikiEditorPreferences' => $preferences,
 450+ 'wgWikiEditorEnabledModules' => $enabledModules,
 451+ ) );
456452 return true;
457453 }
458454

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66467Vector: put javascript variables with other variables and not in their own sc...ialex12:32, 15 May 2010

Status & tagging log