cvs: php-news-web / article.php
| From: | Jim Winstead | Date: | Sun, 08 Jul 2001 20:35:39 +0000 |
| Subject: | cvs: php-news-web / article.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-5378@lists.php.net to get a copy of this message | ||
jimw Sun Jul 8 16:35:39 2001 EDT
Modified files:
/php-news-web article.php
Log:
only use references header if it exists, otherwise try in-reply-to. don't use both, and only
uses things that look like message-ids
Index: php-news-web/article.php
diff -u php-news-web/article.php:1.7 php-news-web/article.php:1.8
--- php-news-web/article.php:1.7 Sat Jul 7 04:03:59 2001
+++ php-news-web/article.php Sun Jul 8 16:35:38 2001
@@ -72,11 +72,14 @@
echo "<tr>";
# references
if ($headers["references"] || $headers["in-reply-to"]) {
+ $ref = $headers["references"] ? $headers["references"] :
$headers["in-reply-to"];
echo '<td class="headerlabel">References:</td><td
class="headervalue">';
- $r = explode(" ", $headers["references"]."
".$headers["in-reply-to"]);
+ $r = explode(" ", $ref);
+ $c = 0;
while (list($k,$v) = each($r)) {
if (!$v) continue;
- echo "<a
href=\"article.php?group=$group&article=".htmlspecialchars(urlencode($v))."\">".($k+1)."</a>\n";
+ if (!preg_match("/^<.+>\$/", $v) continue;
+ echo "<a
href=\"article.php?group=$group&article=".htmlspecialchars(urlencode($v))."\">".($c++)."</a>\n";
}
echo "</td>\n";
}