r56587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56586‎ | r56587 | r56588 >
Date:08:34, 18 September 2009
Author:ialex
Status:deferred
Tags:
Comment:
* unconditionnaly declare globals FlvHandler.php as security vulnerability with register_globals
* removed some useless (and already commented out) parts in FlvHandler.php
* changed extension's type from "parserhook" to "media" in $wgExtensionCredits
* removed ?>
* svn:eol-style native
Modified paths:
  • /trunk/extensions/FlvHandler/FlvHandler.i18n.php (modified) (history)
  • /trunk/extensions/FlvHandler/FlvHandler.php (modified) (history)
  • /trunk/extensions/FlvHandler/FlvImageHandler.php (modified) (history)
  • /trunk/extensions/FlvHandler/README (modified) (history)

Diff [purge]

Index: trunk/extensions/FlvHandler/FlvHandler.i18n.php
@@ -14,5 +14,3 @@
1515 'flvhandler_desc' => 'Allow Flash Video (.flv) files to be used in standard image tags (e.g. <nowiki>[[Image:Movie.flv]]</nowiki>)',
1616 'flv-long-desc' => '(Flash video, $1 × $2 pixels, file size: $3)'
1717 );
18 -
19 -?>
\ No newline at end of file
Property changes on: trunk/extensions/FlvHandler/FlvHandler.i18n.php
___________________________________________________________________
Name: svn:eol-style
2018 + native
Index: trunk/extensions/FlvHandler/FlvHandler.php
@@ -16,7 +16,8 @@
1717 */
1818
1919 // Extension credits that will show up on Special:Version
20 -$wgExtensionCredits['parserhook'][] = array(
 20+$wgExtensionCredits['media'][] = array(
 21+ 'path' => __FILE__,
2122 'name' => 'FLV Image Handler',
2223 'version' => 'r3',
2324 'author' => 'Adam Nielsen',
@@ -45,35 +46,21 @@
4647 );
4748
4849 // Pick one of the above as the converter to use
49 -if (empty($wgFLVConverter)) $wgFLVConverter = 'ffmpeg';
 50+$wgFLVConverter = 'ffmpeg';
5051
5152 // If not in the executable PATH, specify
52 -if (empty($wgFLVConverterPath)) $wgFLVConverterPath = '';
 53+$wgFLVConverterPath = '';
5354
 55+// Path of Flash video playing applet
 56+// Default value is $wgScriptPath . '/extensions/FlvHandler/flowplayer/flowplayer-3.0.3.swf'
 57+$wgFlashPlayer = null;
 58+
5459 // Minimum size for the flash player (width,height). Used to make sure the
5560 // controls don't get all squashed up on really small .flv movies.
56 -if (empty($wgMinFLVSize)) $wgMinFLVSize = array(250, 250);
 61+$wgMinFLVSize = array( 250, 250 );
5762
58 -
59 -//Avoid unstubbing $wgParser on setHook() too early on modern (1.12+) MW versions, as per r35980
60 -/*if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
61 - $wgHooks['ParserFirstCallInit'][] = 'efFLVHandlerParserInit';
62 -} else { // Otherwise do things the old fashioned way
63 - $wgExtensionFunctions[] = 'efFLVHandlerParserInit';
64 -}*/
65 -
6663 $wgHooks['ImageBeforeProduceHTML'][] = 'efFlvHandlerRender';
67 -/*
68 -function efFLVHandlerParserInit()
69 -{
70 - global $wgMessageCache;
7164
72 - // Default (English) message for Image page itself, if one doesn't already exist.
73 - $wgMessageCache->addMessages(array('flv-long-desc' => '(Flash video, $1 × $2 pixels, file size: $3)'));
74 -
75 - return true;
76 -}*/
77 -
7865 // Hook function called just before image code is displayed as HTML. If the
7966 // image is an FLV file, embed a flash player, otherwise ignore it and let
8067 // the default MW code display the image.
@@ -136,5 +123,3 @@
137124 $res = str_replace("\n", ' ', $prefix . $s . $postfix);
138125 return false;
139126 }
140 -
141 -?>
\ No newline at end of file
Property changes on: trunk/extensions/FlvHandler/FlvHandler.php
___________________________________________________________________
Name: svn:eol-style
142127 + native
Property changes on: trunk/extensions/FlvHandler/README
___________________________________________________________________
Name: svn:eol-style
143128 + native
Property changes on: trunk/extensions/FlvHandler/FlvImageHandler.php
___________________________________________________________________
Name: svn:eol-style
144129 + native

Status & tagging log