cvs: phpweb /bin createNewsEntry
| From: | Philip Olson | Date: | Sun, 21 Jun 2009 18:39:17 +0000 |
| Subject: | cvs: phpweb /bin createNewsEntry | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-5113@lists.php.net to get a copy of this message | ||
philip Sun Jun 21 18:39:17 2009 UTC
Modified files:
/phpweb/bin createNewsEntry
Log:
hack to increase whitespace in generated entries
http://cvs.php.net/viewvc.cgi/phpweb/bin/createNewsEntry?r1=1.6&r2=1.7&diff_format=u
Index: phpweb/bin/createNewsEntry
diff -u phpweb/bin/createNewsEntry:1.6 phpweb/bin/createNewsEntry:1.7
--- phpweb/bin/createNewsEntry:1.6 Sat Jan 10 23:29:46 2009
+++ phpweb/bin/createNewsEntry Sun Jun 21 18:39:17 2009
@@ -134,14 +134,14 @@
$content = ce($dom, "content", null, array(), $item);
fwrite(STDOUT, "And at last; paste/write your news item here.\nTo end it, hit
<enter>.<enter>\n");
-$news = "";
+$news = "\n";
while(($line = rtrim(fgets(STDIN))) != ".") {
- $news .= $line;
+ $news .= " $line\n";
}
$tdoc = new DOMDocument("1.0", "utf-8");
$tdoc->formatOutput = true;
-if ($tdoc->loadXML('<div>'.$news.'</div>')) {
+if ($tdoc->loadXML('<div>'.$news.' </div>')) {
$content->setAttribute("type", "xhtml");
$div = $content->appendChild($dom->createElement("div"));
$div->setAttribute("xmlns", "http://www.w3.org/1999/xhtml");