r64372 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64371‎ | r64372 | r64373 >
Date:00:19, 30 March 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed misuse of $wgOut in Storysubmission and fixed typo from r64368
Modified paths:
  • /trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php
@@ -17,7 +17,7 @@
1818 class TagStoryboard {
1919
2020 public static function render( $input, $args, $parser, $frame ) {
21 - global $wgOut, $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight;
 21+ global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight;
2222
2323 // TODO: Combine+minfiy JS files, add switch to use combined+minified version
2424 $parser->getOutput()->addHeadItem(
@@ -25,7 +25,7 @@
2626 <link rel="stylesheet" href="$egStoryboardScriptPath/storyboard.css?$wgStyleVersion" />
2727 <script type="$wgJsMimeType" src="$wgStylePath/common/jquery.min.js?$wgStyleVersion"></script>
2828 <script type="$wgJsMimeType" src="$egStoryboardScriptPath/tags/Storyboard/jquery.ajaxscroll.js?$wgStyleVersion"></script>
29 - <script type="$wgJsMimeType" src="$egStoryboardScriptPath/tags/Storyboard/storyboard.js?$wgStyleVersion"></script
 29+ <script type="$wgJsMimeType" src="$egStoryboardScriptPath/tags/Storyboard/storyboard.js?$wgStyleVersion"></script>
3030 EOT
3131 );
3232
Index: trunk/extensions/Storyboard/tags/Storysubmission/Storysubmission_body.php
@@ -44,18 +44,18 @@
4545 * TODO: any sort of client side validation?
4646 */
4747 private static function getFrom( $parser, array $args ) {
48 - global $wgOut, $wgUser, $wgJsMimeType, $egStoryboardScriptPath, $egStorysubmissionWidth, $egStoryboardMaxStoryLen, $egStoryboardMinStoryLen;
 48+ global $wgUser, $wgStyleVersion, $wgJsMimeType, $egStoryboardScriptPath, $egStorysubmissionWidth, $egStoryboardMaxStoryLen, $egStoryboardMinStoryLen;
4949
50 - $wgOut->addStyle( $egStoryboardScriptPath . '/storyboard.css' );
51 - $wgOut->addScriptFile( $egStoryboardScriptPath . '/storyboard.js' );
5250 // Loading a seperate JS file would be overkill for just these 3 lines, and be bad for performance.
53 - $wgOut->addScript(
 51+ $parser->getOutput()->addHeadItem(
5452 <<<EOT
 53+ <link rel="stylesheet" href="$egStoryboardScriptPath/storyboard.css?$wgStyleVersion" />
 54+ <script type="$wgJsMimeType" src="$egStoryboardScriptPath/storyboard.js?$wgStyleVersion"></script>
5555 <script type="$wgJsMimeType"> /*<![CDATA[*/
5656 addOnloadHook( function() {
5757 document.getElementById( 'storysubmission-button' ).disabled = true;
5858 } );
59 - /*]]>*/ </script>
 59+ /*]]>*/ </script>
6060 EOT
6161 );
6262

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64368Fixed several issues with storyboard tagjeroendedauw23:49, 29 March 2010

Status & tagging log