r36361 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36360‎ | r36361 | r36362 >
Date:22:52, 16 June 2008
Author:dale
Status:old
Tags:
Comment:
fixed php short tag portability issue
Modified paths:
  • /branches/MetavidWiki-exp/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/includes/specials/MV_SpecialExport.php (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/cortado_iframe.php (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/sample_page.php (modified) (history)
  • /branches/MetavidWiki-exp/frontend_pages/index.php (modified) (history)

Diff [purge]

Index: branches/MetavidWiki-exp/MetavidWiki/includes/specials/MV_SpecialExport.php
@@ -175,15 +175,14 @@
176176 elementFormDefault="qualified"
177177 attributeFormDefault="unqualified">
178178
179 -
180179 </xs:schema>
181180 */
182181 ?>
183182 <ROE>
184183 <head>
185 - <link id="html_linkback" rel="alternate" type="text/html" href="<?=htmlentities($this->streamPageTitle->getFullURL() )?>" />
186 - <img id="stream_thumb" src="<?=htmlentities($this->mvTitle->getFullStreamImageURL())?>"/>
187 - <title><?=htmlentities($this->mvTitle->getTitleDesc())?></title>
 184+ <link id="html_linkback" rel="alternate" type="text/html" href="<?php echo htmlentities($this->streamPageTitle->getFullURL() )?>" />
 185+ <img id="stream_thumb" src="<?php echo htmlentities($this->mvTitle->getFullStreamImageURL())?>"/>
 186+ <title><?php echo htmlentities($this->mvTitle->getTitleDesc())?></title>
188187 </head>
189188 <body>
190189 <track id="v" provides="video">
@@ -197,7 +196,7 @@
198197 'start="ntp:'.htmlentities($this->mvTitle->getStartTime()).'"'.
199198 ' end="ntp:'.htmlentities($this->mvTitle->getEndTime()).'"':'';
200199 ?>
201 - <mediaSource id="<?=htmlentities($file->getNameKey())?>"<?=$dAttr?> src="<?=$dSrc?>" title="<?=htmlentities($file->get_desc())?>" content-type="<?=htmlentities($file->getContentType())?>" <?=$startendattr?>/>
 200+ <mediaSource id="<?php echo htmlentities($file->getNameKey())?>"<?php echo $dAttr?> src="<?php echo $dSrc?>" title="<?php echo htmlentities($file->get_desc())?>" content-type="<?php echo htmlentities($file->getContentType())?>" <?php echo $startendattr?>/>
202201 <?}?>
203202 </switch>
204203 </track>
@@ -213,7 +212,7 @@
214213 //for now make ht_en the default layer
215214 $default_attr = (strtolower($row->mvd_type)=='ht_en')?'default="true"':'';
216215 ?>
217 - <mediaSource id="<?=$row->mvd_type?>" title="<?=wfMsg($row->mvd_type)?>" <?=$default_attr?> inline="<?=$inline?>" lang="en" content-type="text/cmml" src="<?=htmlentities($clink)?>">
 216+ <mediaSource id="<?php echo $row->mvd_type?>" title="<?php echo wfMsg($row->mvd_type)?>" <?php echo $default_attr?> inline="<?php echo $inline?>" lang="en" content-type="text/cmml" src="<?php echo htmlentities($clink)?>">
218217 <? //output inline cmml (if requested):
219218 if($inline=='true'){
220219 $this->get_stream_cmml(true, $row->mvd_type);
@@ -281,12 +280,12 @@
282281 if($encap)print '<cmml_set>';
283282 //based on: http://trac.annodex.net/wiki/CmmlChanges
284283 foreach($tracks as $role=>$body_string){ ?>
285 - <cmml lang="en" id="<?=$role?>" role="<?=wfMsg($role)?>" xmlns="http://svn.annodex.net/standards/cmml_2_0.dtd">
286 - <<?=$ns?>head>
287 - <<?=$ns?>title><?=wfMsg($role)?></<?=$ns?>title>
288 - <<?=$ns?>description><?=htmlentities(wfMsg($role.'_desc'))?></<?=$ns?>description>
289 - </<?=$ns?>head>
290 - <?=$body_string?>
 284+ <cmml lang="en" id="<?php echo $role?>" role="<?php echo wfMsg($role)?>" xmlns="http://svn.annodex.net/standards/cmml_2_0.dtd">
 285+ <<?php echo $ns?>head>
 286+ <<?php echo $ns?>title><?php echo wfMsg($role)?></<?php echo $ns?>title>
 287+ <<?php echo $ns?>description><?php echo htmlentities(wfMsg($role.'_desc'))?></<?php echo $ns?>description>
 288+ </<?php echo $ns?>head>
 289+ <?php echo $body_string?>
291290 </cmml>
292291 <?
293292 }
@@ -446,9 +445,9 @@
447446 xmlns:dcterms="http://purl.org/dc/terms"
448447 xmlns:gm="http://www.google.com/schemas/gm/1.1">
449448 <channel>
450 - <title><?=$this->getTitle()?></title>
451 - <link><?=$this->getUrl()?></link>
452 - <description><?=$this->getDescription()?></description>
 449+ <title><?php echo $this->getTitle()?></title>
 450+ <link><?php echo $this->getUrl()?></link>
 451+ <description><?php echo $this->getDescription()?></description>
453452 <?
454453 }
455454 function outPutItem($wikiTitle, $desc_html=''){
@@ -483,13 +482,13 @@
484483 $time_desc = ($mvTitle->getTimeDesc())?$mvTitle->getTimeDesc():'';
485484 ?>
486485 <item>
487 - <link><?=mvRSSFeed::xmlEncode($mStreamTitle->getFullUrl())?></link>
488 - <title><?=mvRSSFeed::xmlEncode(
 486+ <link><?php echo mvRSSFeed::xmlEncode($mStreamTitle->getFullUrl())?></link>
 487+ <title><?php echo mvRSSFeed::xmlEncode(
489488 $mvTitle->getStreamNameText() . ' ' . $time_desc)?></title>
490 - <description><?=$desc_xml?></description>
491 - <enclosure type="video/ogg" url="<?=mvRSSFeed::xmlEncode($stream_url)?>"/>
492 - <comments><?=mvRSSFeed::xmlEncode($talkpage->getFullUrl())?></comments>
493 - <media:thumbnail url="<?=mvRSSFeed::xmlEncode($thumb_ref)?>"/>
 489+ <description><?php echo $desc_xml?></description>
 490+ <enclosure type="video/ogg" url="<?php echo mvRSSFeed::xmlEncode($stream_url)?>"/>
 491+ <comments><?php echo mvRSSFeed::xmlEncode($talkpage->getFullUrl())?></comments>
 492+ <media:thumbnail url="<?php echo mvRSSFeed::xmlEncode($thumb_ref)?>"/>
494493 <? /*todo add in alternate streams HQ, lowQ archive.org etc:
495494 <media:group>
496495 <media:content blip:role="Source" expression="full" fileSize="2702848" height="240" isDefault="true" type="video/msvideo" url="http://blip.tv/file/get/Conceptdude-EroticDanceOfANiceBabe266.avi" width="360"></media:content>
Index: branches/MetavidWiki-exp/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -360,7 +360,7 @@
361361 unset($wgHooks['EditFilter'][$k]);
362362 }
363363 }
364 - parent::internalAttemptSave( &$result, $bot = false );
 364+ parent::internalAttemptSave( $result, $bot = false );
365365 }
366366 function showEditForm( $formCallback=null ) {
367367 global $wgOut, $wgUser, $wgLang, $wgContLang, $wgMaxArticleSize;
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/sample_page.php
@@ -100,11 +100,11 @@
101101 if($key>=3)continue;
102102 ?>
103103 <tr>
104 - <td><?=$aval['tag']?></td>
105 - <td valign="top"><b>Sample Embed <?=$key?></b><br />
106 - <?=$aval['desc']?><br />
 104+ <td><?php echo $aval['tag']?></td>
 105+ <td valign="top"><b>Sample Embed <?php echo $key?></b><br />
 106+ <?php echo $aval['desc']?><br />
107107 &lt;-- code used: <br />
108 - <pre> <?= htmlentities($aval['tag'])?></pre>
 108+ <pre> <?php echo htmlentities($aval['tag'])?></pre>
109109 </td>
110110 </tr>
111111 <? //oput a seperator between video and playlist
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/cortado_iframe.php
@@ -68,7 +68,7 @@
6969 <title>cortado_embed</title>
7070 <?if($parent_domain){?>
7171 <script type="text/javascript">
72 - window.DOMAIN = '<?=$parent_domain?>';
 72+ window.DOMAIN = '<?php echo $parent_domain?>';
7373 </script>
7474 <?}?>
7575 <style type="text/css">
@@ -83,22 +83,22 @@
8484 </style></head>
8585 <body>
8686 <?if ($error==''){ ?>
87 - <applet id="<?=$id?>" code="com.fluendo.player.Cortado.class" archive="cortado-ovt-stripped_r34336.jar" width="<?=$width?>" height="<?=$height?>">
88 - <param name="url" value="<?=$media_url?>" />
 87+ <applet id="<?php echo $id?>" code="com.fluendo.player.Cortado.class" archive="cortado-ovt-stripped_r34336.jar" width="<?php echo $width?>" height="<?php echo $height?>">
 88+ <param name="url" value="<?php echo $media_url?>" />
8989 <param name="local" value="false"/>
9090 <param name="keepaspect" value="true" />
91 - <param name="video" value="<?=$audio?>" />
92 - <param name="audio" value="<?=$video?>" />
 91+ <param name="video" value="<?php echo $audio?>" />
 92+ <param name="audio" value="<?php echo $video?>" />
9393 <param name="seekable" value="true" />
9494 <? if($duration!=0){
9595 ?>
96 - <param name="duration" value="<?=$duration?>" />
 96+ <param name="duration" value="<?php echo $duration?>" />
9797 <?
9898 } ?>
9999 <param name="bufferSize" value="200" />
100100 </applet>
101101 <? }else{ ?>
102 - <b>Error:</b> <?=$error?>
 102+ <b>Error:</b> <?php echo $error?>
103103 <?
104104 }
105105 ?>
Index: branches/MetavidWiki-exp/frontend_pages/index.php
@@ -16,27 +16,27 @@
1717 <meta name="keywords" content="" />
1818 <meta name="description" content="" />
1919 <meta name="robots" content="all" />
20 - <link rel="stylesheet" href="<?=$skin_path?>/style.css" type="text/css" media="screen" />
 20+ <link rel="stylesheet" href="<?php echo $skin_path?>/style.css" type="text/css" media="screen" />
2121 <!--[if lt IE 7]>
22 - <link rel="stylesheet" href="<?=$skin_path?>/ie_styles.css" type="text/css" media="screen" />
 22+ <link rel="stylesheet" href="<?php echo $skin_path?>/ie_styles.css" type="text/css" media="screen" />
2323 <![endif]-->
2424 <script type= "text/javascript">/*<![CDATA[*/
25 -var wgScriptPath = "<?=$wgScriptPath?>";
26 -var wgScript = "<?=$wgScript ?>";
27 -var wgServer = "<?=$wgServer ?>";
 25+var wgScriptPath = "<?php echo $wgScriptPath?>";
 26+var wgScript = "<?php echo $wgScript ?>";
 27+var wgServer = "<?php echo $wgServer ?>";
2828 /*]]>*/</script>
29 -<script type="text/javascript" src="<?=$mvextension_path?>/skins/mv_embed/mv_embed.js"></script>
30 -<script type="text/javascript" src="<?=$mvextension_path?>/skins/mv_embed/jquery/jquery-1.2.1.js"></script>
31 -<script type="text/javascript" src="<?=$mvextension_path?>/skins/mv_embed/jquery/plugins/jquery.autocomplete.js"></script>
32 -<script type="text/javascript" src="<?=$mvextension_path?>/skins/mv_embed/jquery/plugins/jquery.hoverIntent.js"></script>
 29+<script type="text/javascript" src="<?php echo $mvextension_path?>/skins/mv_embed/mv_embed.js"></script>
 30+<script type="text/javascript" src="<?php echo $mvextension_path?>/skins/mv_embed/jquery/jquery-1.2.1.js"></script>
 31+<script type="text/javascript" src="<?php echo $mvextension_path?>/skins/mv_embed/jquery/plugins/jquery.autocomplete.js"></script>
 32+<script type="text/javascript" src="<?php echo $mvextension_path?>/skins/mv_embed/jquery/plugins/jquery.hoverIntent.js"></script>
3333
34 -<script type="text/javascript" src="<?=$mvextension_path?>/skins/mv_allpages.js"></script>
 34+<script type="text/javascript" src="<?php echo $mvextension_path?>/skins/mv_allpages.js"></script>
3535 </head>
3636 <body id="frontPage">
3737 <div id="metaLogin"><a href="#">login / create account</a></div>
3838 <div id="frontPageTop">
3939 <div id="searchSplash">
40 - <div class="logo"><a href="#"><img src="<?=$skin_path?>/images/logo.png" alt="Metavid" /></a></div>
 40+ <div class="logo"><a href="#"><img src="<?php echo $skin_path?>/images/logo.png" alt="Metavid" /></a></div>
4141 <p class="tagline">The Open Video archive of the US Congress</p>
4242
4343 <div class="form_search_row">
@@ -74,7 +74,7 @@
7575 <ul class="popularClips">
7676 <li>
7777
78 - <img src="<?=$skin_path ?>/images/img1.jpg" alt="Clip Image" />
 78+ <img src="<?php echo $skin_path ?>/images/img1.jpg" alt="Clip Image" />
7979 <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span>
8080 <span class="description">Senate Floor - June 3, 2008</span>
8181 <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span>
@@ -82,7 +82,7 @@
8383
8484
8585 <li>
86 - <img src="<?=$skin_path ?>/images/img1.jpg" alt="Clip Image" />
 86+ <img src="<?php echo $skin_path ?>/images/img1.jpg" alt="Clip Image" />
8787 <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span>
8888 <span class="description">Senate Floor - June 3, 2008</span>
8989 <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span>
@@ -90,7 +90,7 @@
9191 </li>
9292
9393 <li>
94 - <img src="<?=$skin_path ?>/images/img1.jpg" alt="Clip Image" />
 94+ <img src="<?php echo $skin_path ?>/images/img1.jpg" alt="Clip Image" />
9595 <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span>
9696 <span class="description">Senate Floor - June 3, 2008</span>
9797 <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span>
@@ -98,7 +98,7 @@
9999 </li>
100100
101101 <li class="last_li">
102 - <img src="<?=$skin_path ?>/images/img1.jpg" alt="Clip Image" />
 102+ <img src="<?php echo $skin_path ?>/images/img1.jpg" alt="Clip Image" />
103103 <span class="title"><a href="#">Sen. Barack Obama (D-IL)</a></span>
104104 <span class="description">Senate Floor - June 3, 2008</span>
105105 <span class="keywords">keywords: <a href="#">war</a>, <a href="#">iraq</a>, <a href="#">budget</a></span>

Status & tagging log