<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,11 @@
 #!/usr/bin/php
 &lt;?php
 
-require_once dirname(__FILE__) . '/../include/init.php';
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
 loadlib('dir');
 
 # Get a list of posts and drafts
-$tree = dir_rscandir(dirname(__FILE__) . '/../posts', true);
+$tree = dir_rscandir(dirname(__FILE__) . &quot;/../posts&quot;, true);
 $list = end(dir_flatten($tree));
 
 # Narrow the list down to just drafts
@@ -17,10 +17,9 @@ foreach ($list as $l) {
 
 # Print the list or an &quot;all clear&quot;
 if (sizeof($drafts)) {
-	$posts = realpath(dirname(__FILE__) . '/../posts');
+	$posts = realpath(dirname(__FILE__) . &quot;/../posts&quot;);
 	foreach ($drafts as $d) { echo &quot;[drafts] $posts$d\n&quot;; }
-} else {
-	echo &quot;[drafts] no drafts found\n&quot;;
 }
+else { err(&quot;[drafts] no drafts found\n&quot;); }
 
 exit(0);</diff>
      <filename>bin/drafts</filename>
    </modified>
    <modified>
      <diff>@@ -1,30 +1,32 @@
 #!/usr/bin/env php
 &lt;?php
 
-require_once dirname(__FILE__) . '/../include/init.php';
-loadlib('url');
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
 
 # Post title in URI form
 if (2 != sizeof($argv)) {
-	echo &quot;Usage: {$argv[0]} &lt;title&gt;\n&quot;;
+	err(&quot;Usage: {$argv[0]} &lt;title&gt;\n&quot;);
 	exit(1);
 }
+
+loadlib('url');
+
 $title = url_sanitize($argv[1]);
-if ('' == $title) {
-	echo &quot;[new] post title resulted in an empty URI\n&quot;;
+if (&quot;&quot; == $title) {
+	err(&quot;[new] post title resulted in an empty URI\n&quot;);
 	exit(1);
 }
-$posts = dirname(__FILE__) . '/../posts';
+$posts = dirname(__FILE__) . &quot;/../posts&quot;;
 if (!is_dir($posts)) { mkdir($posts); }
 if (file_exists(&quot;$posts/$y/$m/$d/$title&quot;)) {
-	echo &quot;[new] there is already a post by that name today\n&quot;;
+	err(&quot;[new] there is already a post by that name today\n&quot;);
 	exit(1);
 }
 
 # Date directories
-$y = date('Y');
-$m = date('m');
-$d = date('d');
+$y = date(&quot;Y&quot;);
+$m = date(&quot;m&quot;);
+$d = date(&quot;d&quot;);
 if (!is_dir(&quot;$posts/$y&quot;)) { mkdir(&quot;$posts/$y&quot;, 0755); }
 if (!is_dir(&quot;$posts/$y/$m&quot;)) { mkdir(&quot;$posts/$y/$m&quot;, 0755); }
 if (!is_dir(&quot;$posts/$y/$m/$d&quot;)) { mkdir(&quot;$posts/$y/$m/$d&quot;, 0755); }
@@ -32,7 +34,6 @@ file_put_contents(&quot;$posts/$y/$m/$d/$title&quot;,
 	&quot;{$argv[1]}\n\n[tags]\n\n&lt;p&gt;[body]&lt;/p&gt;&quot;);
 
 # Great success!
-echo &quot;[new] post has been created and can be edited in:\n[new] &quot;,
-	realpath(&quot;$posts/$y/$m/$d/$title&quot;), &quot;\n&quot;;
-
+err(&quot;[new] post has been created and can be edited in:\n[new] &quot;,
+	realpath(&quot;$posts/$y/$m/$d/$title&quot;), &quot;\n&quot;);
 exit(0);</diff>
      <filename>bin/new</filename>
    </modified>
    <modified>
      <diff>@@ -6,21 +6,22 @@
 #   TODO: Make sure it's a draft
 #
 
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
+
 if (2 != sizeof($argv)) { 
-	echo &quot;Usage: {$argv[0]} &lt;post&gt;\n&quot;;
+	err(&quot;Usage: {$argv[0]} &lt;post&gt;\n&quot;);
 	exit(1);
 }
 if (!file_exists($argv[1])) {
-	echo &quot;[publish] can't find a post at {$argv[1]}\n&quot;;
+	err(&quot;[publish] can't find a post at {$argv[1]}\n&quot;);
 	exit(1);
 }
-$base = realpath(dirname(__FILE__) . '/../posts');
+$base = realpath(dirname(__FILE__) . &quot;/../posts&quot;);
 if ($base != substr(realpath($argv[1]), 0, strlen($base))) {
-	echo &quot;[publish] can only publish from the posts/ directory\n&quot;;
+	err(&quot;[publish] can only publish from the posts/ directory\n&quot;);
 	exit(1);
 }
 
-require_once dirname(__FILE__) . '/../include/init.php';
 loadlib('blog_publish');
 
 
@@ -30,8 +31,8 @@ loadlib('blog_publish');
 #
 
 # Get the path to the post
-$parts = explode('/', str_replace(
-	realpath(dirname(__FILE__) . '/../posts') . '/', '', realpath($argv[1])));
+$parts = explode(&quot;/&quot;, str_replace(
+	realpath(dirname(__FILE__) . &quot;/../posts&quot;) . &quot;/&quot;, &quot;&quot;, realpath($argv[1])));
 $file = array_pop($parts);
 $path = blog_publish_dir(&quot;{$smarty-&gt;template_dir}/.posts&quot;, $parts);
 
@@ -42,12 +43,12 @@ $tags = preg_split('!\s+!', $tags);
 $body = input_footnoterize($body, end($parts));
 blog_publish_smarty($path, &quot;$file.preview&quot;, time(), $title, $tags, $body,
 	false);
-echo &quot;[publish] created a preview of the post's Smarty template\n&quot;;
+err(&quot;[publish] created a preview of the post's Smarty template\n&quot;);
 
 
 
 # Great success!
 $hash = sha1_file($argv[1]);
-echo &quot;[publish] previewed the post at\n&quot;,
-	&quot;[publish] http://$FQDN$path/$file/$hash\n&quot;;
+err(&quot;[publish] previewed the post at\n&quot;,
+	&quot;[publish] http://$FQDN$path/$file/$hash\n&quot;);
 exit(0);</diff>
      <filename>bin/preview</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,27 @@
 #!/usr/bin/env php
 &lt;?php
 
-require_once dirname(__FILE__) . '/../include/init.php';
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
 
-if (3 == sizeof($argv) &amp;&amp; '-c' == $argv[1]) {
+if (3 == sizeof($argv) &amp;&amp; &quot;-c&quot; == $argv[1]) {
 	$comments = false;
 	$arg = $argv[2];
-} else if (2 == sizeof($argv)) {
+}
+else if (2 == sizeof($argv)) {
 	$comments = $COMMENTS;
 	$arg = $argv[1];
-} else {
-	echo &quot;Usage: {$argv[0]} [-c] &lt;post&gt;\n&quot;;
+}
+else {
+	err(&quot;Usage: {$argv[0]} [-c] &lt;post&gt;\n&quot;);
 	exit(1);
 }
 if (!file_exists($arg)) {
-	echo &quot;[publish] can't find a post at $arg\n&quot;;
+	err(&quot;[publish] can't find a post at $arg\n&quot;);
 	exit(1);
 }
-$base = realpath(dirname(__FILE__) . '/../posts');
+$base = realpath(dirname(__FILE__) . &quot;/../posts&quot;);
 if ($base != substr(realpath($arg), 0, strlen($base))) {
-	echo &quot;[publish] can only publish from the posts/ directory\n&quot;;
+	err(&quot;[publish] can only publish from the posts/ directory\n&quot;);
 	exit(1);
 }
 
@@ -28,20 +30,20 @@ loadlib('input');
 
 # Check if this post has already been published
 #   Don't allow republishing, instead, send them to the bin/republish script
-$path = str_replace(realpath(dirname(__FILE__) . '/../posts'), '',
+$path = str_replace(realpath(dirname(__FILE__) . &quot;/../posts&quot;), &quot;&quot;,
 	realpath($arg));
 if (file_exists(&quot;{$smarty-&gt;template_dir}/.posts$path.html&quot;)) {
-	echo &quot;[publish] can't republish $arg\n[publish] try bin/republish\n&quot;;
+	err(&quot;[publish] can't republish $arg\n[publish] try bin/republish\n&quot;);
 	exit(1);
 }
 
 # Move this post up to today if necessary
-$parts = explode('/', str_replace(
-	realpath(dirname(__FILE__) . '/../posts') . '/', '', realpath($arg)));
+$parts = explode(&quot;/&quot;, str_replace(
+	realpath(dirname(__FILE__) . &quot;/../posts&quot;) . &quot;/&quot;, &quot;&quot;, realpath($arg)));
 $file = array_pop($parts);
-if (date('Y-m-d') != implode('-', $parts)) {
-	$path = blog_publish_dir(dirname(__FILE__) . '/../posts',
-		array(date('Y'), date('m'), date('d')));
+if (date('Y-m-d') != implode(&quot;-&quot;, $parts)) {
+	$path = blog_publish_dir(dirname(__FILE__) . &quot;/../posts&quot;,
+		array(date(&quot;Y&quot;), date(&quot;m&quot;), date(&quot;d&quot;)));
 	rename($argv[1], dirname(__FILE__) . &quot;/../posts$path/$file&quot;);
 
 	# Delete empty directories in the date hierarchy to keep things tidy
@@ -54,8 +56,8 @@ if (date('Y-m-d') != implode('-', $parts)) {
 }
 
 # Create directories for the &lt;year&gt;/&lt;month&gt;/&lt;day&gt;
-$parts = explode('/', str_replace(
-	realpath(dirname(__FILE__) . '/../posts') . '/', '', realpath($arg)));
+$parts = explode(&quot;/&quot;, str_replace(
+	realpath(dirname(__FILE__) . &quot;/../posts&quot;) . &quot;/&quot;, &quot;&quot;, realpath($arg)));
 $file = array_pop($parts);
 $path = blog_publish_dir(&quot;{$smarty-&gt;template_dir}/.posts&quot;, $parts);
 
@@ -90,36 +92,37 @@ $tags = preg_split('!\s+!', $tags);
 $body = input_footnoterize($body, end($parts));
 blog_publish_smarty($path, $file, $timestamp, $title, $tags, $body,
 	$comments);
-echo &quot;[publish] created the post's Smarty template\n&quot;;
+err(&quot;[publish] created the post's Smarty template\n&quot;);
 
 # Update the homepage
-prepend('/.index',  5);
-echo &quot;[publish] updated the homepage\n&quot;;
+prepend(&quot;/.index&quot;,  5);
+err(&quot;[publish] updated the homepage\n&quot;);
 
 # Update the Atom feed
 blog_publish_feed($path, $file, $timestamp, $title, $body, false);
-echo &quot;[publish] updated the Atom feed\n&quot;;
+err(&quot;[publish] updated the Atom feed\n&quot;);
 
 # Prepend to archive pages
-$archive = '/.posts';
+$archive = &quot;/.posts&quot;;
 foreach ($parts as $p) {
 	$archive .= &quot;/$p&quot;;
 	prepend($archive);
 }
-echo &quot;[publish] added this post to the archives\n&quot;;
+err(&quot;[publish] added this post to the archives\n&quot;);
 
 # Prepend to tag pages
 if (!is_dir(&quot;{$smarty-&gt;template_dir}/.tags&quot;)) {
 	mkdir(&quot;{$smarty-&gt;template_dir}/.tags&quot;, 0755);
 }
 foreach ($tags as $t) { prepend(&quot;/.tags/$t&quot;); }
-echo &quot;[publish] added this post to the tag pages\n&quot;;
+err(&quot;[publish] added this post to the tag pages\n&quot;);
 
 function prepend($tpl, $count = 0) {
 	$tpl = &quot;{$GLOBALS['smarty']-&gt;template_dir}$tpl.html&quot;;
 	if (file_exists($tpl)) {
 		$lines = explode(&quot;\n&quot;, file_get_contents($tpl));
-	} else { $lines = array(); }
+	}
+	else { $lines = array(); }
 	global $path, $file;
 	array_unshift($lines, &quot;{include file=\&quot;.posts$path/$file.html\&quot;}&quot;);
 	if (0 &lt; $count) { $lines = array_slice($lines, 0, $count); }
@@ -129,10 +132,10 @@ function prepend($tpl, $count = 0) {
 # Update the archive indices
 blog_publish_months();
 blog_publish_tags($tags);
-echo &quot;[publish] updated archive pages\n&quot;;
+err(&quot;[publish] updated archive pages\n&quot;);
 
 
 
 # Great success!
-echo &quot;[publish] published the post at\n[publish] http://$FQDN$path/$file\n&quot;;
+err(&quot;[publish] published the post at\n[publish] http://$FQDN$path/$file\n&quot;);
 exit(0);</diff>
      <filename>bin/publish</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,27 @@
 #!/usr/bin/php
 &lt;?php
 
-require_once dirname(__FILE__) . '/../include/init.php';
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
 
-if (3 == sizeof($argv) &amp;&amp; '-c' == $argv[1]) {
+if (3 == sizeof($argv) &amp;&amp; &quot;-c&quot; == $argv[1]) {
 	$comments = false;
 	$arg = $argv[2];
-} else if (2 == sizeof($argv)) {
+}
+else if (2 == sizeof($argv)) {
 	$comments = $COMMENTS;
 	$arg = $argv[1];
-} else {
-	echo &quot;Usage: {$argv[0]} [-c] &lt;post&gt;\n&quot;;
+}
+else {
+	err(&quot;Usage: {$argv[0]} [-c] &lt;post&gt;\n&quot;);
 	exit(1);
 }
 if (!file_exists($arg)) {
-	echo &quot;[republish] can't find a post at $arg\n&quot;;
+	err(&quot;[republish] can't find a post at $arg\n&quot;);
 	exit(1);
 }
-$base = realpath(dirname(__FILE__) . '/../posts');
+$base = realpath(dirname(__FILE__) . &quot;/../posts&quot;);
 if ($base != substr(realpath($arg), 0, strlen($base))) {
-	echo &quot;[republish] can only publish from the posts/ directory\n&quot;;
+	err(&quot;[republish] can only publish from the posts/ directory\n&quot;);
 	exit(1);
 }
 
@@ -32,27 +34,27 @@ loadlib('blog_publish');
 #
 
 # Get the path to the post
-$parts = explode('/', str_replace(
-	realpath(dirname(__FILE__) . '/../posts') . '/', '', realpath($arg)));
+$parts = explode(&quot;/&quot;, str_replace(
+	realpath(dirname(__FILE__) . &quot;/../posts&quot;) . &quot;/&quot;, &quot;&quot;, realpath($arg)));
 $file = array_pop($parts);
-$path = '/' . implode('/', $parts);
+$path = &quot;/&quot; . implode(&quot;/&quot;, $parts);
 
 # Get the date stored at original publishing time
 $timestamp = strtotime(file_get_contents(
 	&quot;{$smarty-&gt;template_dir}/.posts$path/$file.date&quot;));
 
 # Rewrite the post's Smarty template
-list($title, $tags, $body) = preg_split(&quot;!\r?\n\r?\n!&quot;,
+list($title, $tags, $body) = preg_split('!\r?\n\r?\n!',
 	file_get_contents($arg), 3);
 $tags = preg_split('!\s+!', $tags);
 $body = input_footnoterize($body, end($parts));
 blog_publish_smarty($path, $file, $timestamp, $title, $tags, $body,
 	$comments);
-echo &quot;[republish] recreated the post's Smarty template\n&quot;;
+err(&quot;[republish] recreated the post's Smarty template\n&quot;);
 
 # Rewrite the post in the feed, if it's there
 blog_publish_feed($path, $file, $timestamp, $title, $body, true);
-echo &quot;[republish] updated the Atom feed\n&quot;;
+err(&quot;[republish] updated the Atom feed\n&quot;);
 
 # TODO: Update the tag pages
 #echo &quot;[republish] updated archive pages\n&quot;;
@@ -60,6 +62,6 @@ echo &quot;[republish] updated the Atom feed\n&quot;;
 
 
 # Great success!
-echo &quot;[republish] republished the post at\n&quot;,
-	&quot;[republish] http://$FQDN$path/$file\n&quot;;
+err(&quot;[republish] republished the post at\n&quot;,
+	&quot;[republish] http://$FQDN$path/$file\n&quot;);
 exit(0);</diff>
      <filename>bin/republish</filename>
    </modified>
    <modified>
      <diff>@@ -1,29 +1,29 @@
 #!/usr/bin/env php
 &lt;?php
 
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
+
 # Needs a post and a number as arguments
 if (3 != sizeof($argv)) { 
-	echo &quot;Usage: {$argv[0]} &lt;id(s)&gt; &lt;post&gt;\n&quot;,
-		&quot;&lt;id(s)&gt; is a comma-separated list of numbers or hyphenated ranges\n&quot;;
+	err(&quot;Usage: {$argv[0]} &lt;id(s)&gt; &lt;post&gt;\n&quot;,
+		&quot;&lt;id(s)&gt; is a comma-separated list of numbers or hyphenated ranges\n&quot;);
 	exit(1);
 }
 if (!file_exists($argv[2])) {
-	echo &quot;[rmcomment] can't find a post at {$argv[2]}\n&quot;;
+	err(&quot;[rmcomment] can't find a post at {$argv[2]}\n&quot;);
 	exit(1);
 }
-$base = realpath(dirname(__FILE__) . '/../posts');
+$base = realpath(dirname(__FILE__) . &quot;/../posts&quot;);
 if ($base != substr(realpath($argv[2]), 0, strlen($base))) {
-	echo &quot;[rmcomment] posts live in the posts/ directory\n&quot;;
+	err(&quot;[rmcomment] posts live in the posts/ directory\n&quot;);
 	exit(1);
 }
 
-require_once dirname(__FILE__) . '/../include/init.php';
-
 # Make sure this post has been published
-$path = str_replace(realpath(dirname(__FILE__) . '/../posts'), '',
+$path = str_replace(realpath(dirname(__FILE__) . &quot;/../posts&quot;), &quot;&quot;,
 	realpath($argv[2]));
 if (!file_exists(&quot;{$smarty-&gt;template_dir}/.posts$path.html&quot;)) {
-	echo &quot;[rmcomment] {$argv[2]} isn't published\n&quot;;
+	err(&quot;[rmcomment] {$argv[2]} isn't published\n&quot;);
 	exit(1);
 }
 
@@ -31,23 +31,26 @@ if (!file_exists(&quot;{$smarty-&gt;template_dir}/.posts$path.html&quot;)) {
 $count = filesize(&quot;{$smarty-&gt;template_dir}/.posts$path.count&quot;);
 
 # Parse the 2nd parameter to see which comments need to be deleted
-$ranges = explode(',', $argv[1]);
+$ranges = explode(&quot;,&quot;, $argv[1]);
 $ids = array();
 foreach ($ranges as $r) {
 	if (preg_match('!^\d+$!', $r)) {
 		$ids[] = $r;
-	} else if (preg_match('!^-(\d+)$!', $r, $match)) {
+	}
+	else if (preg_match('!^-(\d+)$!', $r, $match)) {
 		$ids = array_merge($ids, range(0, $match[1]));
-	} else if (preg_match('!^(\d+)-$!', $r, $match)) {
+	}
+	else if (preg_match('!^(\d+)-$!', $r, $match)) {
 		$ids = array_merge($ids, range($match[1], $count));
-	} else if (preg_match('!^(\d+)-(\d+)$!', $r, $match)) {
+	}
+	else if (preg_match('!^(\d+)-(\d+)$!', $r, $match)) {
 		$ids = array_merge($ids, range($match[1], $match[2]));
 	}
 }
 $ids = array_unique($ids);
 sort($ids, SORT_NUMERIC);
 if (!sizeof($ids)) {
-	echo &quot;[rmcomment] no comments marked for removal\n&quot;;
+	err(&quot;[rmcomment] no comments marked for removal\n&quot;);
 	exit(1);
 }
 if (0 == $ids[0]) { array_shift($ids); }
@@ -58,14 +61,14 @@ if ($index = array_search($count, $ids)) {
 # Delete comments
 $comments = explode(&quot;\n\n&quot;, file_get_contents(
 	&quot;{$smarty-&gt;template_dir}/.posts$path.comments.html&quot;));
-array_unshift($comments, '');
+array_unshift($comments, &quot;&quot;);
 foreach ($ids as $id) { unset($comments[$id]); }
 array_shift($comments);
 file_put_contents(&quot;{$smarty-&gt;template_dir}/.posts$path.comments.html&quot;,
 	implode(&quot;\n\n&quot;, $comments), LOCK_EX);
 file_put_contents(&quot;{$smarty-&gt;template_dir}/.posts$path.count&quot;,
-	str_repeat('.', sizeof($comments) - 1), LOCK_EX);
+	str_repeat(&quot;.&quot;, sizeof($comments) - 1), LOCK_EX);
 
 # Great success!
-echo &quot;[rmcomment] comments removed\n&quot;;
+err(&quot;[rmcomment] comments removed\n&quot;);
 exit(0);</diff>
      <filename>bin/rmcomment</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,22 @@
 #!/usr/bin/env php
 &lt;?php
 
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
+
 # Check out the arguments
 if (5 != sizeof($argv)) {
-	echo &quot;Usage: {$argv[0]} &lt;db-host&gt; &lt;db-user&gt; &lt;db-pass&gt; &lt;db-name&gt;\n&quot;;
+	err(&quot;Usage: {$argv[0]} &lt;db-host&gt; &lt;db-user&gt; &lt;db-pass&gt; &lt;db-name&gt;\n&quot;);
 	exit(1);
 }
 list(, $db_host, $db_user, $db_pass, $db_name) = $argv;
 
-require_once dirname(__FILE__) . '/../include/init.php';
 loadlib('blog_publish');
 loadlib('blog_comment');
 
 # Open a database connection
 $link = mysql_connect($db_host, $db_user, $db_pass);
 if (!is_resource($link)) {
-	echo &quot;[wordpress] error connecting to database\n&quot;;
+	err(&quot;[wordpress] error connecting to database\n&quot;);
 	exit(1);
 }
 mysql_select_db($db_name, $link);
@@ -34,9 +35,9 @@ while ($post = mysql_fetch_assoc($posts_q)) {
 
 	# Create directories for the &lt;year&gt;/&lt;month&gt;/&lt;day&gt;
 	$parts = array(
-		date('Y', $timestamp),
-		date('m', $timestamp),
-		date('d', $timestamp)
+		date(&quot;Y&quot;, $timestamp),
+		date(&quot;m&quot;, $timestamp),
+		date(&quot;d&quot;, $timestamp),
 	);
 	$path = blog_publish_dir(&quot;{$smarty-&gt;template_dir}/.posts&quot;, $parts);
 
@@ -71,15 +72,15 @@ while ($post = mysql_fetch_assoc($posts_q)) {
 
 	# Write the post's date into the .date file
 	file_put_contents(&quot;{$smarty-&gt;template_dir}/.posts$path/$file.date&quot;,
-		date('r', $timestamp), LOCK_EX);
+		date(&quot;r&quot;, $timestamp), LOCK_EX);
 
 	# Write the post's Smarty template
 	blog_publish_smarty($path, $file, $timestamp, $title, $tags,
-		&quot;&lt;p&gt;&quot; . implode(&quot;&lt;/p&gt;\n&lt;p&gt;&quot;, preg_split(&quot;!(?:\r?\n){2,}!&quot;,
+		&quot;&lt;p&gt;&quot; . implode(&quot;&lt;/p&gt;\n&lt;p&gt;&quot;, preg_split('!(?:\r?\n){2,}!',
 		$body)) . &quot;&lt;/p&gt;\n&quot;);
 
 	# Append to archive and tag pages
-	$archive = '';
+	$archive = &quot;&quot;;
 	foreach ($parts as $p) {
 		$archive .= &quot;/$p&quot;;
 		file_put_contents(&quot;{$smarty-&gt;template_dir}/.posts$archive.html&quot;,
@@ -100,7 +101,7 @@ while ($post = mysql_fetch_assoc($posts_q)) {
 	#   Note that this works in the opposite direction as bin/publish
 	blog_publish_pointers($parts, false);
 
-	echo &quot;[wordpress] published $path/$file\n&quot;;
+	err(&quot;[wordpress] published $path/$file\n&quot;);
 }
-echo &quot;[wordpress] done\n&quot;;
+err(&quot;[wordpress] done\n&quot;);
 exit(0);</diff>
      <filename>bin/wordpress</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-php_value include_path /work/www/bashpress/include:/usr/share/php/smarty
+php_value include_path /work/www/bashpress/include:/usr/share/php
 php_value magic_quotes_gpc Off
 php_value error_reporting 2047
 </diff>
      <filename>httpd.conf</filename>
    </modified>
    <modified>
      <diff>@@ -1,18 +1,18 @@
 &lt;?php
 
 # Site parameters
-$TITLE = 'Richard Crowley&amp;#8217;s blog';
-$FQDN = 'bashpress.rcrowley.org';
-$AUTHOR = 'Richard Crowley';
-$MAIL = 'r@rcrowley.org';
-$COMMENTS = false;
+$TITLE = &quot;Richard Crowley&amp;#8217;s blog&quot;;
+$FQDN = &quot;dev.rcrowley.org&quot;;
+$AUTHOR = &quot;Richard Crowley&quot;;
+$MAIL = &quot;r@rcrowley.org&quot;;
+$COMMENTS = true;#false;
 
 # Expose some site parameters to the templates
-assign('TITLE');
-assign('FQDN');
-assign('AUTHOR');
-assign('COMMENTS');
+assign(&quot;TITLE&quot;);
+assign(&quot;FQDN&quot;);
+assign(&quot;AUTHOR&quot;);
+assign(&quot;COMMENTS&quot;);
 
 # Date formats
-$DATEFORMAT_POST = 'Y/m/d';
-$DATEFORMAT_COMMENT = 'Y/m/d g:i a';
+$DATEFORMAT_POST = &quot;Y/m/d&quot;;
+$DATEFORMAT_COMMENT = &quot;Y/m/d g:i a&quot;;</diff>
      <filename>include/config.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,19 @@
 &lt;?php
 
-require_once '/usr/share/php/smarty/Smarty.class.php';
+require_once &quot;smarty/Smarty.class.php&quot;;
 $smarty = new Smarty;
-$smarty-&gt;template_dir = realpath(dirname(__FILE__) . '/../templates');
-$smarty-&gt;compile_dir = realpath(dirname(__FILE__) . '/../.templates');
+$smarty-&gt;template_dir = realpath(dirname(__FILE__) . &quot;/../templates&quot;);
+$smarty-&gt;compile_dir = realpath(dirname(__FILE__) . &quot;/../.templates&quot;);
 
 function loadlib($name) {
 	require_once dirname(__FILE__) . &quot;/lib_$name.php&quot;;
 }
 
+function err() {
+	$arr = func_get_args();
+	fwrite(STDERR, implode(&quot;&quot;, $arr));
+}
+
 function assign() {
 	$args = func_get_args();
 	$key = array_shift($args);
@@ -25,11 +30,14 @@ function display($name = false) {
 	# Send proper Content-Type header
 	if ('xml' == $GLOBALS['FORMAT']) {
 		header(&quot;Content-Type: text/xml\r\n&quot;);
-	} else if ('rss' == $GLOBALS['FORMAT']) {
+	}
+	else if ('rss' == $GLOBALS['FORMAT']) {
 		header(&quot;Content-Type: application/rss+xml\r\n&quot;);
-	} else if ('atom' == $GLOBALS['FORMAT']) {
+	}
+	else if ('atom' == $GLOBALS['FORMAT']) {
 		header(&quot;Content-Type: application/atom+xml\r\n&quot;);
-	} else if ('json' == $GLOBALS['FORMAT']) {
+	}
+	else if ('json' == $GLOBALS['FORMAT']) {
 		header(&quot;Content-Type: application/json\r\n&quot;);
 	}
 
@@ -37,12 +45,12 @@ function display($name = false) {
 	if (false === $name) {
 		$smarty-&gt;display(reset(explode('.', $GLOBALS['FILE'])) . '.' .
 			$GLOBALS['FORMAT']);
-	} else {
+	}
+	else {
 		if (false === strpos($name, '.')) {
 			$smarty-&gt;display($name . '.' . $GLOBALS['FORMAT']);
-		} else {
-			$smarty-&gt;display($name);
 		}
+		else { $smarty-&gt;display($name); }
 	}
 	exit;
 }
@@ -51,9 +59,9 @@ function redirect($url) {
 	header(&quot;Location: $url\r\n&quot;);
 	echo &lt;&lt;&lt;EOD
 &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://w3.org/TR/xhtml1/DTD/xhtml1.1.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;$url&quot;&gt;302, ur leavin&amp;rsquo; here.&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;$url&quot;&gt;302, ur leavin&amp;#8217; here.&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
 EOD;
 	exit;
 }
 
-require_once dirname(__FILE__) . '/config.php';
+require_once dirname(__FILE__) . &quot;/config.php&quot;;</diff>
      <filename>include/init.php</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,8 @@ function blog_comment_save($name, $website, $text, $date = false) {
 	# If they gave a website, show that with their name
 	if (preg_match('!^https?://.!', $website)) {
 		$link = &quot;&lt;a href=\&quot;$website\&quot;&gt;$name&lt;/a&gt;&quot;;
-	} else { $link = $name; }
+	}
+	else { $link = $name; }
 
 	# Take either the passed date or now
 	$date = date($GLOBALS['DATEFORMAT_COMMENT'],
@@ -32,10 +33,10 @@ function blog_comment_save($name, $website, $text, $date = false) {
 
 	# Email the site owner
 	global $FQDN;
-	mail($GLOBALS['MAIL'], 'New comment!',
+	mail($GLOBALS['MAIL'], &quot;New comment!&quot;,
 		&quot;Post: http://$FQDN{$GLOBALS['URL']}\r\n\r\n&quot; .
 		&quot;Name: $name\r\nWebsite: $website\r\n\r\n$mail\r\n&quot;,
-		&quot;From: Bashpress &lt;bashpress@$FQDN&gt;\r\n&quot;);
+		&quot;From: Bashpress &lt;noreply@$FQDN&gt;\r\n&quot;);
 
 }
 
@@ -44,16 +45,17 @@ $GLOBALS['smarty']-&gt;register_function(
 	'blog_comment_count', 'blog_comment_count');
 function blog_comment_count($params = false, $smarty = false) {
 	if (isset($params['tpl'])) {
-		$parts = explode('/', $params['tpl']);
+		$parts = explode(&quot;/&quot;, $params['tpl']);
 		array_unshift($parts, $GLOBALS['smarty']-&gt;template_dir);
 		$file = array_pop($parts);
-		$parts[] = substr($file, 0, strrpos($file, '.')) . '.count';
-		return filesize(implode('/', $parts));
-	} else { return filesize(_blog_comment_base() . '.count'); }
+		$parts[] = substr($file, 0, strrpos($file, &quot;.&quot;)) . &quot;.count&quot;;
+		return filesize(implode(&quot;/&quot;, $parts));
+	}
+	else { return filesize(_blog_comment_base() . &quot;.count&quot;); }
 }
 
 # Get the base of comment file names
 function _blog_comment_base() {
-	return $GLOBALS['smarty']-&gt;template_dir . '/.posts/' .
-		implode('/', $GLOBALS['URL_PARTS']);
+	return $GLOBALS['smarty']-&gt;template_dir . &quot;/.posts/&quot; .
+		implode(&quot;/&quot;, $GLOBALS['URL_PARTS']);
 }</diff>
      <filename>include/lib_blog_comment.php</filename>
    </modified>
    <modified>
      <diff>@@ -17,14 +17,14 @@ function blog_publish_smarty($path, $file, $timestamp, $title, $tags,
 	assign('comments', $comments);
 	global $smarty;
 	file_put_contents(&quot;{$smarty-&gt;template_dir}/.posts$path/$file.html&quot;,
-		$smarty-&gt;fetch('post.smarty'), LOCK_EX);
+		$smarty-&gt;fetch(&quot;post.smarty&quot;), LOCK_EX);
 }
 
 # Create directories from the publishing directory for this post
 function blog_publish_dir($base, $dirs) {
 	if (!is_array($dirs)) { return false; }
 	if (!is_dir($base)) { mkdir($base, 0755); }
-	$path = '';
+	$path = &quot;&quot;;
 	foreach ($dirs as $d) {
 		$path .= &quot;/$d&quot;;
 		if (!is_dir(&quot;$base$path&quot;)) { mkdir(&quot;$base$path&quot;, 0755); }
@@ -43,7 +43,7 @@ function blog_publish_pointers($parts, $new = true) {
 	$tree = dir_rscandir(&quot;{$smarty-&gt;template_dir}/.posts&quot;, false);
 	$list = dir_flatten($tree);
 	$depth = 0;
-	$path = '';
+	$path = &quot;&quot;;
 	foreach ($parts as $p) {
 		++$depth;
 		$path .= &quot;/$p&quot;;
@@ -51,12 +51,13 @@ function blog_publish_pointers($parts, $new = true) {
 		if ($new &amp;&amp; $i || !$new &amp;&amp; $i &lt; sizeof($list[$depth]) - 1) {
 			if ($new) {
 				--$i;
-				$a = 'older';
-				$b = 'newer';
-			} else {
+				$a = &quot;older&quot;;
+				$b = &quot;newer&quot;;
+			}
+			else {
 				++$i;
-				$a = 'newer';
-				$b = 'older';
+				$a = &quot;newer&quot;;
+				$b = &quot;older&quot;;
 			}
 			file_put_contents(&quot;{$smarty-&gt;template_dir}/.posts$path/$a&quot;,
 				$list[$depth][$i]);
@@ -82,7 +83,7 @@ function blog_publish_months() {
 		$li[] = &quot;\t&lt;li&gt;&lt;a href=\&quot;$m\&quot;&gt;&quot; . substr($m, 1) . &quot;&lt;/a&gt;&lt;/li&gt;\n&quot;;
 	}
 	file_put_contents(&quot;{$GLOBALS['smarty']-&gt;template_dir}/.months.html&quot;,
-		&quot;&lt;ul id=\&quot;months\&quot;&gt;\n&quot; . implode('', $li) . &quot;&lt;/ul&gt;\n&quot;, LOCK_EX);
+		&quot;&lt;ul id=\&quot;months\&quot;&gt;\n&quot; . implode(&quot;&quot;, $li) . &quot;&lt;/ul&gt;\n&quot;, LOCK_EX);
 }	
 
 # Update the tag listing
@@ -101,7 +102,7 @@ function blog_publish_tags($tags) {
 		$li[] = &quot;\t&lt;li&gt;&lt;a href=\&quot;/tags/$t\&quot;&gt;$t&lt;/a&gt;&lt;/li&gt;\n&quot;;
 	}
 	file_put_contents(&quot;{$smarty-&gt;template_dir}/.tags.html&quot;,
-		&quot;&lt;ul id=\&quot;tags\&quot;&gt;\n&quot; . implode('', $li) . &quot;&lt;/ul&gt;\n&quot;, LOCK_EX);
+		&quot;&lt;ul id=\&quot;tags\&quot;&gt;\n&quot; . implode(&quot;&quot;, $li) . &quot;&lt;/ul&gt;\n&quot;, LOCK_EX);
 }
 
 # Prepend a post to the Atom feed, either bumping an old post off the
@@ -112,22 +113,26 @@ function blog_publish_feed($path, $file, $timestamp, $title, $body,
 	$replace_only = false) {
 	global $smarty;
 	$permalink = &quot;http://{\$FQDN}$path/$file&quot;;
-	$date_published = date('c', $timestamp);
+	$date_published = date(&quot;c&quot;, $timestamp);
 
 	# Get the DOM of the feed
 	$dom = new DOMDocument;
 	if (file_exists(&quot;{$smarty-&gt;template_dir}/.feed.atom&quot;)) {
 		$dom-&gt;load(&quot;{$smarty-&gt;template_dir}/.feed.atom&quot;);
-	} else {
-		$dom-&gt;loadXML('&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-	&lt;feed xmlns=&quot;http://www.w3.org/2005/Atom&quot;&gt;
-		&lt;title&gt;{$TITLE}&lt;/title&gt;
-		&lt;link href=&quot;http://{$FQDN}/feed&quot; rel=&quot;self&quot;/&gt;
-		&lt;link href=&quot;http://{$FQDN}/&quot; rel=&quot;alternate&quot;/&gt;
-		&lt;id&gt;http://{$FQDN}/feed&lt;/id&gt;
-		&lt;updated&gt;2008-09-03T23:17:43-07:00&lt;/updated&gt;
-		&lt;author&gt;&lt;name&gt;{$AUTHOR}&lt;/name&gt;&lt;/author&gt;
-	&lt;/feed&gt;');
+	}
+	else {
+		$dom-&gt;loadXML(&lt;&lt;&lt;EOD
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;feed xmlns=&quot;http://www.w3.org/2005/Atom&quot;&gt;
+	&lt;title&gt;{\$TITLE}&lt;/title&gt;
+	&lt;link href=&quot;http://{\$FQDN}/feed&quot; rel=&quot;self&quot;/&gt;
+	&lt;link href=&quot;http://{\$FQDN}/&quot; rel=&quot;alternate&quot;/&gt;
+	&lt;id&gt;http://{\$FQDN}/feed&lt;/id&gt;
+	&lt;updated&gt;2008-09-03T23:17:43-07:00&lt;/updated&gt;
+	&lt;author&gt;&lt;name&gt;{\$AUTHOR}&lt;/name&gt;&lt;/author&gt;
+&lt;/feed&gt;
+EOD
+		);
 	}
 	$feed = $dom-&gt;documentElement;
 
@@ -142,7 +147,7 @@ function blog_publish_feed($path, $file, $timestamp, $title, $body,
 			-&gt;firstChild-&gt;nodeValue == $permalink) {
 			$index = $i;
 			$feed-&gt;removeChild($entry);
-			$date_updated = date('c');
+			$date_updated = date(&quot;c&quot;);
 			break;
 		}
 	}
@@ -168,13 +173,13 @@ function blog_publish_feed($path, $file, $timestamp, $title, $body,
 		htmlspecialchars(input_sanitize_smarty($title))));
 	$link = $dom-&gt;createElement('link');
 	$link-&gt;setAttribute('href', $permalink);
-	$link-&gt;setAttribute('rel', 'alternate');
+	$link-&gt;setAttribute('rel', &quot;alternate&quot;);
 	$entry-&gt;appendChild($link);
 	$entry-&gt;appendChild($dom-&gt;createElement('id', $permalink));
 	$entry-&gt;appendChild($dom-&gt;createElement('published', $date_published));
 	$entry-&gt;appendChild($dom-&gt;createElement('updated', $date_updated));
 	$author = $dom-&gt;createElement('author');
-	$author-&gt;appendChild($dom-&gt;createElement('name', '{$AUTHOR}'));
+	$author-&gt;appendChild($dom-&gt;createElement('name', &quot;{\$AUTHOR}&quot;));
 	$entry-&gt;appendChild($author);
 	$content = $dom-&gt;createElement('content',
 		htmlspecialchars(input_sanitize_smarty($body)));</diff>
      <filename>include/lib_blog_publish.php</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
 #   This special rscandir function will return a tree of only directories
 #   TODO: Don't count directories that only contain *.preview.html files
 function dir_rscandir($dir, $all = true) {
-	$ls = array_diff(scandir($dir), array('.', '..'));
+	$ls = array_diff(scandir($dir), array(&quot;.&quot;, &quot;..&quot;));
 	$out = array();
 	foreach ($ls as $l) {
 		if (is_dir(&quot;$dir/$l&quot;)) { $out[$l] = dir_rscandir(&quot;$dir/$l&quot;, $all); }
@@ -14,7 +14,7 @@ function dir_rscandir($dir, $all = true) {
 }
 
 # Flatten the walked directory tree at every depth
-function dir_flatten($tree, $path = '', $depth = 1) {
+function dir_flatten($tree, $path = &quot;&quot;, $depth = 1) {
 	$list = array();
 	foreach ($tree as $dir =&gt; $subtree) {
 		$list[$depth][] = &quot;$path/$dir&quot;;</diff>
      <filename>include/lib_dir.php</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,8 @@
 #   The argument should be a string or an array
 function input_sanitize_smarty($dirty) {
 	return str_replace(
-		array('{', '}', '&lt;&lt;&lt;---THIS-IS-SPECIAL---&gt;&gt;&gt;'),
-		array('&lt;&lt;&lt;---THIS-IS-SPECIAL---&gt;&gt;&gt;', '{rdelim}', '{ldelim}'),
+		array(&quot;{&quot;, &quot;}&quot;, &quot;&lt;&lt;&lt;---THIS-IS-SPECIAL---&gt;&gt;&gt;&quot;),
+		array(&quot;&lt;&lt;&lt;---THIS-IS-SPECIAL---&gt;&gt;&gt;&quot;, &quot;{rdelim}&quot;, &quot;{ldelim}&quot;),
 		$dirty
 	);
 }
@@ -14,7 +14,7 @@ function input_sanitize_smarty($dirty) {
 #   Turn blocks of text into paragraphs, preserve single-line breaks,
 #   convert URLs to links and strip all other tags
 #   The URL-to-link code is basically how Wordpress does it
-function input_htmlize($text, $begin = '') {
+function input_htmlize($text, $begin = &quot;&quot;) {
 
 	# Break into regular and &lt;pre&gt; sections
 	$sections = preg_split('!(&lt;pre&gt;.*?&lt;/pre&gt;)!is', $text, -1,
@@ -23,17 +23,17 @@ function input_htmlize($text, $begin = '') {
 
 		# Strip and HTML encode &lt;pre&gt; blocks
 		if (preg_match('!^&lt;pre&gt;(.*)&lt;/pre&gt;$!i', $text, $match)) {
-			$sections[$i] = '&lt;pre&gt;' . htmlentities(strip_tags($match[1])) .
+			$sections[$i] = &quot;&lt;pre&gt;&quot; . htmlentities(strip_tags($match[1])) .
 				&quot;&lt;/pre&gt;\n&quot;;
 		}
 
 		# HTML encode and markup paragraphs and line breaks
 		else {
-			$paragraphs = preg_split(&quot;!(?:\r?\n){2,}!&quot;,
+			$paragraphs = preg_split('!(?:\r?\n){2,}!',
 				htmlentities(strip_tags($text)));
 			foreach ($paragraphs as $j =&gt; $text) {
 				$paragraphs[$j] = implode(&quot;\n$begin&lt;br /&gt;&quot;,
-					preg_split(&quot;!\r?\n!&quot;, $text));
+					preg_split('!\r?\n!', $text));
 			}
 			$sections[$i] = &quot;$begin&lt;p&gt;&quot; . implode(&quot;&lt;/p&gt;\n$begin&lt;p&gt;&quot;,
 				$paragraphs) . &quot;&lt;/p&gt;\n&quot;;
@@ -41,33 +41,32 @@ function input_htmlize($text, $begin = '') {
 
 	}
 
-	return input_htmlize_links(implode('', $sections));
+	return input_htmlize_links(implode(&quot;&quot;, $sections));
 }
 
 # Turn URLs to links
 function input_htmlize_links($text) {
 	return trim(preg_replace(
-		'!(&lt;a( [^&gt;]+?&gt;|&gt;))&lt;a [^&gt;]+?&gt;([^&gt;]+?)&lt;/a&gt;&lt;/a&gt;!i', '$1$3&lt;/a&gt;',
+		'!(&lt;a( [^&gt;]+?&gt;|&gt;))&lt;a [^&gt;]+?&gt;([^&gt;]+?)&lt;/a&gt;&lt;/a&gt;!i', &quot;$1$3&lt;/a&gt;&quot;,
 		preg_replace_callback(
-		'#(?&lt;=[\s&gt;])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&amp;~/\-=?@\[\](+]|[.,;:](?![\s&lt;])|(?(1)\)(?![\s&lt;])|\)))*)#is',
+		'#(?&lt;=[\s&gt;])(\()?([\w]+?://(?:[\\w\\x80-\\xff\#$%&amp;~/\-=?@\[\](+]|[.,;:](?![\s&lt;])|(?(1)\)(?![\s&lt;])|\)))*)#is',
 		'_input_htmlize_links', &quot; $text&quot;)));
-
 }
 function _input_htmlize_links($matches) {
 	$url = _input_htmlize_cleanurl($matches[2]);
-	if(empty($url)) { return $matches[0]; }
+	if (empty($url)) { return $matches[0]; }
 	else { return &quot;{$matches[1]}&lt;a href=\&quot;$url\&quot;&gt;$url&lt;/a&gt;&quot;; }
 }
 function _input_htmlize_cleanurl($url) {
-	if ('' == $url) { return $url; }
-	$url = str_replace(array('%0d', '%0a'), '', str_replace(';//', '://',
-		preg_replace(&quot;|[^a-z0-9-~+_.?#=!&amp;;,/:%@$*'()x80-xff]|i&quot;, '', $url)));
-	if (false === strpos($url, ':') &amp;&amp; '/' != substr($url, 0, 1)
-		&amp;&amp; !preg_match('!^[a-z0-9-]+?\.php!i', $url)) {
+	if (&quot;&quot; == $url) { return $url; }
+	$url = str_replace(array(&quot;%0d&quot;, &quot;%0a&quot;), &quot;&quot;, str_replace(&quot;;//&quot;, &quot;://&quot;,
+		preg_replace('|[^a-z0-9-~+_.?#=!&amp;;,/:%@$*\'()x80-xff]|i', &quot;&quot;, $url)));
+	if (false === strpos($url, &quot;:&quot;) &amp;&amp; &quot;/&quot; != substr($url, 0, 1)
+		&amp;&amp; !preg_match('!^[a-z0-9-]+?\\.php!i', $url)) {
 		$url = &quot;http://$url&quot;;
 	}
-	return str_replace(&quot;'&quot;, '&amp;#039;',
-		preg_replace('|&amp;([^#])(?![a-z]{2,8};)|', '&amp;#038;$1', $url));
+	return str_replace(&quot;'&quot;, &quot;&amp;#039;&quot;,
+		preg_replace('|&amp;([^#])(?![a-z]{2,8};)|', &quot;&amp;#038;$1&quot;, $url));
 }
 
 # Turn IEEE-style footnote links into links with links from the footnotes
@@ -89,7 +88,8 @@ function input_footnoterize($text, $slug) {
 	}
 	if (sizeof($footnotes)) {
 		$footnotes = &quot;\n\n&lt;ol class=\&quot;footnote\&quot;&gt;\n&quot; .
-			implode('', $footnotes) . &quot;&lt;/ol&gt;\n&quot;;
-	} else { $footnotes = ''; }
-	return implode('', $parts) . $footnotes;
+			implode(&quot;&quot;, $footnotes) . &quot;&lt;/ol&gt;\n&quot;;
+	}
+	else { $footnotes = &quot;&quot;; }
+	return implode(&quot;&quot;, $parts) . $footnotes;
 }</diff>
      <filename>include/lib_input.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,10 +2,10 @@
 
 # Strip down an arbitrary string, permalink-style
 function url_sanitize($s) {
-	return implode('-', array_map('_url_sanitize', explode(' ',
+	return implode('-', array_map('_url_sanitize', explode(&quot; &quot;,
 		strtolower($s))));
 }
 function _url_sanitize($s) {
 	preg_match_all('![a-z0-9_-]+!', $s, $match);
-	return implode('', $match[0]);
+	return implode(&quot;&quot;, $match[0]);
 }</diff>
      <filename>include/lib_url.php</filename>
    </modified>
    <modified>
      <diff>@@ -7,23 +7,22 @@
 $routes = array(
 
 	# Individual posts and secret previews
-	'/(\d{4})/(\d{2})/(\d{2})/([^./]+)/([^./]+)' =&gt; 'post.php',
-	'/(\d{4})/(\d{2})/(\d{2})/([^./]+)' =&gt; 'post.php',
+	'/(\d{4})/(\d{2})/(\d{2})/([^./]+)/([^./]+)' =&gt; &quot;post.php&quot;,
+	'/(\d{4})/(\d{2})/(\d{2})/([^./]+)' =&gt; &quot;post.php&quot;,
 
 	# Tags
-	'/tags/([^.]+)' =&gt; 'tags.php',
+	'/tags/([^.]+)' =&gt; &quot;tags.php&quot;,
 
 	# Date archives
-	'/(\d{4})/(\d{2})/(\d{2})' =&gt; 'archives.php',
-	'/(\d{4})/(\d{2})' =&gt; 'archives.php',
-	'/(\d{4})' =&gt; 'archives.php',
+	'/(\d{4})/(\d{2})/(\d{2})' =&gt; &quot;archives.php&quot;,
+	'/(\d{4})/(\d{2})' =&gt; &quot;archives.php&quot;,
+	'/(\d{4})' =&gt; &quot;archives.php&quot;,
 
 	# Atom feed
-	'/feed' =&gt; 'feed.php',
+	'/feed' =&gt; &quot;feed.php&quot;,
 
+	'/' =&gt; &quot;index.php&quot;,
 
-	'/' =&gt; 'index.php',
-
-	'' =&gt; '404.php'
+	'' =&gt; &quot;404.php&quot;,
 
 );</diff>
      <filename>include/routes.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
 &lt;?php
 
-require_once dirname(__FILE__) . '/../include/init.php';
+require_once dirname(__FILE__) . &quot;/../include/init.php&quot;;
 
 # Find the proper route to use
-require_once dirname(__FILE__) . '/../include/routes.php';
-if ('' == $_GET['__url__']) { $_GET['__url__'] = '/'; }
+require_once dirname(__FILE__) . &quot;/../include/routes.php&quot;;
+if (&quot;&quot; == $_GET['__url__']) { $_GET['__url__'] = &quot;/&quot;; }
 foreach ($routes as $pattern =&gt; $FILE) {
 	if (preg_match(
 		&quot;!^$pattern(?:/|\.(html|xml|json|rss|rdf|atom|php))?(?:\?.*)?$!&quot;,
@@ -16,7 +16,7 @@ foreach ($routes as $pattern =&gt; $FILE) {
 	}
 }
 if (!isset($URL)) {
-	$FILE = '404.php';
+	$FILE = &quot;404.php&quot;;
 	$URL = $_GET['__url__'];
 	$URL_PARTS = array();
 	$FORMAT = 'html';</diff>
      <filename>public/__banzai__.php</filename>
    </modified>
    <modified>
      <diff>@@ -10,4 +10,5 @@ if (file_exists(&quot;{$smarty-&gt;template_dir}/.posts/$date.html&quot;)) {
 	assign('older', @file_get_contents(
 		&quot;{$smarty-&gt;template_dir}/.posts/$date/older&quot;));
 	display();
-} else { display('404'); }
+}
+else { display('404'); }</diff>
      <filename>public/archives.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,8 @@
 
 if ($current = @file_get_contents(&quot;{$smarty-&gt;template_dir}/.posts/current&quot;)) {
 	header(&quot;Location: $current\r\n&quot;);
-} else {
+}
+else {
 	loadlib('blog_comment');
 	display();
 }</diff>
      <filename>public/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -3,4 +3,5 @@
 $page = $URL_PARTS[0];
 if (file_exists(&quot;{$smarty-&gt;template_dir}/$page.html&quot;)) {
 	display($page);
-} else { display('404'); }
+}
+else { display('404'); }</diff>
      <filename>public/page.php</filename>
    </modified>
    <modified>
      <diff>@@ -27,4 +27,5 @@ else { $post = implode('/', $URL_PARTS) . &quot;.$FORMAT&quot;; }
 if (file_exists(&quot;{$smarty-&gt;template_dir}/.posts/$post&quot;)) {
 	assign('page', true);
 	display(&quot;.posts/$post&quot;);
-} else { display('404'); }
+}
+else { display('404'); }</diff>
      <filename>public/post.php</filename>
    </modified>
    <modified>
      <diff>@@ -6,4 +6,5 @@ $tag = $URL_PARTS[0];
 if (file_exists(&quot;{$smarty-&gt;template_dir}/.tags/$tag.html&quot;)) {
 	assign('tag');
 	display();
-} else { display('404'); }
+}
+else { display('404'); }</diff>
      <filename>public/tags.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 {if $COMMENTS}
 &lt;form id=&quot;comment&quot; action=&quot;{$URL}&quot; method=&quot;post&quot;&gt;
-&lt;p&gt;&lt;label for=&quot;test&quot;&gt;Type &amp;ldquo;qwerty&amp;rdquo;:&lt;/label&gt;&lt;br /&gt;
+&lt;p&gt;&lt;label for=&quot;test&quot;&gt;Type &amp;#8220;qwerty&amp;#8221;:&lt;/label&gt;&lt;br /&gt;
 &lt;input id=&quot;test&quot; name=&quot;test&quot; type=&quot;text&quot; size=&quot;32&quot; class=&quot;text&quot; /&gt;&lt;/p&gt;
 &lt;p&gt;&lt;label for=&quot;name&quot;&gt;Name:&lt;/label&gt;&lt;br /&gt;
 &lt;input id=&quot;name&quot; name=&quot;name&quot; type=&quot;text&quot; value=&quot;{$smarty.post.name}&quot; size=&quot;32&quot; class=&quot;text&quot; /&gt;&lt;/p&gt;</diff>
      <filename>templates/_comment.html</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot;&gt;
 &lt;head&gt;
 &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
-&lt;title&gt;{if $title}{$title} &amp;mdash; {/if}{$TITLE}&lt;/title&gt;
+&lt;title&gt;{if $title}{$title} &amp;#8212; {/if}{$TITLE}&lt;/title&gt;
 &lt;link type=&quot;application/atom+xml&quot; rel=&quot;alternate&quot; title=&quot;{$TITLE}&quot; href=&quot;/feed&quot; /&gt;
 &lt;/head&gt;
 &lt;body&gt;</diff>
      <filename>templates/_head.html</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 {assign var=&quot;title&quot; value=&quot;$tag&quot;}
 {include file=&quot;_head.html&quot;}
-&lt;h1&gt;Posts tagged &amp;ldquo;{$tag}&amp;rdquo;&lt;/h1&gt;
+&lt;h1&gt;Posts tagged &amp;#8220;{$tag}&amp;#8221;&lt;/h1&gt;
 {include file=&quot;.tags/$tag.html&quot;}
 &lt;/div&gt;
 &lt;div class=&quot;nav&quot;&gt;</diff>
      <filename>templates/tags.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fc7fcc4da5d0bba43677681b9bd20067ed3fe162</id>
    </parent>
  </parents>
  <author>
    <name>Richard Crowley</name>
    <email>r@rcrowley.org</email>
  </author>
  <url>http://github.com/rcrowley/bashpress/commit/98999252c396576b54f96e548bd24657fc7b3355</url>
  <id>98999252c396576b54f96e548bd24657fc7b3355</id>
  <committed-date>2009-09-05T11:06:11-07:00</committed-date>
  <authored-date>2009-09-05T11:06:11-07:00</authored-date>
  <message>Cleaning up coding style and reacquainting myself with this codebase.</message>
  <tree>89890ef650f9c5be3e288380757512d2c232a618</tree>
  <committer>
    <name>Richard Crowley</name>
    <email>r@rcrowley.org</email>
  </committer>
</commit>
