r70230 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70229‎ | r70230 | r70231 >
Date:19:28, 31 July 2010
Author:platonides
Status:ok
Tags:
Comment:
Use <?php instead of <? tags
Remove ?> at end of file
Use dirname( __FILE__ ) for the requires.
htmlspecialchars()
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Settings.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_playlists.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_timed_text.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/MvFlv.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Bitstream.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Flac.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Media.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Speex.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Theora.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Vorbis.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/ogg_thumb_insert.php
@@ -10,7 +10,7 @@
1111 * @url http://metavid.org
1212 */
1313
14 - $cur_path = $IP = dirname( __FILE__ );
 14+$cur_path = $IP = dirname( __FILE__ );
1515 // include commandLine.inc from the mediaWiki maintance dir:
1616 require_once ( '../../../maintenance/commandLine.inc' );
1717 require_once ( 'metavid2mvWiki.inc.php' );
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -1,4 +1,4 @@
2 -<?
 2+<?php
33 /**
44 * Global functions and constants for Metavid MediaWiki.
55 *
Index: trunk/extensions/MetavidWiki/includes/MV_Settings.php
@@ -1,4 +1,4 @@
2 -<?
 2+<?php
33 if ( !defined( 'MEDIAWIKI' ) ) die( 1 );
44
55 # ##
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -1,4 +1,4 @@
2 -<?
 2+<?php
33 /*
44 * Created on Jun 28, 2007
55 *
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_timed_text.php
@@ -1,4 +1,4 @@
2 -<?
 2+<?php
33 do_sample_page();
44
55 function do_sample_page(){
@@ -17,10 +17,10 @@
1818 $examples = Array();
1919 //set up tags for easy display:
2020 $roe_url = 'http://metavid.org/w/index.php?title=Special:MvExportStream&stream_name=House_proceeding_07-18-06_00&t=1:23:16/1:23:44&feed_format=roe';
21 -$examples[] = array( 'tag' => '<video roe="'.$roe_url.'" ></video>',
 21+$examples[] = array( 'tag' => '<video roe="' . htmlspecialchars( $roe_url ) . '" ></video>',
2222 'desc' => 'Metavid based ROE file using CMML<br /> <pre>' .
23 - htmlspecialchars('<video roe="'.$roe_url.'" ></video>'). '</pre>'.
24 - '<iframe width="600" height="250" src="'.$roe_url.'" ></iframe>'
 23+ htmlspecialchars('<video roe="' . htmlspecialchars( $roe_url ) . '" ></video>' ) . '</pre>'.
 24+ '<iframe width="600" height="250" src="' . htmlspecialchars( $roe_url ) . '" ></iframe>'
2525 );
2626 $srt_tag = ''.
2727 '<video src="sample_fish.ogg" poster="sample_fish.jpg" duration="26">
@@ -52,6 +52,6 @@
5353 </table>
5454 </body>
5555 </html>
56 -<?
 56+<?php
5757 }
58 -?>
\ No newline at end of file
 58+
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_page.php
@@ -104,4 +104,4 @@
105105 </html>
106106 <?php
107107 }
108 -?>
\ No newline at end of file
 108+
Index: trunk/extensions/MetavidWiki/skins/mv_embed/example_usage/sample_playlists.php
@@ -17,7 +17,7 @@
1818 <h3> Sample Playlists</h3>
1919 The <b>default attributes:</b>:
2020 <span id="default_attr">
21 -<?
 21+<?php
2222 $sample_embed = array();
2323
2424 // playlist tags:
@@ -84,4 +84,4 @@
8585 </html>
8686 <?php
8787 }
88 -?>
 88+
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Bitstream.php
@@ -138,4 +138,3 @@
139139
140140 }
141141
142 -?>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Media.php
@@ -21,7 +21,7 @@
2222 // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2323 // +----------------------------------------------------------------------------+
2424
25 -require_once('File/Ogg/Bitstream.php');
 25+require_once dirname( __FILE__ ) . '/Bitstream.php';
2626
2727 /**
2828 * Parent class for media bitstreams
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Theora.php
@@ -21,7 +21,7 @@
2222 // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2323 // +----------------------------------------------------------------------------+
2424
25 -require_once('File/Ogg/Bitstream.php');
 25+require_once dirname(__FILE__) . '/Bitstream.php';
2626
2727 define( 'OGG_THEORA_IDENTIFICATION_HEADER', 0x80 );
2828 define( 'OGG_THEORA_COMMENTS_HEADER', 0x81 );
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Speex.php
@@ -21,7 +21,7 @@
2222 // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2323 // +----------------------------------------------------------------------------+
2424
25 -require_once('File/Ogg/Media.php');
 25+require_once dirname( __FILE__ ) . '/Media.php';
2626
2727 /**
2828 * @author David Grant <david@grant.org.uk>, Tim Starling <tstarling@wikimedia.org>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Vorbis.php
@@ -21,7 +21,7 @@
2222 // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2323 // +----------------------------------------------------------------------------+
2424
25 -require_once('File/Ogg/Bitstream.php');
 25+require_once dirname( __FILE__ ) . '/Bitstream.php';
2626
2727 /**
2828 * Check number for the first header in a Vorbis stream.
Index: trunk/extensions/MetavidWiki/skins/mv_embed/oggServer/PEAR/File_Ogg/File/Ogg/Flac.php
@@ -21,7 +21,7 @@
2222 // | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
2323 // +----------------------------------------------------------------------------+
2424
25 -require_once('File/Ogg/Media.php');
 25+require_once dirname( __FILE__ ) . '/Media.php';
2626
2727 /**
2828 * @author David Grant <david@grant.org.uk>, Tim Starling <tstarling@wikimedia.org>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/MvFlv.php
@@ -299,4 +299,4 @@
300300 }
301301 }
302302 }
303 -?>
\ No newline at end of file
 303+
Index: trunk/extensions/MetavidWiki/skins/mv_embed/flvServer/mvFlvServer.php
@@ -113,4 +113,4 @@
114114 }
115115 return ($hours*3600) + ($min*60) + $sec;
116116 }
117 -?>
 117+

Status & tagging log