cvs: php-news-web / article.php
| From: | Jim Winstead | Date: | Thu, 05 Jul 2001 18:20:03 +0000 |
| Subject: | cvs: php-news-web / article.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-5234@lists.php.net to get a copy of this message | ||
jimw Thu Jul 5 14:20:03 2001 EDT
Modified files:
/php-news-web article.php
Log:
make sure we send the header when there's no body, and replace -- in fields being output into
comments
Index: php-news-web/article.php
diff -u php-news-web/article.php:1.4 php-news-web/article.php:1.5
--- php-news-web/article.php:1.4 Sat Mar 10 23:53:08 2001
+++ php-news-web/article.php Thu Jul 5 14:20:03 2001
@@ -19,7 +19,7 @@
while (!feof($s)) {
$line = fgets($s, 4096);
if ($line == ".\r\n") break;
- if ($inheaders && $line == "\r\n") {
+ if ($inheaders && ($line == "\n" || $line == "\r\n")) {
$inheaders = 0;
head("$group: ".format_subject($headers[subject]));
start_article($group,$headers);
@@ -53,6 +53,10 @@
}
}
}
+if ($inheaders) {
+ head("$group: ".format_subject($headers[subject]));
+ start_article($group,$headers);
+}
if ($insig) echo "</span>";
echo "</pre></blockquote>";
@@ -86,7 +90,7 @@
}
echo "</tr>";
while (list($k,$v) = each($headers)) {
- echo "<!-- $k: $v -->\n";
+ echo "<!-- ", htmlspecialchars($k),": ",preg_replace("/-+/g",
"-", htmlspecialchars($v))," -->\n";
}
echo "</table></blockquote>\n";
echo "<blockquote><pre>";