Index: /trunk/bin/acl.cli.php
===================================================================
--- /trunk/bin/acl.cli.php	(revision 333)
+++ /trunk/bin/acl.cli.php	(revision 334)
@@ -220,8 +220,8 @@
 "Bob can edit" (period).
 
-Each access object is stored as a node in hierarchial tree structures. A
-premission granted to a node is applied to all its children. If a child
+Each access object is stored as a node in hierarchical tree structures. A
+permission granted to a node is applied to all its children. If a child
 node is specified a different permission that is more specific that
-anything on the branch it will take precidence. If no permission is
+anything on the branch it will take precedence. If no permission is
 specified, root is used for that object. Root, in this case, means
 "anything" since it is at the top of all branches.
@@ -250,5 +250,5 @@
 For the add*, mv*, grant, and revoke commands if any of the optional 
 args are not provided, 'root' is assumed. For the delete command 
-'null' is considered a wildcard to delete all objects of that type.
+'null' is considered a wild-card to delete all objects of that type.
 
 
@@ -335,5 +335,5 @@
     global $this_script;
     
-    // Retreive access value from db.
+    // Retrieve access value from db.
     $qid = $db->query("
         SELECT aro_tbl.name AS aro, aco_tbl.name AS aco, axo_tbl.name AS axo, acl_tbl.access, acl_tbl.added_datetime
Index: /trunk/bin/module_maker/_config.inc.php
===================================================================
--- /trunk/bin/module_maker/_config.inc.php	(revision 333)
+++ /trunk/bin/module_maker/_config.inc.php	(revision 334)
@@ -49,5 +49,5 @@
 $app->start();
 
-// Global DB object. Automatically preconfigured by $app->start().
+// Global DB object. Automatically pre-configured by $app->start().
 $db =& DB::getInstance();
 
Index: /trunk/bin/module_maker/module.cli.php
===================================================================
--- /trunk/bin/module_maker/module.cli.php	(revision 333)
+++ /trunk/bin/module_maker/module.cli.php	(revision 334)
@@ -81,5 +81,5 @@
 $public_detail_template = $module_name_singular . '_view.ihtml';
 
-// Databaes names
+// Database names
 $db_tbl = $module_name_singular . '_tbl';
 $primary_key = $module_name_singular . '_id';
Index: /trunk/css/admin2.inc.css
===================================================================
--- /trunk/css/admin2.inc.css	(revision 333)
+++ /trunk/css/admin2.inc.css	(revision 334)
@@ -95,5 +95,5 @@
 /*     float: left; */
     width: 9em;
-    min-width: 9em;
+/*     min-width: 9em; */
     margin: 0 0 10px 0;
     padding: 0;
Index: /trunk/docs/codebase_v1-to-v2_upgrade_checklist.txt
===================================================================
--- /trunk/docs/codebase_v1-to-v2_upgrade_checklist.txt	(revision 333)
+++ /trunk/docs/codebase_v1-to-v2_upgrade_checklist.txt	(revision 334)
@@ -23,5 +23,5 @@
     
     
-3. $CFG-> variables are gone. Most of these should be converted into their $app and $auth equivelents. If a $CFG variable is NOT something used by the codebase but is still needed by the website application, I suggest converting these values to a $cfg array. For example, this:
+3. $CFG-> variables are gone. Most of these should be converted into their $app and $auth equivalents. If a $CFG variable is NOT something used by the codebase but is still needed by the website application, I suggest converting these values to a $cfg array. For example, this:
 
     $CFG->gallery_images_url = '/gallery_images';
@@ -35,5 +35,5 @@
     "{$cfg['gallery_images_url']}/my/path". 
     
-If the value used is now to be retreived from a $object->getParam(...) method call, youll need to do this: 
+If the value used is now to be retrieved from a $object->getParam(...) method call, you'll need to do this: 
 
     $object->getParam('gallery_images_url') . '/my/path'
@@ -48,8 +48,8 @@
     <a href="<?php echo $app->ohref("/my/file.php"); ?>">
     
-(In otherwords, the URL should be a not-fully-qualified URL starting with a slash.)
-
-
-// 5. Expect formatting incosistencies! When doing global search-replace expect whitespace to be erratic, variable names to change, and lines to be otherwise inconsistent. Here's a good example of a safe way to match a line:
+(In other words, the URL should be a not-fully-qualified URL starting with a slash.)
+
+
+// 5. Expect formatting inconsistencies! When doing global search-replace expect whitespace to be erratic, variable names to change, and lines to be otherwise inconsistent. Here's a good example of a safe way to match a line:
 
 Searching for "$CFG->ssl_domain = 'www.example.com';":
Index: /trunk/docs/coding_standards.txt
===================================================================
--- /trunk/docs/coding_standards.txt	(revision 333)
+++ /trunk/docs/coding_standards.txt	(revision 334)
@@ -234,5 +234,5 @@
             return true;
         } else {
-            // To be valid email address must match regex and fit within the lenth constraints.
+            // To be valid email address must match regex and fit within the length constraints.
             if (preg_match($this->getParam('regex'), $email, $e_parts) && mb_strlen($e_parts[2]) < 64 && mb_strlen($e_parts[3]) < 255) {
                 return true;
Index: /trunk/docs/examples/db_auth.inc.php
===================================================================
--- /trunk/docs/examples/db_auth.inc.php	(revision 333)
+++ /trunk/docs/examples/db_auth.inc.php	(revision 334)
@@ -3,5 +3,5 @@
 * The credentials here are to be loaded only by command-line scripts executed 
 * on the command line or via cron. This script should be not be readable by apache. 
-* Ownershipt should be the web owner, with only user-readbility, such as:
+* Ownership should be the web owner, with only user-readability, such as:
 * -rw-------@  1 bob  bob   416 Mar 10 16:59 global/db_auth.inc.php
 */
Index: /trunk/docs/examples/virtualhost_directive.conf
===================================================================
--- /trunk/docs/examples/virtualhost_directive.conf	(revision 333)
+++ /trunk/docs/examples/virtualhost_directive.conf	(revision 334)
@@ -8,5 +8,5 @@
     SetEnv DB_USER user_asdf
     SetEnv DB_PASS pass_asdf
-    SetEnv SIGNING_KEY wekgbb92e2397g3r293gh
+    SetEnv SIGNING_KEY kjhu3hf4gpoh2p9fgh8223t8h120
     <Directory "/home/user/www.example.com">
         php_admin_value open_basedir "/home/user/www.example.com:/usr/local/lib/php:/tmp"
Index: /trunk/docs/file_layout.txt
===================================================================
--- /trunk/docs/file_layout.txt	(revision 333)
+++ /trunk/docs/file_layout.txt	(revision 334)
@@ -1,3 +1,4 @@
 Updated: 11 Dec 2006 16:25:10
+(This document is probably out-of-date.)
 =====================================================================
 
@@ -42,5 +43,5 @@
         Auth_SQL.inc.php (sql-based authentication system)
         AuthorizeNet.inc.php (routines for connection to authorize.net's advanced processing interface)
-        Cache.inc.php (provides session-based caching functionality for quick retreival of all PHP data types)
+        Cache.inc.php (provides session-based caching functionality for quick retrieval of all PHP data types)
         CSS.inc.php (manage and deliver CSS data)
         DB.inc.php (minimal database abstraction layer)
@@ -49,5 +50,5 @@
         FormValidator.inc.php (validation routines used to test incoming user data)
         Google_API.inc.php (class for connecting to, querying, and dealing with data of the Google API)
-        Heirarchy.php (class for manipulation of heirarchies)
+        Heirarchy.php (class for manipulation of hierarchies)
         Image.inc.php (manage printing of images related to db records)
         ImageThumb.inc.php (automated image thumbnailing routines)
@@ -55,9 +56,9 @@
         MCVE.inc.php
         Navigation.inc.php (navigation element management class))
-        PageNumbers.inc.php (class for managing and printing various elements of page numbers and pagenation)
+        PageNumbers.inc.php (class for managing and printing various elements of page numbers and pagination)
         PageSequence.inc.php (manage a sequence of steps and data from step form elements, like order checkout or signup)
         PayPal.inc.php
         PEdit.inc.php (page-by-page file-based content management system)
-        Prefs.inc.php (class for semi-permenent storage of values)
+        Prefs.inc.php (class for semi-permanent storage of values)
         ScriptTimer.inc.php (timer for scripts)
         SortOrder.inc.php (class dealing with sorting of columns in database generated lists)
@@ -109,5 +110,5 @@
     versions.php (manage db record versions)
 
-html/(DocumentRoot of main site application)
+html/ (DocumentRoot of main site application)
     _config.inc.php (configuration options and defaults specific to this site. included first in each script)
     _templates/ (site specific templates. templates here override global codebase templates with same name)
Index: /trunk/docs/version.txt
===================================================================
--- /trunk/docs/version.txt	(revision 333)
+++ /trunk/docs/version.txt	(revision 334)
@@ -1,1 +1,1 @@
-2.1.2dev
+2.1.3dev
Index: /trunk/lib/ACL.inc.php
===================================================================
--- /trunk/lib/ACL.inc.php	(revision 333)
+++ /trunk/lib/ACL.inc.php	(revision 334)
@@ -21,5 +21,5 @@
     var $_params = array(
         
-        // If false nothing will be cached or retreived. Useful for testing realtime data requests.
+        // If false nothing will be cached or retrieved. Useful for testing realtime data requests.
         'enable_cache' => true,
 
@@ -178,5 +178,5 @@
                     trigger_error(sprintf('Database table %s has invalid columns. Please update this table manually.', "{$a_o}_tbl"), E_USER_ERROR);
                 } else {
-                    // Insert root node data if nonexistant.
+                    // Insert root node data if nonexistent.
                     $qid = $db->query("SELECT 1 FROM {$a_o}_tbl WHERE name = 'root'");
                     if (mysql_num_rows($qid) == 0) {
@@ -247,5 +247,5 @@
         $qid = $db->query("SELECT rgt FROM $tbl WHERE name = '" . $db->escapeString($parent) . "'");
         if (!list($parent_rgt) = mysql_fetch_row($qid)) {
-            $app->logMsg(sprintf('Cannot add %s node to nonexistant parent: %s', $type, $parent), LOG_WARNING, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Cannot add %s node to nonexistent parent: %s', $type, $parent), LOG_WARNING, __FILE__, __LINE__);
             return false;
         }
@@ -325,5 +325,5 @@
         $qid = $db->query("SELECT lft, rgt FROM $tbl WHERE name = '" . $db->escapeString($name) . "'");
         if (!list($lft, $rgt) = mysql_fetch_row($qid)) {
-            $app->logMsg(sprintf('Cannot delete nonexistant %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Cannot delete nonexistent %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__);
             return false;
         }
@@ -412,5 +412,5 @@
         $qid = $db->query("SELECT lft, rgt FROM $tbl WHERE name = '" . $db->escapeString($name) . "'");
         if (!list($lft, $rgt) = mysql_fetch_row($qid)) {
-            $app->logMsg(sprintf('Cannot move nonexistant %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Cannot move nonexistent %s name: %s', $type, $name), LOG_NOTICE, __FILE__, __LINE__);
             return false;
         }
@@ -422,5 +422,5 @@
         $qid = $db->query("SELECT rgt FROM $tbl WHERE name = '" . $db->escapeString($new_parent) . "'");
         if (!list($new_parent_rgt) = mysql_fetch_row($qid)) {
-            $app->logMsg(sprintf('Cannot move %s node to nonexistant parent: %s', $type, $new_parent), LOG_WARNING, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Cannot move %s node to nonexistent parent: %s', $type, $new_parent), LOG_WARNING, __FILE__, __LINE__);
             return false;
         }
@@ -661,5 +661,5 @@
             if (!list($access) = mysql_fetch_row($qid)) {
                 $this->cache->set($cache_hash, 'deny');
-                $app->logMsg(sprintf('Access denyed: %s -> %s -> %s. No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Access denied: %s -> %s -> %s. No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
                 return false;
             }
@@ -671,5 +671,5 @@
             return true;
         } else {
-            $app->logMsg(sprintf('Access denyed: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Access denied: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
             return false;
         }
Index: /trunk/lib/App.inc.php
===================================================================
--- /trunk/lib/App.inc.php	(revision 333)
+++ /trunk/lib/App.inc.php	(revision 334)
@@ -417,5 +417,5 @@
      *
      * @access  public
-     * @return  array   List of messags in FIFO order.
+     * @return  array   List of messages in FIFO order.
      * @author  Quinn Comendant <quinn@strangecode.com>
      * @since   21 Dec 2005 13:09:20
@@ -620,5 +620,5 @@
 
     /**
-     * Forcefully set a query argument even if one currently exists in the reqeust.
+     * Forcefully set a query argument even if one currently exists in the request.
      * Values in the _carry_queries array will be copied to URLs (via $app->url()) and
      * to hidden input values (via printHiddenSession()).
@@ -762,5 +762,5 @@
         // - sessions are enabled
         // - the link stays on our site
-        // - transparent SID propogation with session.use_trans_sid is not being used OR url begins with protocol (using_trans_sid has no effect here)
+        // - transparent SID propagation with session.use_trans_sid is not being used OR url begins with protocol (using_trans_sid has no effect here)
         // OR
         // - we must include the SID because we say so (it's used in a context where cookies will not be effective, ie. moving from http to https)
@@ -799,5 +799,5 @@
      * @access  public
      * @param   string  $url    Input URL to parse.
-     * @return  string          URL with $app->url() and htmlentities() applied.
+     * @return  string          URL passed through $app->url() and then & turned to $amp;.
      * @author  Quinn Comendant <quinn@strangecode.com>
      * @since   09 Dec 2005 17:58:45
@@ -1069,5 +1069,5 @@
         }
 
-        // Time is the timestamp of a boomerangURL redirection, or setting of a boomerangURL.
+        // Time is the time stamp of a boomerangURL redirection, or setting of a boomerangURL.
         // a boomerang redirection will always occur at least several seconds after the last boomerang redirect
         // or a boomerang being set.
Index: /trunk/lib/Auth_File.inc.php
===================================================================
--- /trunk/lib/Auth_File.inc.php	(revision 333)
+++ /trunk/lib/Auth_File.inc.php	(revision 334)
@@ -308,5 +308,5 @@
     
     /**
-     * Wrapper function for compatability with lib/Lock.inc.php.
+     * Wrapper function for compatibility with lib/Lock.inc.php.
      *
      * @param  string  $username    Username to return.
Index: /trunk/lib/Auth_SQL.inc.php
===================================================================
--- /trunk/lib/Auth_SQL.inc.php	(revision 333)
+++ /trunk/lib/Auth_SQL.inc.php	(revision 334)
@@ -25,5 +25,5 @@
     var $_authentication_tested;
 
-    // Paramters to be configured by setParam.
+    // Parameters to be configured by setParam.
     var $_params = array();
     var $_default_params = array(
@@ -70,6 +70,6 @@
         'login_abuse_max_ips' => 5,
 
-        // The IP address subnet size threshold. Uses a CIDR notation network mask (see CIDR cheatsheet at bottom).
-        // Any integar between 0 and 32 is permitted. Setting this to '24' permits any address in a
+        // The IP address subnet size threshold. Uses a CIDR notation network mask (see CIDR cheat-sheet at bottom).
+        // Any integer between 0 and 32 is permitted. Setting this to '24' permits any address in a
         // class C network (255.255.255.0) to be considered the same. Setting to '32' compares each IP absolutely.
         // Setting to '0' ignores all IPs, thus disabling login_abuse checking.
@@ -753,11 +753,11 @@
      * Returns a randomly generated password based on $pattern. The pattern is any
      * sequence of 'x', 'V', 'C', 'v', 'c', or 'd' and if it is something like 'cvccv' this
-     * function will generate a pronouncable password. Recommend using more complex
+     * function will generate a pronounceable password. Recommend using more complex
      * patterns, at minimum the US State Department standard: cvcddcvc.
      *
      * - x    a random upper or lower alpha character or digit
-     * - C    a random upper or lower consanant
+     * - C    a random upper or lower consonant
      * - V    a random upper or lower vowel
-     * - c    a random lowercase consanant
+     * - c    a random lowercase consonant
      * - v    a random lowercase vowel
      * - d    a random digit
@@ -794,5 +794,5 @@
         
         // Existing password hashes rely on the same key/salt being used to compare encryptions.
-        // Don't change this unless you know existing hashes or signatures will not be affected!
+        // Don't change this (or the value applied to signing_key) unless you know existing hashes or signatures will not be affected!
         $more_salt = 'B36D18E5-3FE4-4D58-8150-F26642852B81';
         
@@ -860,5 +860,5 @@
         ");
         if (!list($old_encrypted_password) = mysql_fetch_row($qid)) {
-            $app->logMsg(sprintf('Cannot set password for nonexistant user_id %s', $user_id), LOG_NOTICE, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Cannot set password for nonexistent user_id %s', $user_id), LOG_NOTICE, __FILE__, __LINE__);
             return false;
         }
@@ -937,5 +937,5 @@
                 'USERNAME' => $user_data[$this->_params['db_username_column']],
                 'PASSWORD' => $password,
-                'REASON' => ('' == trim($reason) ? '' : trim($reason) . ' '), // Add a space after the reason if it exists for better fromatting.
+                'REASON' => ('' == trim($reason) ? '' : trim($reason) . ' '), // Add a space after the reason if it exists for better formatting.
             ));
             $email->send();
@@ -954,5 +954,5 @@
      * NOTE: "user_type" used to be called "priv" in some older implementations.
      *
-     * @param  constant $security_zone   string of comma delimited priviliges for the zone
+     * @param  constant $security_zone   string of comma delimited privileges for the zone
      * @param  string   $user_type       a privilege that might be found in a zone
      * @return bool     true if user is a member of security zone, false otherwise
@@ -979,5 +979,5 @@
      * NOTE: "user_type" used to be called "priv" in some older implementations.
      *
-     * @param  constant $security_zone   string of comma delimited priviliges for the zone
+     * @param  constant $security_zone   string of comma delimited privileges for the zone
      */
     function requireAccessClearance($security_zone, $message='')
Index: /trunk/lib/AuthorizeNet.inc.php
===================================================================
--- /trunk/lib/AuthorizeNet.inc.php	(revision 333)
+++ /trunk/lib/AuthorizeNet.inc.php	(revision 334)
@@ -239,5 +239,5 @@
 
     /**
-     * Tests a returned md5 hash value with a locally computated one.
+     * Tests a returned md5 hash value with a locally computed one.
      *
      * @access public
Index: /trunk/lib/Cache.inc.php
===================================================================
--- /trunk/lib/Cache.inc.php	(revision 333)
+++ /trunk/lib/Cache.inc.php	(revision 334)
@@ -23,5 +23,5 @@
     var $_params = array(
         
-        // If false nothing will be cached or retreived. Useful for testing realtime data requests.
+        // If false nothing will be cached or retrieved. Useful for testing realtime data requests.
         'enabled' => true,
 
@@ -117,5 +117,5 @@
 
     /**
-     * Stores a new variable in the session cache. The $key should not be numberic
+     * Stores a new variable in the session cache. The $key should not be numeric
      * because the array_shift function will reset the key to the next largest 
      * int key. Weird behavior I can't understand. For example $cache["123"] will become $cache[0]
@@ -169,5 +169,5 @@
 
     /**
-     * Retrives an object from the session cache and returns it unserialized.
+     * Retrieves an object from the session cache and returns it unserialized.
      * It also moves it to the top of the stack, which makes it such that the
      * cache flushing mechanism of putCache deletes the oldest referenced items
Index: /trunk/lib/Currency.inc.php
===================================================================
--- /trunk/lib/Currency.inc.php	(revision 333)
+++ /trunk/lib/Currency.inc.php	(revision 334)
@@ -123,5 +123,5 @@
             ));
             if (false === $value || !is_numeric($value)) {
-                // Failed retreiving SOAP value. Use cached copy for now.
+                // Failed retrieving SOAP value. Use cached copy for now.
                 $app->logMsg(sprintf('Failed getting SOAP currency exchange rates: %s-to-%s, using cached copy', $base, $target), LOG_NOTICE, __FILE__, __LINE__);
                 if (!$value = file_get_contents($cache_file_path)) {
Index: /trunk/lib/DB.inc.php
===================================================================
--- /trunk/lib/DB.inc.php	(revision 333)
+++ /trunk/lib/DB.inc.php	(revision 334)
@@ -148,5 +148,5 @@
         $this->_connected = true;
 
-        // Tell MySQL what character set we're useing. Available only on MySQL verions > 4.01.01.
+        // Tell MySQL what character set we're using. Available only on MySQL versions > 4.01.01.
         if ('' != $app->getParam('character_set') && isset($this->mysql_character_sets[mb_strtolower($app->getParam('character_set'))])) {
             $this->query("/*!40101 SET NAMES '" . $this->mysql_character_sets[mb_strtolower($app->getParam('character_set'))] . "' */");
@@ -284,5 +284,5 @@
      * Loads a list of tables in the current database into an array, and returns
      * true if the requested table is found. Use this function to enable/disable
-     * funtionality based upon the current available db tables or to dynamically
+     * functionality based upon the current available db tables or to dynamically
      * create tables if missing.
      *
Index: /trunk/lib/Email.inc.php
===================================================================
--- /trunk/lib/Email.inc.php	(revision 333)
+++ /trunk/lib/Email.inc.php	(revision 334)
@@ -68,5 +68,5 @@
     function Email($params=null)
     {
-        // The regex used in validEmail(). Set here instead of in the default _params above so we can use the concatination . dot.
+        // The regex used in validEmail(). Set here instead of in the default _params above so we can use the concatenation . dot.
         // This matches an email address as complex as:
         //      Bob John-Smith <bob&smith's/dep=sales!@smith-wick.ca.us> (Sales department)
@@ -347,5 +347,5 @@
             return true;
         } else {
-            // To be valid email address must match regex and fit within the lenth constraints.
+            // To be valid email address must match regex and fit within the length constraints.
             if (preg_match($this->getParam('regex'), $email, $e_parts) && mb_strlen($e_parts[2]) < 64 && mb_strlen($e_parts[3]) < 255) {
                 return true;
Index: /trunk/lib/Google_API.inc.php
===================================================================
--- /trunk/lib/Google_API.inc.php	(revision 333)
+++ /trunk/lib/Google_API.inc.php	(revision 334)
@@ -147,17 +147,4 @@
         }
     }
-
-    /**
-     * getFault
-     *
-     * returns a simple native php array containing the fault data
-     *
-     * @return array
-     * @access public
-     */
-    function getFault()
-    {
-        return $this->_soapClient->__getfault();
-    }
 }
 ?>
Index: /trunk/lib/Hierarchy.inc.php
===================================================================
--- /trunk/lib/Hierarchy.inc.php	(revision 333)
+++ /trunk/lib/Hierarchy.inc.php	(revision 334)
@@ -11,5 +11,5 @@
  * data. You must provide identification of a piece of data (type and ID) to
  * insert it into the hierarchy. The node hierarchy is completely
- * separate from data storage and retreival. You must separatly store the data
+ * separate from data storage and retrieval. You must separately store the data
  * using whatever logic is specific to the data then also call these functions.
  * Nodes are not the data. The nodes are mere singularities in virtual space
@@ -123,5 +123,5 @@
 
     /**
-     * Takes a singlar node identifier and returns it as components of an array.
+     * Takes a singular node identifier and returns it as components of an array.
      * @param string    $node
      * @return mixed    Array of node type and id on success, false on failure.
@@ -145,5 +145,5 @@
      * @param string    $parents    A serialized array of serialized parent identifiers
      * @param string    $relationship_type
-     * @return bool     true on sucess, false on error.
+     * @return bool     true on success, false on error.
      */
     function insertNode($parents, $child_type=null, $child_id=null, $relationship_type=null, $title='')
@@ -346,5 +346,5 @@
     /**
      * Returns an array of all the parents of the current node (just the ones
-     * immediatly above this node). You may need to call array_unique if you
+     * immediately above this node). You may need to call array_unique if you
      * don't want duplicate nodes returned.
      *
@@ -439,5 +439,5 @@
     /**
      * Returns an array of all the children of the current node (just the ones
-     * immediatly below this node). You may need to call array_unique if you
+     * immediately below this node). You may need to call array_unique if you
      * don't want duplicate nodes returned.
      *
@@ -598,5 +598,5 @@
      * @param  bool      $go_linear  ?
      * @param  int       $_return_flag  An internal value that counts up as
-     *                                  recursion progesses. When the value
+     *                                  recursion progresses. When the value
      *                                  drops back to 0, we return the output.
      * @return array     Array of serialized node identifiers.
@@ -756,5 +756,5 @@
                 }
                 if (!$is_a_leaf[$this->toStringID($my_children[$i]['child_type'], $my_children[$i]['child_id'])]) {
-                    // If this node is not a leaf, we dive into it recursivly.
+                    // If this node is not a leaf, we dive into it recursively.
                     $this->getNodeList($preselected, $my_children[$i]['child_type'], $my_children[$i]['child_id'], $type_constraint, $include_curr, $order, $_indent+1, false);
                 }
@@ -803,5 +803,5 @@
     /**
      * Used internally by setSubnodeQty to add the quantity of subnodes to
-     * all parents recursivly.
+     * all parents recursively.
      */
     function setSubnodeQtyToParents($child_type, $child_id, $num_children)
Index: /trunk/lib/Image.inc.php
===================================================================
--- /trunk/lib/Image.inc.php	(revision 333)
+++ /trunk/lib/Image.inc.php	(revision 334)
@@ -56,5 +56,5 @@
         $src = $this->oSrc($id);
         $filepath = preg_match('!://!', $src) ? $src : getenv('DOCUMENT_ROOT') . $src;
-        // Use exif_imagetype to check not only file existance but that of a valid image.
+        // Use exif_imagetype to check not only file existence but that of a valid image.
         return false != @exif_imagetype($filepath);
     }
Index: /trunk/lib/ImageThumb.inc.php
===================================================================
--- /trunk/lib/ImageThumb.inc.php	(revision 333)
+++ /trunk/lib/ImageThumb.inc.php	(revision 334)
@@ -33,5 +33,5 @@
         'dest_file_perms' => 0600,
 
-        // Permissions of autocreated directories. Must be at least 0700 with owner=apache.
+        // Permissions of auto-created directories. Must be at least 0700 with owner=apache.
         'dest_dir_perms' => 0700,
 
@@ -63,5 +63,5 @@
         'dest_file_extension' => 'jpg',
         
-        // Type of scaling to perform, and sizes used to calculate max dimentions.
+        // Type of scaling to perform, and sizes used to calculate max dimensions.
         'scaling_type' => IMAGETHUMB_FIT_LARGER,
         'width' => null,
@@ -158,5 +158,5 @@
      * @param   array   $spec   The specifications for a size of output image.
      * @param   int     $index  The position of the specification in the spec array
-     *                          Use to overwrite existing spev array values.
+     *                          Use to overwrite existing spec array values.
      */
     function setSpec($spec, $index=null)
@@ -229,9 +229,9 @@
     
     /*
-    * Retreive a value of a thumb specification.
+    * Retrieve a value of a thumb specification.
     *
     * @access   public
     * @param    string  $key    Key to return. See _default_image_specs above for a list.
-    * @param    int     $index  The index in the spec array of the value to retreive. The first if not specified.
+    * @param    int     $index  The index in the spec array of the value to retrieve. The first if not specified.
     * @return   mixed           Value of requested index.
     * @author   Quinn Comendant <quinn@strangecode.com>
@@ -297,5 +297,5 @@
 		$app =& App::getInstance();
 
-        // Source file determinted by provided file_name.
+        // Source file determined by provided file_name.
         $source_file = realpath(sprintf('%s/%s', $this->getParam('source_dir'), $file_name));
         
@@ -415,5 +415,5 @@
         }
 
-        // If > 0, there was a problem thumbnailing.
+        // If > 0, there was a problem thumb-nailing.
         return 0 === $return_val;
     }
@@ -508,5 +508,5 @@
         list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_file);
 
-        // Define destination image dimentions.
+        // Define destination image dimensions.
         switch ($spec['scaling_type']) {
         case IMAGETHUMB_FIT_WIDTH :
Index: /trunk/lib/Lock.inc.php
===================================================================
--- /trunk/lib/Lock.inc.php	(revision 333)
+++ /trunk/lib/Lock.inc.php	(revision 334)
@@ -327,5 +327,5 @@
 
     /**
-     * Delete's all locks that are older than auto_timeout.
+     * Deletes all locks that are older than auto_timeout.
      */
     function _auto_timeout()
Index: /trunk/lib/Navigation.inc.php
===================================================================
--- /trunk/lib/Navigation.inc.php	(revision 333)
+++ /trunk/lib/Navigation.inc.php	(revision 334)
@@ -52,5 +52,5 @@
      * @param   string  $title      The title of the page.
      * @param   string  $url        The URL to the page. Set to null to use PHP_SELF.
-     * @param   array   $vars       Additoinal page variables.
+     * @param   array   $vars       Additional page variables.
      */
     function add($title, $url=null, $vars=array())
@@ -178,6 +178,6 @@
 
     /**
-     * Returns the text path from root up to the current page, seperated by the
-     * path_delimeter.
+     * Returns the text path from root up to the current page, separated by the
+     * path_delimiter.
      *
      * @access  public
Index: /trunk/lib/PEdit.inc.php
===================================================================
--- /trunk/lib/PEdit.inc.php	(revision 333)
+++ /trunk/lib/PEdit.inc.php	(revision 334)
@@ -7,5 +7,5 @@
  * which will be printed to the client browser under normal
  * circumstances, but an authenticated user can 'edit' the document--
- * data stored in vars will be shown in html form elements to be editied
+ * data stored in vars will be shown in html form elements to be edited
  * and saved. Posted data is stored in XML format in a specified data dir.
  * A copy of the previous version is saved with the unix
@@ -313,5 +313,5 @@
 
     /**
-     * Prints the endig </form> HTML tag, as well as buttons used during
+     * Prints the ending </form> HTML tag, as well as buttons used during
      * different operations.
      *
@@ -409,5 +409,5 @@
 
     /*
-    * Returns a secreat hash for the current file.
+    * Returns a secret hash for the current file.
     *
     * @access   public
@@ -693,5 +693,5 @@
         // Ensure specified version exists.
         if (!file_exists($version_file)) {
-            $app->logMsg(sprintf('Cannot restore non-existant file: %s', $version_file), LOG_NOTICE, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Cannot restore non-existent file: %s', $version_file), LOG_NOTICE, __FILE__, __LINE__);
             return false;
         }
Index: /trunk/lib/PageNumbers.inc.php
===================================================================
--- /trunk/lib/PageNumbers.inc.php	(revision 333)
+++ /trunk/lib/PageNumbers.inc.php	(revision 334)
@@ -152,5 +152,5 @@
         }
 
-        // If the specified page exceedes total pages or is less than 1, set the page to 1.
+        // If the specified page exceeds total pages or is less than 1, set the page to 1.
         if ($this->_per_page * $this->current_page >= $this->total_items + $this->_per_page || $this->_per_page * $this->current_page < 1) {
             $this->current_page = 1;
Index: /trunk/lib/PageSequence.inc.php
===================================================================
--- /trunk/lib/PageSequence.inc.php	(revision 333)
+++ /trunk/lib/PageSequence.inc.php	(revision 334)
@@ -148,5 +148,5 @@
      * Get the current step id.
      *
-     * @return int $pos    Actual step poisition
+     * @return int $pos    Actual step position
      * @access public
      */
@@ -219,5 +219,5 @@
      * uncompleted step.
      *
-     * @return string  Step identifyer of the next step.
+     * @return string  Step identifier of the next step.
      * @access public
      */
@@ -240,5 +240,5 @@
     /**
      * To set a set as 'completed'.
-     * @return string  Step identifyer of the next step.
+     * @return string  Step identifier of the next step.
      * @access public
      */
@@ -273,5 +273,5 @@
      * @param  string $step_id   ID of current step.
      * @param  mixed  $step_data Data to place into session storage.
-     * @return string  Step identifyer of the next step.
+     * @return string  Step identifier of the next step.
      * @access public
      */
@@ -320,5 +320,5 @@
 
     /**
-     * Delete's all data that are older than auto_timeout. Set current time if not not expired or not set.
+     * Deletes all data that are older than auto_timeout. Set current time if not not expired or not set.
      */
     function _auto_timeout()
@@ -361,27 +361,4 @@
     }
 
-    /**
-     * Template function to be extended with custom SQL code.
-     *
-     * @return int  Unique DB identifyer for saved record.
-     * @access public
-     */
-    function saveData()
-    {
-        return false;
-    }
-
-    /**
-     * Template function to be extended with custom SQL code.
-     *
-     * @return mixed  Data stored in DB.
-     * @access public
-     */
-    function loadData()
-    {
-        return false;
-    }
-
-
 } // END CLASS
 
Index: /trunk/lib/Prefs.inc.php
===================================================================
--- /trunk/lib/Prefs.inc.php	(revision 333)
+++ /trunk/lib/Prefs.inc.php	(revision 334)
@@ -180,5 +180,5 @@
         }
         
-        // Set a persistent perference if...
+        // Set a persistent preference if...
         // - there isn't a default.
         // - the new value is different than the default
Index: /trunk/lib/SortOrder.inc.php
===================================================================
--- /trunk/lib/SortOrder.inc.php	(revision 333)
+++ /trunk/lib/SortOrder.inc.php	(revision 334)
@@ -98,5 +98,5 @@
         // (1) By GET or POST specification, if available.
         // (2) By saved preference, if available.
-        // (3) By default (provided at class instanciation).
+        // (3) By default (provided at class instantiation).
         $new_order = getFormData('order');
         if (!empty($new_order)) {
Index: /trunk/lib/SpellCheck.inc.php
===================================================================
--- /trunk/lib/SpellCheck.inc.php	(revision 333)
+++ /trunk/lib/SpellCheck.inc.php	(revision 334)
@@ -233,5 +233,5 @@
 
     /**
-     * Returns an array of suggested words for each mispelled word in the given text.
+     * Returns an array of suggested words for each misspelled word in the given text.
      * The first word of the returned array is the (possibly) misspelled word.
      *
@@ -326,5 +326,5 @@
 
     /**
-     * Prints the HTML for correcting all mispellings found in the text of one $_FORM element.
+     * Prints the HTML for correcting all misspellings found in the text of one $_FORM element.
      *
      * @access  public
Index: /trunk/lib/TemplateGlue.inc.php
===================================================================
--- /trunk/lib/TemplateGlue.inc.php	(revision 333)
+++ /trunk/lib/TemplateGlue.inc.php	(revision 334)
@@ -57,5 +57,5 @@
 /**
  * Finds the values of an enumeration or set column of a MySQL database, returning them in an array.
- * Use this to generate a pull-down menu of options or to validate the existance
+ * Use this to generate a pull-down menu of options or to validate the existence
  * of options. (Quinn 10 Feb 2001)
  *
@@ -149,5 +149,5 @@
  * @param  array  $preselected   array of preselected values (matching the values in $db_col)
  * @param  int    $columns       number of table columns to print
- * @param  int    $flag          set to 'allone' for name of input fields to all be the same of a multidimentional array.
+ * @param  int    $flag          set to 'allone' for name of input fields to all be the same of a multidimensional array.
  * @param  bool   $sort          Sort the output.
  */
@@ -171,5 +171,5 @@
     }
 
-    // Retreive values of a Set or ENUM database column.
+    // Retrieve values of a Set or ENUM database column.
     $values = getSetEnumFieldValues($db_table, $db_col, $sort);
 
@@ -202,5 +202,5 @@
         }
         if ('allone' == $flag) {
-            // Print a cell with multidimentioal array checkboxes.
+            // Print a cell with multidimensional array checkboxes.
             $html_name = 'dbcol[' . $db_col . '][' . $v . ']';
         } else {
@@ -249,5 +249,5 @@
     }
 
-    // Retreive values of a Set or ENUM database column.
+    // Retrieve values of a Set or ENUM database column.
     $values = getSetEnumFieldValues($db_table, $db_col, $sort);
 
@@ -300,5 +300,5 @@
  * @param  string $preselected      the currently selected value of the menu. compared to the $val_column
  * @param  bool   $blank            leave one blank at the top?
- * @param  string $extra_clause     SQL exclude cluase. Something like "WHERE girls != 'buckteeth'"
+ * @param  string $extra_clause     SQL exclude clause. Something like "WHERE girls != 'buckteeth'"
  */
 function printSelectForm($db_table, $key_column, $val_column, $preselected, $blank=false, $extra_clause='', $sql_format='SELECT %1$s, %2$s FROM %3$s %4$s')
@@ -463,5 +463,5 @@
                 ?><input type="submit" name="<?php echo oTxt($b['name']) ?>" value="<?php echo oTxt($b['value']); ?>" accesskey="<?php echo oTxt($b['accesskey']); ?>" /><?php
             } else {
-                // For backwards compatability.
+                // For backwards compatibility.
                 ?><input type="submit" name="<?php echo oTxt($i) ?>" value="<?php echo oTxt($b); ?>" /><?php
             }
Index: /trunk/lib/Upload.inc.php
===================================================================
--- /trunk/lib/Upload.inc.php	(revision 333)
+++ /trunk/lib/Upload.inc.php	(revision 334)
@@ -38,5 +38,5 @@
         'dest_dir_perms' => 0700,
 
-        // Require file to have one of the following file name extentions.
+        // Require file to have one of the following file name extensions.
         'valid_file_extensions' => array('jpg', 'jpeg', 'gif', 'png', 'pdf', 'txt', 'text', 'html', 'htm'),
     );
@@ -118,7 +118,7 @@
      * @param   string  $form_name          The name of the form to process.
      * @param   string  $custom_file_name   The new name of the file. An array of filenames in the case of multiple files.
-     * @return  mixed   Returns FALSE if a major error occured preventing any file uploads.
-     *                  Returns an empty array if any minor errors occured or no files were found.
-     *                  Returns a multidimentional array of filenames, sizes and extentions, if one-or-more files succeeded uploading.
+     * @return  mixed   Returns FALSE if a major error occurred preventing any file uploads.
+     *                  Returns an empty array if any minor errors occurred or no files were found.
+     *                  Returns a multidimensional array of filenames, sizes and extensions, if one-or-more files succeeded uploading.
      *                  Note: this last option presents a problem in the case of when some files uploaded successfully, and some failed.
      *                        In this case it is necessary to check the Upload::anyErrors method to discover if any did fail.
@@ -442,5 +442,5 @@
 
     /**
-     * Determintes if any errors occured while calling the Upload::process method.
+     * Determines if any errors occurred while calling the Upload::process method.
      *
      * @access  public
@@ -471,8 +471,8 @@
 
     /**
-     * Returns the extention of a file name, or an empty string if non exists.
-     *
-     * @access  public
-     * @param   string  $file_name  A name of a file, with extention after a dot.
+     * Returns the extension of a file name, or an empty string if non exists.
+     *
+     * @access  public
+     * @param   string  $file_name  A name of a file, with extension after a dot.
      * @return  string              The value found after the dot
      */
Index: /trunk/lib/Utilities.inc.php
===================================================================
--- /trunk/lib/Utilities.inc.php	(revision 333)
+++ /trunk/lib/Utilities.inc.php	(revision 334)
@@ -69,7 +69,6 @@
  *
  * @param  string $text             Text to clean.
- * @param  bool   $preserve_html    If set to true, oTxt will not translage <, >, ", or '
- *                                  characters into HTML entities. This allows HTML to pass
- *                                  through unmunged.
+ * @param  bool   $preserve_html    If set to true, oTxt will not translate <, >, ", or '
+ *                                  characters into HTML entities. This allows HTML to pass through unmunged.
  * @return string                   Cleaned text.
  */
@@ -100,13 +99,13 @@
     }
 
-    // & becomes &amp;. Exclude any occurance where the & is followed by a alphanum or unicode caracter.
+    // & becomes &amp;. Exclude any occurrence where the & is followed by a alphanum or unicode character.
     $search['ampersand']        = '/&(?![\w\d#]{1,10};)/';
     $replace['ampersand']       = '&amp;';
 
-    return preg_replace($search, $replace, htmlentities($text, ENT_QUOTES, $app->getParam('character_set')));
-}
-
-/**
- * Returns text with stylistic modifications. Warning: this will break some HTML attibutes!
+    return preg_replace($search, $replace, htmlspecialchars($text, ENT_QUOTES, $app->getParam('character_set')));
+}
+
+/**
+ * Returns text with stylistic modifications. Warning: this will break some HTML attributes!
  * TODO: Allow a string such as this to be passed: <a href="javascript:openPopup('/foo/bar.php')">Click here</a>
  *
@@ -143,5 +142,5 @@
 
 /**
- * Applies a class to search terms to highlight them ala-google results.
+ * Applies a class to search terms to highlight them ala google results.
  *
  * @param  string   $text   Input text to search.
@@ -169,5 +168,5 @@
 
 /**
- * Generates a hexadecibal html color based on provided word.
+ * Generates a hexadecimal html color based on provided word.
  *
  * @access public
@@ -190,5 +189,5 @@
     case 1 :
     default :
-        // Reduce all hex values slighly to avoid all white.
+        // Reduce all hex values slightly to avoid all white.
         array_walk($rgb, create_function('&$v', '$v = dechex(round(hexdec($v) * 0.87));'));
         break;
@@ -353,5 +352,5 @@
 
 /**
- * Tests the existance of a file anywhere in the include path.
+ * Tests the existence of a file anywhere in the include path.
  *
  * @param   string  $file   File in include path.
@@ -440,5 +439,5 @@
 /**
  * If $var is net set or null, set it to $default. Otherwise leave it alone.
- * Returns the final value of $var. Use to find a default value of one is not avilable.
+ * Returns the final value of $var. Use to find a default value of one is not available.
  *
  * @param  mixed $var       The variable that is being set.
@@ -460,5 +459,5 @@
  *
  * @param  array $array    input array
- * @param  array $delim    optional character that will also be excaped.
+ * @param  array $delim    optional character that will also be escaped.
  * @return array    an array with the same values as $array1 but shuffled
  */
@@ -480,5 +479,5 @@
  * Converts a PHP Array into encoded URL arguments and return them as an array.
  *
- * @param  mixed $data        An array to transverse recursivly, or a string
+ * @param  mixed $data        An array to transverse recursively, or a string
  *                            to use directly to create url arguments.
  * @param  string $prefix     The name of the first dimension of the array.
@@ -494,6 +493,6 @@
     if (is_array($data)) {
         foreach ($data as $key => $val) {
-            // If the prefix is empty, use the $key as the name of the first dimention of the "array".
-            // ...otherwise, append the key as a new dimention of the "array".
+            // If the prefix is empty, use the $key as the name of the first dimension of the "array".
+            // ...otherwise, append the key as a new dimension of the "array".
             $new_prefix = ('' == $prefix) ? urlencode($key) : $prefix . '[' . urlencode($key) . ']';
             // Enter recursion.
@@ -501,5 +500,5 @@
         }
     } else {
-        // We've come to the last dimention of the array, save the "array" and its value.
+        // We've come to the last dimension of the array, save the "array" and its value.
         $args[$prefix] = urlencode($data);
     }
@@ -517,7 +516,7 @@
  * Converts a PHP Array into encoded URL arguments and return them in a string.
  *
- * @param  mixed $data        An array to transverse recursivly, or a string
+ * @param  mixed $data        An array to transverse recursively, or a string
  *                            to use directly to create url arguments.
- * @param  string $prefix     The name of the first dimention of the array.
+ * @param  string $prefix     The name of the first dimension of the array.
  *                            If not specified, the first keys of the array will be used.
  * @return string url         A string ready to append to a url.
@@ -537,7 +536,6 @@
 
 /**
- * Fills an arrray with the result from a multiple ereg search.
- * Curtesy of Bruno - rbronosky@mac.com - 10-May-2001
- * Blame him for the funky do...while loop.
+ * Fills an array with the result from a multiple ereg search.
+ * Courtesy of Bruno - rbronosky@mac.com - 10-May-2001
  *
  * @param  mixed $pattern   regular expression needle
@@ -661,5 +659,5 @@
 /**
  * If magic_quotes_gpc is in use, run stripslashes() on $var. If $var is an
- * array, stripslashes is run on each value, recursivly, and the stripped
+ * array, stripslashes is run on each value, recursively, and the stripped
  * array is returned.
  *
@@ -991,5 +989,5 @@
  *
  * @param  bool $exclude_query  Remove the query string first before comparing.
- * @return bool                 True if the current URL is the same as the refering URL, false otherwise.
+ * @return bool                 True if the current URL is the same as the referring URL, false otherwise.
  */
 function refererIsMe($exclude_query=false)
Index: /trunk/services/logs.php
===================================================================
--- /trunk/services/logs.php	(revision 333)
+++ /trunk/services/logs.php	(revision 334)
@@ -22,5 +22,5 @@
  *****************************************************************************/
 
-// Files with these extentions will be displayed at the top of the log list.
+// Files with these extensions will be displayed at the top of the log list.
 $valid_file_extensions = array('', 'txt', 'log');
 
@@ -96,6 +96,6 @@
     break;
 
-// case 'ouput' :
-//     $main_template = 'ouput';
+// case 'output' :
+//     $main_template = 'output';
 //     break;
 
