r85941 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85940‎ | r85941 | r85942 >
Date:11:24, 13 April 2011
Author:diebuche
Status:ok
Tags:
Comment:
Followup to r85922: Fix STRICT error, rmv redundant whitespace
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -877,7 +877,8 @@
878878 if ( empty($last_row) ) {
879879 $last_row = NULL;
880880 }
881 - $o = $this->printTableHtml( array_pop($tables) ) . $line;
 881+ $curtable = array_pop($tables);
 882+ $o = $this->printTableHtml( $curtable ) . $line;
882883
883884 if ( count($tables) > 0 ) {
884885 $table =& $this->last($tables);
@@ -905,11 +906,11 @@
906907 if( $attributes !== '') {
907908 $current_row['attributes'] = $attributes;
908909 }
909 -
 910+
910911 } else if ( $first_chars === '|+' ) {
911912 // a table caption
912913 $line = substr ( $line , 2 );
913 -
 914+
914915 $c = $this->getCellAttr($line , 'caption');
915916 $table['caption'] = array();
916917 $table['caption']['content'] = $c[0];
@@ -952,24 +953,25 @@
953954 unset($c);
954955 }
955956 $output =& $current_element['content'];
956 -
 957+
957958 } else {
958959 $output .= $outLine."\n";
959960 }
960961 }
961 -
 962+
962963 # Remove trailing line-ending (b/c)
963964 if ( substr( $out, -1 ) === "\n" ) {
964965 $out = substr( $out, 0, -1 );
965966 }
966 -
 967+
967968 #Close any unclosed tables
968969 if (isset($tables) && count($tables) > 0 ) {
969970 for ($i = 0; $i < count($tables); $i++) {
970 - $out .= $this->printTableHtml( array_pop($tables) );
 971+ $curtable = array_pop($tables);
 972+ $out .= $this->printTableHtml( $curtable );
971973 }
972974 }
973 -
 975+
974976 wfProfileOut( __METHOD__ );
975977
976978 return $out;
@@ -1033,7 +1035,7 @@
10341036 $last_section = '';
10351037 $empty = true;
10361038 $simple = true;
1037 -
 1039+
10381040 //If we only have tbodies, mark table as simple
10391041 for($i = 0; isset($t[$i]); $i++ ) {
10401042 if ( !count( $t[$i]) ) continue;
@@ -3531,7 +3533,7 @@
35323534 # Update fetched file title
35333535 $title = $file->getTitle();
35343536 }
3535 - return array( $file, $title );
 3537+ return array( $file, $title );
35363538 }
35373539
35383540 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85922diebuche21:27, 12 April 2011

Status & tagging log