r64799 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64798‎ | r64799 | r64800 >
Date:13:10, 9 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added language parameter to storyboard tag. Need to further implement though.
Modified paths:
  • /trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php
@@ -29,7 +29,8 @@
3030 * TODO: add language filter
3131 */
3232 public static function render( $input, array $args, Parser $parser, $frame ) {
33 - global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight;
 33+ global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $wgContLanguageCode;
 34+ global $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight;
3435
3536 // TODO: Combine+minfiy JS files, add switch to use combined+minified version
3637 $parser->getOutput()->addHeadItem(
@@ -44,6 +45,13 @@
4546 $width = StoryboardUtils::getDimension( $args, 'width', $egStoryboardWidth );
4647 $height = StoryboardUtils::getDimension( $args, 'height', $egStoryboardHeight );
4748
 49+ $languages = Language::getLanguageNames();
 50+ if ( array_key_exists( 'language', $args ) && array_key_exists( $args['language'], $languages ) ) {
 51+ $language = $args['language'];
 52+ } else {
 53+ $language = $wgContLanguageCode;
 54+ }
 55+
4856 $output = Html::element( 'div', array(
4957 'class' => 'storyboard',
5058 'style' => "height: $height; width: $width;"

Status & tagging log