r59064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59063‎ | r59064 | r59065 >
Date:13:41, 14 November 2009
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Fixed numerous problems in extensions found with new features of syntaxChecker. Mostly trailing ?>, but also occasional BOMs and leading whitespace
Modified paths:
  • /trunk/extensions/AntiSpoof/equivset.php (modified) (history)
  • /trunk/extensions/AntiSpoof/generateEquivset.php (modified) (history)
  • /trunk/extensions/CentralNotice/svg/run-template.php (modified) (history)
  • /trunk/extensions/CheckUser/cu_log_import.inc (modified) (history)
  • /trunk/extensions/CheckUser/importLog.php (modified) (history)
  • /trunk/extensions/Cite/Cite_body.php (modified) (history)
  • /trunk/extensions/Collection/Collection.templates.php (modified) (history)
  • /trunk/extensions/DumpHTML/SkinOffline.php (modified) (history)
  • /trunk/extensions/DumpHTML/wm-scripts/old/filterNamespaces.php (modified) (history)
  • /trunk/extensions/DumpHTML/wm-scripts/old/queueSlave.php (modified) (history)
  • /trunk/extensions/DumpHTML/wm-scripts/queueController.php (modified) (history)
  • /trunk/extensions/EditSectionHiliteLink/EditSectionHiliteLink.php (modified) (history)
  • /trunk/extensions/FlagPage/FlagPage.body.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Utils.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/Maps_OpenLayersUtils.php (modified) (history)
  • /trunk/extensions/Maps/OpenStreetMap/Maps_OSMUtils.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_EditStreamPage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Hooks.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Image.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_ImageGallery.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MagicWords.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_OggHandler.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_ParserCache.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Settings.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Stream.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_StreamFile.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_StreamImage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_Title.php (modified) (history)
  • /trunk/extensions/OggHandler/OggHandler_body.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/languages/SD_LanguageFa.php (modified) (history)
  • /trunk/extensions/WebDAV/webdav.php (modified) (history)
  • /trunk/extensions/WikiAtHome/ApiWikiAtHome.php (modified) (history)
  • /trunk/extensions/WikiMiniAtlas/missingmapnik.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC.class.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC.i18n.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC_File.class.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC_UDP.class.php (modified) (history)
  • /trunk/extensions/XMLRC/XMLRC_XMPP.class.php (modified) (history)
  • /trunk/extensions/cldr/rebuild.php (modified) (history)

Diff [purge]

Index: trunk/extensions/cldr/rebuild.php
@@ -195,4 +195,3 @@
196196 $realCode = 'zh-hans';
197197 return $realCode;
198198 }
199 -?>
Index: trunk/extensions/FlagPage/FlagPage.body.php
@@ -1,4 +1,3 @@
2 -
32 <?php
43 /*
54 * TODO Test the whole thing, make it safe.
Index: trunk/extensions/MetavidWiki/includes/MV_Stream.php
@@ -248,4 +248,3 @@
249249 'Mv_Stream::updateStreamDB' );
250250 }
251251 }
252 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_StreamFile.php
@@ -140,4 +140,3 @@
141141 return wfMsg( $this->file_desc_msg );
142142 }
143143 }
144 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_EditStreamPage.php
@@ -208,4 +208,3 @@
209209 return $html;
210210 }
211211 }
212 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php
@@ -390,4 +390,3 @@
391391 // @imagedestroy($colors_handle);
392392 return $image;
393393 }
394 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_MagicWords.php
@@ -401,5 +401,3 @@
402402 return $o;
403403 }
404404 }
405 -
406 -?>
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/includes/MV_Settings.php
@@ -219,5 +219,3 @@
220220 } else {
221221 mvInitNamespaces();
222222 }
223 -
224 -?>
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/includes/MV_ImageGallery.php
@@ -153,4 +153,3 @@
154154 return $s;
155155 }
156156 }
157 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_OggHandler.php
@@ -7,4 +7,3 @@
88 class mvOggHandler extends OggHandler{
99
1010 }
11 -?>
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/includes/MV_EditSequencePage.php
@@ -35,4 +35,3 @@
3636 $wgOut->addHTML('</div>');
3737 }
3838 }
39 -?>
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/includes/MV_ParserCache.php
@@ -32,4 +32,3 @@
3333 return parent::getKey( $article, $user ) . $this->extraKeyOpt . $this->addToKey;
3434 }
3535 }
36 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_Title.php
@@ -516,4 +516,3 @@
517517 }
518518
519519 }
520 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_Image.php
@@ -15,4 +15,3 @@
1616 class MV_Image extends Image {
1717
1818 }
19 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_Hooks.php
@@ -465,5 +465,3 @@
466466 return $MV_Overlay->edit_preview_form_html($_POST['title'], $_POST['mvd_id']);
467467 }*/
468468
469 -
470 -?>
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -856,4 +856,3 @@
857857 return wfMsg( 'mv_viewprevnext', $plink, $nlink );
858858 }
859859 }
860 -?>
\ No newline at end of file
Index: trunk/extensions/OggHandler/OggHandler_body.php
@@ -971,5 +971,3 @@
972972 return $values;
973973 }
974974 }
975 -
976 -?>
\ No newline at end of file
Index: trunk/extensions/XMLRC/XMLRC.class.php
@@ -123,4 +123,3 @@
124124 abstract class XMLRC_Transport {
125125 abstract function send( $xml );
126126 }
127 -?>
\ No newline at end of file
Index: trunk/extensions/XMLRC/XMLRC_XMPP.class.php
@@ -66,4 +66,3 @@
6767 if ( $do_disconnect ) $this->disconnect();
6868 }
6969 }
70 -?>
\ No newline at end of file
Index: trunk/extensions/XMLRC/XMLRC_UDP.class.php
@@ -38,4 +38,3 @@
3939 if ( $do_disconnect ) $this->disconnect();
4040 }
4141 }
42 -?>
\ No newline at end of file
Index: trunk/extensions/XMLRC/XMLRC.i18n.php
@@ -8,4 +8,3 @@
99 $messages['de'] = array(
1010 'xmlrc-desc' => 'Verschickt benachrichtigungen über Änderungen als XML, über UDP, Jabber oder andere Protokolle.',
1111 );
12 -?>
\ No newline at end of file
Index: trunk/extensions/XMLRC/XMLRC.php
@@ -55,5 +55,3 @@
5656 $wgAutoloadClasses[ 'XMLRC_File' ] = "$dir/XMLRC_File.class.php";
5757
5858 $wgHooks['RecentChange_save'][] = 'XMLRC::RecentChange_save';
59 -
60 -?>
\ No newline at end of file
Index: trunk/extensions/XMLRC/XMLRC_File.class.php
@@ -39,4 +39,3 @@
4040 if ( $do_close ) $this->close();
4141 }
4242 }
43 -?>
\ No newline at end of file
Index: trunk/extensions/Maps/Maps_Utils.php
@@ -1,4 +1,4 @@
2 -<?php
 2+<?php
33
44 /**
55 * A class that holds static helper functions for common functionality that is map-spesific.
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayersUtils.php
@@ -120,5 +120,3 @@
121121 }
122122
123123 }
124 -
125 -?>
\ No newline at end of file
Index: trunk/extensions/Maps/OpenStreetMap/Maps_OSMUtils.php
@@ -114,5 +114,3 @@
115115 }
116116
117117 }
118 -
119 -?>
\ No newline at end of file
Index: trunk/extensions/WebDAV/webdav.php
@@ -59,4 +59,3 @@
6060
6161 $mediaWiki->restInPeace( $wgLoadBalancer );
6262 */
63 -?>
Index: trunk/extensions/CheckUser/cu_log_import.inc
@@ -90,5 +90,3 @@
9191 }
9292 echo "...cu_log table populated: $matched matched rows, $unmatched discarded rows\n";
9393 }
94 -
95 -?>
\ No newline at end of file
Index: trunk/extensions/CheckUser/importLog.php
@@ -52,5 +52,3 @@
5353 echo " --test Test log parser without doing local lookups\n";
5454 echo "\n";
5555 }
56 -
57 -?>
\ No newline at end of file
Index: trunk/extensions/SemanticDrilldown/languages/SD_LanguageFa.php
@@ -27,5 +27,3 @@
2828 );
2929
3030 }
31 -
32 -?>
Index: trunk/extensions/WikiMiniAtlas/missingmapnik.php
@@ -44,4 +44,3 @@
4545 }
4646 else echo "filename format error";
4747 }
48 -?>
Index: trunk/extensions/Cite/Cite_body.php
@@ -938,5 +938,3 @@
939939
940940 /**#@-*/
941941 }
942 -
943 -?>
Index: trunk/extensions/EditSectionHiliteLink/EditSectionHiliteLink.php
@@ -54,5 +54,3 @@
5555
5656 // Register css add script hook
5757 $wgHooks['BeforePageDisplay'][] = 'EditSectionHiliteLinkHooks::addCSS';
58 -
59 -?>
\ No newline at end of file
Index: trunk/extensions/AntiSpoof/generateEquivset.php
@@ -127,7 +127,7 @@
128128 # Map output
129129 $output = var_export( $setsByChar, true );
130130 $output = str_replace( "\n", $endl, $output );
131 -fwrite( $outputFile, '$equivset = ' . "$output$endl?" . ">$endl" );
 131+fwrite( $outputFile, '$equivset = ' . "$output$endl" );
132132
133133 # Serialized codepoint map
134134 $codepointMap = array();
Index: trunk/extensions/AntiSpoof/equivset.php
@@ -8961,4 +8961,3 @@
89628962 'ㅣ' => 'ㅣ',
89638963 'ᅵ' => 'ㅣ',
89648964 )
8965 -?>
Index: trunk/extensions/DumpHTML/SkinOffline.php
@@ -241,4 +241,3 @@
242242 wfRestoreWarnings();
243243 }
244244 }
245 -?>
Index: trunk/extensions/DumpHTML/wm-scripts/old/filterNamespaces.php
@@ -31,5 +31,3 @@
3232 print $line;
3333 }
3434 }
35 -
36 -?>
Index: trunk/extensions/DumpHTML/wm-scripts/old/queueSlave.php
@@ -43,5 +43,3 @@
4444 sleep( 5 );
4545 }
4646 }
47 -
48 -?>
Index: trunk/extensions/DumpHTML/wm-scripts/queueController.php
@@ -232,5 +232,3 @@
233233 $lang = str_replace( 'wiki', '', $wiki );
234234 print "Starting language $lang\n";
235235 }
236 -
237 -?>
Index: trunk/extensions/CentralNotice/svg/run-template.php
@@ -144,5 +144,3 @@
145145
146146 }
147147 echo "done.\n";
148 -
149 -?>
\ No newline at end of file
Index: trunk/extensions/WikiAtHome/ApiWikiAtHome.php
@@ -321,5 +321,3 @@
322322 return __CLASS__ . ': $Id: ApiWikiAtHome.php 51812 2009-06-12 23:45:20Z dale $';
323323 }
324324 }
325 -
326 -?>
\ No newline at end of file
Index: trunk/extensions/Collection/Collection.templates.php
@@ -523,4 +523,3 @@
524524 return $out;
525525 }
526526 }
527 -?>

Follow-up revisions

RevisionCommit summaryAuthorDate
r59145Fix parse error: syntax error, unexpected $end in extensions/AntiSpoof/equivs...ialex20:41, 16 November 2009

Comments

#Comment by Nikerabbit (talk | contribs)   22:17, 14 November 2009
-fwrite( $outputFile, '$equivset = ' . "$output$endl?" . ">$endl" );
+fwrite( $outputFile, '$equivset = ' . "$output$endl" );

????

#Comment by MaxSem (talk | contribs)   22:58, 14 November 2009

What's wrong with this diff? It removes a trailing ?> from autogenerated tag, you can see the result of this change in equivset.php

#Comment by Nikerabbit (talk | contribs)   08:19, 15 November 2009

Looked suspicious and wasn't mentioned in the message.

Status & tagging log