Open nomand opened 8 years ago
sheet.php has this code twice:
for( $i = 0; $i < count($histories); $i++ ) { $header = $text ="";
foreach( $histories[$i]['history']->children() as $child )
{
if( $child->getName() == "header" ) $header = $child;
else if( $child->getName() == "text" ) $text = $child;
}
echo '<strong>'.$header.'</strong><p>'.$text.'</p>';
}
Except second block uses curly braces:
for( $i = 0; $i < count($histories); $i++ ) { $header = $text ="";
foreach( $histories[$i]['history']->children() as $child )
{
if( $child->getName() == "header" ) { $header = $child; }
else if( $child->getName() == "text" ) { $text = $child; }
}
echo '<strong>'.$header.'</strong><p>'.$text.'</p>';
}
I removed the second block, and it renders the page properly. Not sure if removing it breaks other stuff, but it definitely fixes the content duplicate issue.
Seriously, how the hell did this not get noticed?
When when using
<histories><history><header></><text></></></>
format in a game sheet, all paragraphs output twice.