cvs: php-news-web / article.php
| From: | Jim Winstead | Date: | Thu, 05 Jul 2001 20:08:30 +0000 |
| Subject: | cvs: php-news-web / article.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-5235@lists.php.net to get a copy of this message | ||
jimw Thu Jul 5 16:08:30 2001 EDT
Modified files:
/php-news-web article.php
Log:
handle in-reply-to in addition to references, split newsgroups properly
Index: php-news-web/article.php
diff -u php-news-web/article.php:1.5 php-news-web/article.php:1.6
--- php-news-web/article.php:1.5 Thu Jul 5 14:20:03 2001
+++ php-news-web/article.php Thu Jul 5 16:08:29 2001
@@ -71,10 +71,11 @@
echo '<tr><td class="headerlabel">Subject:</td><td
class="headervalue"
colspan="3">'.format_subject($headers["subject"])."</td></tr>\n";
echo "<tr>";
# references
- if ($headers["references"]) {
+ if ($headers["references"] || $headers["in-reply-to"]) {
echo '<td class="headerlabel">References:</td><td
class="headervalue">';
- $r = explode(" ", $headers["references"]);
+ $r = explode(" ", $headers["references"]."
".$headers["in-reply-to"]);
while (list($k,$v) = each($r)) {
+ if (!$v) continue;
echo "<a
href=\"article.php?group=$group&article=".htmlspecialchars(urlencode($v))."\">".($k+1)."</a>\n";
}
echo "</td>\n";
@@ -82,7 +83,7 @@
# groups
if ($headers["newsgroups"]) {
echo '<td class="headerlabel">Groups:</td><td
class="headervalue">';
- $r = explode(" ", chop($headers["newsgroups"]));
+ $r = explode(",", chop($headers["newsgroups"]));
while (list($k,$v) = each($r)) {
echo "<a
href=\"group.php?group=".htmlspecialchars(urlencode($v))."\">".htmlspecialchars($v)."</a>\n";
}