com web/news: fix a colspan only if article has no group or no refs: article.php
| From: | Ben Ramsey | Date: | Sat, 22 Jul 2017 00:52:09 +0000 |
| Subject: | com web/news: fix a colspan only if article has no group or no refs: article.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-26178@lists.php.net to get a copy of this message | ||
Commit: f9d062f7ad7c7f5befc10bd370c0a3d5d1ffa496
Author: Arnaud Lemercier <arnaud@wixiweb.fr> Sat, 22 Jul 2017 02:52:09 +0200
Parents: 533374c98c558896fa3a9002883a7df1b708ef2c
Branches: master
Link: http://git.php.net/?p=web/news.git;a=commitdiff;h=f9d062f7ad7c7f5befc10bd370c0a3d5d1ffa496
Log:
fix a colspan only if article has no group or no refs
Changed paths:
M article.php
Diff:
diff --git a/article.php b/article.php
index d34603c..6ee1e42 100644
--- a/article.php
+++ b/article.php
@@ -165,7 +165,7 @@ function start_article($mail, $refsResolved) {
# references
if (!empty($refsResolved)) {
echo ' <td class="headerlabel">References:</td>' .
"\n";
- echo ' <td class="headervalue" colspan="3">';
+ echo ' <td class="headervalue"
'.(empty($mail['headers']['newsgroups']) ?
'colspan="3"' : null).'>';
foreach ($refsResolved as $k => $ref) {
echo "<a href=\"/". urlencode($ref['group']) . '/' .
urlencode($ref['articleId']) ."\">".($k +
1)."</a> ";
}
@@ -174,7 +174,7 @@ function start_article($mail, $refsResolved) {
# groups
if (!empty($mail['headers']['newsgroups'])) {
echo ' <td class="headerlabel">Groups:</td>' .
"\n";
- echo ' <td class="headervalue" colspan="3">';
+ echo ' <td class="headervalue" '.(empty($refsResolved) ?
'colspan="3"' : null).'>';
$r = explode(",", rtrim($mail['headers']['newsgroups']));
while (list($k,$v) = each($r)) {
echo "<a
href=\"/".urlencode($v)."\">".htmlspecialchars($v)."</a> ";