Index: trunk/docs/coding_standards.txt
===================================================================
--- trunk/docs/coding_standards.txt	(revision 208)
+++ trunk/docs/coding_standards.txt	(revision 209)
@@ -4,5 +4,5 @@
 
 ======================================================================
-Preable
+Preamble
 ======================================================================
 
@@ -142,8 +142,8 @@
 
 ======================================================================
-String concatination
-======================================================================
-
-Always include a space before and after the concatonation operator '.' which
+String concatenation
+======================================================================
+
+Always include a space before and after the concatenation operator '.' which
 improves readability and improves search-and-replace of adjacent elements.
 
@@ -175,5 +175,5 @@
 
 For large or complex blocks of HTML, using the following method is much faster
-and safer than echo because the php processesor is bypassed and content goes
+and safer than echo because the php processor is bypassed and content goes
 directly to output:
 
@@ -313,5 +313,5 @@
 
 All form definitions must be on their own line and either fully defined within
-a <td></td> pair or be outside table tags. Forms must also aways have an action
+a <td></td> pair or be outside table tags. Forms must also always have an action
 parameter:
 
@@ -365,5 +365,5 @@
 When building queries referencing two-or-more tables always preface columns
 with the table containing the column (admin_tbl.username, location_tbl.location_address).
-This method is much prefered over using aliases of table names (a.username, l.location_address).
+This method is much preferred over using aliases of table names (a.username, l.location_address).
 
 Table names should be singular (user_tbl instead of users_tbl).
Index: trunk/lib/ACL.inc.php
===================================================================
--- trunk/lib/ACL.inc.php	(revision 208)
+++ trunk/lib/ACL.inc.php	(revision 209)
@@ -604,5 +604,5 @@
     * Calculates the most specific cascading privilege found for a requested
     * ARO -> ACO -> AXO entry. Returns FALSE if the entry is denied. By default, 
-    * all entries are denied, unless some point in the hierarchy is set ao "allow."
+    * all entries are denied, unless some point in the hierarchy is set to "allow."
     *
     * @access   public
Index: trunk/lib/Auth_File.inc.php
===================================================================
--- trunk/lib/Auth_File.inc.php	(revision 208)
+++ trunk/lib/Auth_File.inc.php	(revision 209)
@@ -307,4 +307,19 @@
     }
     
+    /**
+     * Wrapper function for compatability with lib/Lock.inc.php.
+     *
+     * @param  string  $username    Username to return.
+     * @return string               Username, or false if none found.
+     */
+    function getUsername($username)
+    {
+        if ('' != $username) {
+            return $username;
+        } else {
+            return false;
+        }
+    }
+
     /*
     * Reads the configured htpasswd file into the _users array.
Index: trunk/lib/DB.inc.php
===================================================================
--- trunk/lib/DB.inc.php	(revision 208)
+++ trunk/lib/DB.inc.php	(revision 209)
@@ -143,5 +143,5 @@
             // Die or continue without connection?
             if ($this->getParam('db_die_on_failure')) {
-                echo "\n\n<!-- Script execution stopped out of embarrassment. -->";
+                echo "\n\n<!-- Script execution stopped out of embarrassment. There was a database error. -->";
                 die;
             } else {
@@ -154,5 +154,9 @@
 
         // Tell MySQL what character set we're useing. Available only on MySQL verions > 4.01.01.
-        $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[strtolower($app->getParam('character_set'))] . "' */");
+        if ('' != $app->getParam('character_set') && isset($this->mysql_character_sets[strtolower($app->getParam('character_set'))])) {
+            $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[strtolower($app->getParam('character_set'))] . "' */");
+        } else {
+            $app->logMsg(sprintf('%s is not a known character_set.', $app->getParam('character_set')), LOG_ERR, __FILE__, __LINE__);
+        }
 
         return true;
