Changeset 12818
- Timestamp:
- 10/20/11 15:36:41 (19 months ago)
- File:
-
- 1 edited
-
branches/Release01x01/core/lib/Foswiki/Render.pm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x01/core/lib/Foswiki/Render.pm
r12817 r12818 325 325 elsif ( $lines->[$i] =~ s/$TRMARK=(["'])(.*?)\1//i ) { 326 326 if ($2) { 327 # In head or foot 327 328 # In head or foot 328 329 if ($inFoot) { 329 #print STDERR "FOOT: $lines->[$i]\n"; 330 331 #print STDERR "FOOT: $lines->[$i]\n"; 330 332 $footLines++; 331 333 } 332 334 else { 333 #print STDERR "HEAD: $lines->[$i]\n"; 335 336 #print STDERR "HEAD: $lines->[$i]\n"; 334 337 $headLines++; 335 338 } 336 339 } 337 340 else { 338 # In body 339 #print STDERR "BODY: $lines->[$i]\n"; 341 342 # In body 343 #print STDERR "BODY: $lines->[$i]\n"; 340 344 $inFoot = 0; 341 345 $headLines = 0; … … 344 348 $i--; 345 349 } 346 $lines->[ $i++] = CGI::start_table(350 $lines->[ $i++ ] = CGI::start_table( 347 351 { 348 352 class => 'foswikiTable', … … 354 358 355 359 if ($headLines) { 356 splice( @$lines, $i++, 0, '<thead>' );360 splice( @$lines, $i++, 0, '<thead>' ); 357 361 splice( @$lines, $i + $headLines, 0, '</thead>' ); 358 $i += $headLines + 1;362 $i += $headLines + 1; 359 363 } 360 364 361 365 if ($footLines) { 362 # Extract the foot and stick it in the table after the head (if any) 363 # WRC says browsers prefer this 366 367 # Extract the foot and stick it in the table after the head (if any) 368 # WRC says browsers prefer this 364 369 my $firstFoot = scalar(@$lines) - $footLines; 365 370 my @foot = splice( @$lines, $firstFoot, $footLines ); 366 unshift(@foot, '<tfoot>');367 push( @foot, '</tfoot>' );368 splice( @$lines, $i, 0, @foot );369 $i += scalar(@foot);371 unshift( @foot, '<tfoot>' ); 372 push( @foot, '</tfoot>' ); 373 splice( @$lines, $i, 0, @foot ); 374 $i += scalar(@foot); 370 375 } 371 376 splice( @$lines, $i, 0, '<tbody>' ); … … 799 804 } 800 805 else { 801 $text = _escapeAutoLinks($text);806 $text = _escapeAutoLinks($text); 802 807 } 803 808 } … … 1015 1020 my $formTopicObject = $this->{ffCache}{ $topicObject->getPath() . $rev }; 1016 1021 unless ($formTopicObject) { 1017 undef $rev unless $rev;1022 undef $rev unless $rev; 1018 1023 $formTopicObject = 1019 1024 Foswiki::Meta->load( $this->{session}, $topicObject->web, … … 1027 1032 $topicObject->topic, '' ); 1028 1033 } 1029 $this->{ffCache}{ $formTopicObject->getPath() . ( $rev||0) } =1034 $this->{ffCache}{ $formTopicObject->getPath() . ( $rev || 0 ) } = 1030 1035 $formTopicObject; 1031 1036 }
Note: See TracChangeset
for help on using the changeset viewer.
