$chunkIndex < 3;
$chunkIndex++, $startChunk = $endChunk, $endChunk += $chunk + 1)
{
-
- $r .= '<td><ul>';
+ $r .= "<td>\n";
+ $atColumnTop = true;
// output all articles in category
for ($index = $startChunk ;
($articles_start_char[$index] != $articles_start_char[$index - 1]) )
{
+ if( $atColumnTop ) {
+ $atColumnTop = false;
+ } else {
+ $r .= "</ul>\n";
+ }
$cont_msg = "";
if ( $articles_start_char[$index] == $prev_start_char )
$cont_msg = wfMsg('listingcontinuesabbrev');
- $r .= "</ul><h3>{$articles_start_char[$index]}$cont_msg</h3>\n<ul>";
+ $r .= "<h3>{$articles_start_char[$index]}$cont_msg</h3>\n<ul>";
$prev_start_char = $articles_start_char[$index];
}
$r .= "<li>{$articles[$index]}</li>";
}
- $r .= '</ul></td>';
+ if( !$atColumnTop ) {
+ $r .= "</ul>\n";
+ }
+ $r .= "</td>\n";
}