Index: trunk/bin/file_importer.php
===================================================================
--- trunk/bin/file_importer.php	(revision 34)
+++ trunk/bin/file_importer.php	(revision 42)
@@ -27,5 +27,5 @@
             $file_text = join('', file($file));
             fclose($fp);
-            
+
             // Do something with file contents.
             preg_match('/BALANCE:\s*\$([\.\d]+)/', $file_text, $amt);
@@ -68,5 +68,5 @@
 
 /**
- * Find all files in directories recursivly with a specified file extension. 
+ * Find all files in directories recursivly with a specified file extension.
  *
  * @param  string $dir               the full path to the directory to scan
@@ -80,5 +80,5 @@
 {
     static $output;
-    
+
     $dir_handle = opendir($dir);
     while ($dir_handle && ($file = readdir($dir_handle)) !== false) {
Index: trunk/bin/module_maker/form_template.cli.php
===================================================================
--- trunk/bin/module_maker/form_template.cli.php	(revision 34)
+++ trunk/bin/module_maker/form_template.cli.php	(revision 42)
@@ -40,5 +40,5 @@
 if (is_array($cols) && !empty($cols)) {
     foreach ($cols as $col) {
-        
+
         // Human readable.
         $field = $col[0];
@@ -48,15 +48,15 @@
             $primary_key_field = $field;
         }
-        
+
         // Column types like this are usually single toggle checkboxes.
         if (preg_match("/enum\('true'\)/", $col[1])) {
             $type = 'toggle';
         }
-        
+
         if (in_array($field, $exclude) || $primary_key_field == $field) {
             // Don't add a field for this column.
             continue;
         }
-        
+
         // Select menu from the column of a related database table.
         if (preg_match('/.*_id$/i', $field)) {
@@ -79,5 +79,5 @@
             continue;
         }
-        
+
         // File upload.
         if (preg_match('/file|image/i', $field)) {
@@ -96,5 +96,5 @@
             continue;
         }
-        
+
         // Password field.
         if (preg_match('/pass/i', $field)) {
@@ -109,7 +109,7 @@
             continue;
         }
-        
+
         switch ($type) {
-        
+
         // Select menu (or radio buttons)
         case 'enum' :
@@ -125,5 +125,5 @@
 E_O_F;
             break;
-        
+
         // Set checkboxes
         case 'set' :
@@ -137,5 +137,5 @@
 E_O_F;
             break;
-        
+
         // Single checkbox
         case 'toggle' :
@@ -149,5 +149,5 @@
 E_O_F;
             break;
-            
+
         // Textarea
         case 'tinytext' :
@@ -168,6 +168,6 @@
 E_O_F;
             break;
-        
-            
+
+
         // Text
         case 'tinyint' :
@@ -179,5 +179,5 @@
         case 'integer' :
         case 'bigint' :
-        
+
         case 'float' :
         case 'float' :
@@ -188,5 +188,5 @@
         case 'dec' :
         case 'numeric' :
-        
+
         case 'date' :
         case 'datetime' :
@@ -194,5 +194,5 @@
         case 'time' :
         case 'year' :
-        
+
         case 'char' :
         case 'varchar' :
Index: trunk/bin/module_maker/list_template.cli.php
===================================================================
--- trunk/bin/module_maker/list_template.cli.php	(revision 34)
+++ trunk/bin/module_maker/list_template.cli.php	(revision 42)
@@ -49,18 +49,18 @@
 if (is_array($cols) && !empty($cols)) {
     foreach ($cols as $col) {
-        
+
         // Human readable.
         $field = $col[0];
         $title = ucfirst(str_replace('_', ' ', $field));
         $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]);
-        
+
         // Get primary key.
         if ('PRI' == $col[3]) {
             $primary_key = $field;
         }
-        
+
         // Column headers.
         $headers[$field] = $title;
-        
+
         // Column data.
         if (preg_match("/enum\('true'\)/", $col[1])) {
@@ -111,5 +111,5 @@
     <span class="nowrap commandtext"><a href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . '?op=add'); \x3f>"><\x3fphp echo _("Add <##>"); \x3f></a></span>
     <br />
-    
+
     <input type="text" class="small" size="20" name="search_query" value="<\x3fphp echo getFormData('search_query'); \x3f>" title="<\x3fphp echo oTxt(_("Fields searched: <##>.")); \x3f>" />
     <select name="filter_<##>">
Index: trunk/bin/module_maker/module.cli.php
===================================================================
--- trunk/bin/module_maker/module.cli.php	(revision 34)
+++ trunk/bin/module_maker/module.cli.php	(revision 42)
@@ -17,5 +17,5 @@
 } else {
     die(basename($_SERVER['argv'][0]) . " Error: invalid arguments. Try like this:
-    
+
     " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [clean]
 
@@ -46,5 +46,5 @@
     break;
 default :
-    
+
 }
 
@@ -91,5 +91,5 @@
     trashFile("$public_dir/$public_script");
     trashFile("$public_tpl_dir/$public_list_template");
-    trashFile("$public_tpl_dir/$public_detail_template");    
+    trashFile("$public_tpl_dir/$public_detail_template");
     echo "End file cleanup\n";
     die;
@@ -163,5 +163,5 @@
 if (is_array($cols) && !empty($cols)) {
     foreach ($cols as $col) {
-        
+
         // Human readable.
         $field = $col[0];
@@ -169,18 +169,18 @@
         $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]);
         $default = $col[4];
-        
+
         // Get primary key.
 //         if ('PRI' == $col[3]) {
 //             $primary_key = $field;
 //         }
-        
+
         // Our form will require type="multipart/form-data".
         if (preg_match('/file|image/i', $field)) {
             $upload_file_capability = true;
         }
-        
+
         // Column headers.
         $headers[$field] = $field_title;
-        
+
         // Get php code for printing variables.
         $public_list_page_vars[] = "<\x3fphp echo oTxt(\$" . $module_name_singular . "_list[\$i]['$field']); \x3f>";
@@ -222,5 +222,5 @@
     // Form arguments
     $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<##>\" />";
-    
+
     // Include statement.
     $replace['admin_upload_include'] = "require_once 'codebase/lib/Upload.inc.php';\n";
@@ -245,5 +245,5 @@
 // Copy uploaded image name into form data.
 \$_POST['<##>'] = isset(\$_FILES['<##>']) ? \$_FILES['<##>']['name'] : '';
- 
+
 
 E_O_F;
@@ -261,5 +261,5 @@
     $replace['admin_upload_insert'] = <<<E_O_F
 
-	    // Upload files with prepended primary key.
+        // Upload files with prepended primary key.
         \$new_file = \$upload->process('<##>',  \$%PRIMARY_KEY% . '_' . getFormData('<##>'));
 
@@ -443,5 +443,5 @@
 if ('var' == $op) {
     if (isset($replace[$_SERVER['argv'][5]])) {
-    	echo "\n\n" . $replace[$_SERVER['argv'][5]] . "\n\n";
+        echo "\n\n" . $replace[$_SERVER['argv'][5]] . "\n\n";
     } else if (isset($skel_files[$_SERVER['argv'][5]])) {
         echo "\n\n" . preg_replace($search, $replace, $skel_files[$_SERVER['argv'][5]]) . "\n\n";
@@ -540,5 +540,5 @@
     global $user_trash_folder;
     static $file_prefix;
-    
+
     if (!isset($file_prefix)) {
         $file_prefix = time();
@@ -546,5 +546,5 @@
         $file_prefix++;
     }
-    
+
     // Make user trash folder.
     if (!dir($user_trash_folder)) {
Index: trunk/bin/module_maker/skel/adm_list.ihtml
===================================================================
--- trunk/bin/module_maker/skel/adm_list.ihtml	(revision 34)
+++ trunk/bin/module_maker/skel/adm_list.ihtml	(revision 42)
@@ -7,5 +7,5 @@
     <span class="nowrap commandtext"><a href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add %ITEM_TITLE%"); ?></a></span>
     <br />
-    
+
     <input type="text" class="small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: <##> %SEARCH_FIELDS%.")); ?>" />
     <select name="filter_<##>">
Index: trunk/bin/module_maker/skel/admin.php
===================================================================
--- trunk/bin/module_maker/skel/admin.php	(revision 34)
+++ trunk/bin/module_maker/skel/admin.php	(revision 42)
@@ -26,8 +26,8 @@
  * CONFIG
  *****************************************************************************/
- 
+
 // Titles and navigation header.
 $nav->addPage(_("%TITLE%"), $_SERVER['PHP_SELF']);
-    
+
 // The object to validate form input.
 $fv = new FormValidator();
@@ -215,5 +215,5 @@
     // Get the information for the form.
     $qid = DB::query("
-        SELECT * 
+        SELECT *
         FROM %DB_TBL%
         WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'
@@ -227,5 +227,5 @@
     // Lock this record.
     $lock->set('%DB_TBL%', '%PRIMARY_KEY%', $id, $frm['<##>']);
-    
+
     // Set misc values for the form.
     $frm = array_merge(array(
@@ -246,5 +246,5 @@
 {
     global $lock;
-    
+
     $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
     if ($lock->isLocked() && !$lock->isMine()) {
@@ -254,8 +254,8 @@
     // Break the cache because we are changing the list data.
     SessionCache::breakCache($_SERVER['PHP_SELF']);
-    
+
     // Get the information for this object.
     $qid = DB::query("
-        SELECT <##> 
+        SELECT <##>
         FROM %DB_TBL%
         WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'
@@ -266,8 +266,8 @@
         App::dieBoomerangURL();
     }
-    
+
     // Delete the record.
     DB::query("DELETE FROM %DB_TBL% WHERE %PRIMARY_KEY% = '" . addslashes($id) . "'");
-    
+
     App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);
 
@@ -279,8 +279,8 @@
 {
     global $auth;
-    
+
     // Break the cache because we are changing the list data.
     SessionCache::breakCache($_SERVER['PHP_SELF']);
-    
+
 %INSERT%
     $last_insert_id = mysql_insert_id(DB::getDBH());
@@ -289,7 +289,7 @@
     $version = RecordVersion::getInstance($GLOBALS['auth']);
     $version->create('%DB_TBL%', '%PRIMARY_KEY%', $last_insert_id, $frm['<##>']);
-    
+
     App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
-    
+
     return $last_insert_id;
 }
@@ -298,5 +298,5 @@
 {
     global $auth, $lock;
-    
+
     $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']);
     if ($lock->isLocked() && !$lock->isMine()) {
@@ -308,5 +308,5 @@
 
 %UPDATE%
-    
+
     // Create version.
     $version = RecordVersion::getInstance($GLOBALS['auth']);
@@ -323,7 +323,7 @@
     global $page;
     global $so;
-    
+
     $where_clause = '';
-    
+
     // Build search query if available.
     if (getFormData('search_query', false)) {
@@ -333,26 +333,26 @@
         }
     }
-    
+
     if (getFormData('filter_<##>', false)) {
         // Limit by filter.
         $where_clause .= (empty($where_clause) ? 'WHERE' : 'AND') . " <##> = '" . addslashes(getFormData('filter_<##>')) . "'";
     }
-    
+
     // Count the total number of records so we can do something about the page numbers.
     $qid = DB::query("
-        SELECT COUNT(*) 
-        FROM %DB_TBL% 
+        SELECT COUNT(*)
+        FROM %DB_TBL%
         $where_clause
     ");
     list($num_results) = mysql_fetch_row($qid);
-    
+
     // Set page numbers now we know (needed for next step).
     $page->setTotalItems($num_results);
     $page->calculate();
-    
+
     // Final SQL, with sort and page limiters.
     $sql = "
-        SELECT 
-            %DB_TBL%.*, 
+        SELECT
+            %DB_TBL%.*,
             a1.username AS added_admin_username,
             a2.username AS modified_admin_username
@@ -364,5 +364,5 @@
         " . $page->getLimitSQL() . "
     ";
-    
+
     // A unique key for this query, with the total_items in case db records
     // were added since the last cache. This identifies a unique set of
@@ -375,5 +375,5 @@
         Prefs::setValue('cache_hash', $cache_hash, $_SERVER['PHP_SELF']);
     }
-    
+
     if (SessionCache::isCached($_SERVER['PHP_SELF'])) {
         // Get the cached results.
@@ -386,5 +386,5 @@
             $list[] = $row;
         }
-            
+
         if (isset($list) && !empty($list)) {
             // Cache the results.
@@ -397,5 +397,5 @@
 
 function updateRank($ranks)
-{   
+{
     if (!is_array($ranks)) {
         App::logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__);
@@ -405,8 +405,8 @@
     // Break the cache because we are changing the list data.
     SessionCache::breakCache($_SERVER['PHP_SELF']);
-    
+
     // Count the ranks with invalid numbers
     $unspecified_counter = 0;
-    
+
     // Go through the array of new ranks.
     foreach ($ranks as $id => $new_rank) {
@@ -414,5 +414,5 @@
             // Unspecified entries receive a sort order of 10000.
             $new_rank = 10000;
-            $unspecified_counter++; 
+            $unspecified_counter++;
         }
         DB::query("
@@ -422,5 +422,5 @@
         ");
     }
-    
+
     App::raiseMsg(_("Records have been reordered with the new rank."), MSG_SUCCESS, __FILE__, __LINE__);
     if ($unspecified_counter > 0) {
Index: trunk/bin/module_maker/skel/public.php
===================================================================
--- trunk/bin/module_maker/skel/public.php	(revision 34)
+++ trunk/bin/module_maker/skel/public.php	(revision 42)
@@ -1,5 +1,5 @@
 <?php
 /**
- * %PUBLIC_SCRIPT% 
+ * %PUBLIC_SCRIPT%
  * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
  *
@@ -18,5 +18,5 @@
 // Titles and navigation header.
 $nav->addPage(_("%TITLE%"), $_SERVER['PHP_SELF']);
-$nav->setFeature(array('title'=>true)); 
+$nav->setFeature(array('title'=>true));
 
 // Instantiate page numbers. Total items are set and calculation is done in the getRecordList function.
@@ -32,5 +32,5 @@
 
 if (getFormData('%PRIMARY_KEY%', false)) {
-    
+
     // Get requested record.
     $qid = DB::query("
@@ -52,5 +52,5 @@
         WHERE %PRIMARY_KEY% = '" . addslashes(getFormData('%PRIMARY_KEY%')) . "'
     ");
-        
+
     // Set title and main template.
     $nav->addPage($item['<##>']);
@@ -58,11 +58,11 @@
 
 } else {
-    
+
     // Get the DEFAULT list.
     $%NAME_SINGULAR%_list = array();
     $qid = DB::query("
-        SELECT * 
-        FROM %DB_TBL% 
-        WHERE publish = 'true' 
+        SELECT *
+        FROM %DB_TBL%
+        WHERE publish = 'true'
         " . $so->getSortOrderSQL() . "
         LIMIT 100
@@ -71,15 +71,15 @@
         $%NAME_SINGULAR%_list[] = $row;
     }
-    
+
     // Set page numbers for default list.
     $page->setTotalItems(sizeof($%NAME_SINGULAR%_list));
     $page->calculate();
-    
+
 
     // Get the FEATURED list.
     $featured_list = array();
     $qid = DB::query("
-        SELECT * 
-        FROM %DB_TBL% 
+        SELECT *
+        FROM %DB_TBL%
         WHERE publish = 'true'
         AND featured = 'true'
@@ -89,11 +89,11 @@
         $featured_list[] = $row;
     }
-    
+
     // Get the POPULAR list.
     $popular_list = array();
     $qid = DB::query("
-        SELECT * 
-        FROM %DB_TBL% 
-        WHERE publish = 'true' 
+        SELECT *
+        FROM %DB_TBL%
+        WHERE publish = 'true'
         ORDER BY hit_count DESC LIMIT 10
     ");
@@ -101,11 +101,11 @@
         $popular_list[] = $row;
     }
-    
+
     // Get the RECENT list.
     $recent_list = array();
     $qid = DB::query("
-        SELECT * 
-        FROM %DB_TBL% 
-        WHERE publish = 'true' 
+        SELECT *
+        FROM %DB_TBL%
+        WHERE publish = 'true'
         ORDER BY added_datetime DESC LIMIT 10
     ");
@@ -113,8 +113,8 @@
         $recent_list[] = $row;
     }
-    
+
     // Set main template.
     $main_template = '%PUBLIC_LIST_TEMPLATE%';
-}    
+}
 
 // We have the data, and no errors, so here come the templates.
Index: trunk/bin/module_maker/skel/public_list.ihtml
===================================================================
--- trunk/bin/module_maker/skel/public_list.ihtml	(revision 34)
+++ trunk/bin/module_maker/skel/public_list.ihtml	(revision 42)
@@ -11,10 +11,10 @@
         <p>
         <em><?php echo date(App::getParam('date_format'), strtotime($%NAME_SINGULAR%_list[$i]['<##>'])); ?></em> &mdash; <?php echo nl2br(fancyTxt(oTxt($%NAME_SINGULAR%_list[$i]['summary'], true))); ?>
-            
+
         <?php if (strlen(trim($%NAME_SINGULAR%_list[$i]['content'])) > 0) { // Link only if content is available. ?>
             <br /><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $%NAME_SINGULAR%_list[$i]['%PRIMARY_KEY%']); ?>"><?php echo _("Read more"); ?></a>
         <?php } ?>
         </p>
-        <?php   
+        <?php
     }
     if ($page->total_pages > 1) {
@@ -30,7 +30,7 @@
     ?>
     <h2><?php echo _("Featured %NAME_PLURAL%"); ?></h2>
-    <?php 
+    <?php
     foreach ($featured_list as $item) {
-        ?><h4><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $item['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($item['title'])); ?></a></h4><?php   
+        ?><h4><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $item['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($item['title'])); ?></a></h4><?php
     }
 }
@@ -42,7 +42,7 @@
     ?>
     <h2><?php echo _("Popular %NAME_PLURAL%"); ?></h2>
-    <?php 
+    <?php
     foreach ($popular_list as $item) {
-        ?><h4><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $item['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($item['title'])); ?></a> </h4><?php   
+        ?><h4><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $item['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($item['title'])); ?></a> </h4><?php
     }
 }
@@ -54,7 +54,7 @@
     ?>
     <h2><?php echo _("Recent %NAME_PLURAL%"); ?></h2>
-    <?php 
+    <?php
     foreach ($recent_list as $item) {
-        ?><h4><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $item['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($item['title'])); ?></a> </h4><?php   
+        ?><h4><a href="<?php echo App::oHREF('/%PUBLIC_SCRIPT%?%PRIMARY_KEY%=' . $item['%PRIMARY_KEY%']); ?>"><?php echo fancyTxt(oTxt($item['title'])); ?></a> </h4><?php
     }
 }
Index: trunk/bin/module_maker/sql.cli.php
===================================================================
--- trunk/bin/module_maker/sql.cli.php	(revision 34)
+++ trunk/bin/module_maker/sql.cli.php	(revision 42)
@@ -56,12 +56,12 @@
 if (is_array($cols) && !empty($cols)) {
     foreach ($cols as $col) {
-        
+
         // Human readable.
         $field = $col[0];
         $type = preg_replace('/^(\w+).*$/', '\\1', $col[1]);
         $is_primary_key = ('PRI' == $col[3]);
-        
+
         $sort_columns .= "\$so->setColumn('$field', '$field ASC', '$field DESC');\n";
-        
+
         if ($is_primary_key) {
             // This is the primary key. Deal with separately.
@@ -84,5 +84,5 @@
         }
     }
-    
+
 } else {
     die(basename($_SERVER['argv'][0]) . " Warning: $db_tbl does not have any columns.\n");
Index: trunk/bin/module_maker/validation.cli.php
===================================================================
--- trunk/bin/module_maker/validation.cli.php	(revision 34)
+++ trunk/bin/module_maker/validation.cli.php	(revision 42)
@@ -38,9 +38,9 @@
 // Loop through columns
 if (is_array($cols) && !empty($cols)) {
-    
+
     $o = array();
 
     foreach ($cols as $col) {
-    
+
         // Human readable.
         $field = $col[0];
@@ -49,9 +49,9 @@
         $is_primary_key = ('PRI' == $col[3]);
         $unsigned = preg_match('/\s*unsigned\s*$/i', $col[1]);
-        
+
         if (in_array($field, $exclude)) {
             continue;
         }
-        
+
         // ----------- isEmpty ------------
         $o[] = "\$fv->isEmpty('$field', _(\"<strong>$title</strong> cannot be blank.\"));";
@@ -68,5 +68,5 @@
             $len_type = 'setenum';
             break;
-            
+
         case 'date' :
         case 'datetime' :
@@ -77,5 +77,5 @@
             $max_length = 127;
             break;
-            
+
         case 'tinytext' :
         case 'tinyblob' :
@@ -85,5 +85,5 @@
             $max_length = 255;
             break;
-            
+
         case 'text' :
         case 'blob' :
@@ -91,5 +91,5 @@
             $max_length = 65535;
             break;
-            
+
         case 'mediumtext' :
         case 'mediumblob' :
@@ -97,5 +97,5 @@
             $max_length = 16777215;
             break;
-            
+
         case 'longtext' :
         case 'longblob' :
@@ -103,5 +103,5 @@
             $max_length = 4294967295;
             break;
-            
+
         case 'tinyint' :
         case 'bit' :
@@ -116,5 +116,5 @@
             }
             break;
-            
+
         case 'smallint' :
             $len_type = 'num';
@@ -127,5 +127,5 @@
             }
             break;
-            
+
         case 'mediumint' :
             $len_type = 'num';
@@ -138,5 +138,5 @@
             }
             break;
-            
+
         case 'int' :
         case 'integer' :
@@ -150,5 +150,5 @@
             }
             break;
-            
+
         case 'bigint' :
             $len_type = 'num';
@@ -161,5 +161,5 @@
             }
             break;
-            
+
         case 'float' :
             $len_type = 'num';
@@ -167,5 +167,5 @@
             $max = 3.40282E+38;
             break;
-            
+
         case 'double' :
         case 'double precision' :
@@ -178,5 +178,5 @@
             $max = 1.79769E+308;
             break;
-            
+
         default :
             $len_type = null;
@@ -192,16 +192,16 @@
             $o[] = "\$fv->numericRange('$field', $min, $max, _(\"<strong>$title</strong> must be a valid number between $min and $max.\"));";
         }
-        
+
         // ----------- type check ------------
         switch ($type) {
 
         case 'enum' :
-        
+
         case 'set' :
             break;
-        
+
         case 'char' :
         case 'varchar' :
-        
+
         case 'tinytext' :
         case 'text' :
@@ -214,5 +214,5 @@
 //             $o[] = "\$fv->isString('$field', _(\"<strong>$title</strong> must be a string.\"));"; // Pretty useless
             break;
-        
+
         case 'tinyint' :
         case 'bit' :
@@ -226,5 +226,5 @@
             $o[] = "\$fv->isInteger('$field', _(\"<strong>$title</strong> must be an integer.\")$negative_ok);";
             break;
-        
+
         case 'float' :
         case 'float' :
@@ -238,5 +238,5 @@
             $o[] = "\$fv->isFloat('$field', _(\"<strong>$title</strong> must be a valid number.\")$negative_ok);";
             break;
-        
+
         case 'date' :
         case 'datetime' :
@@ -244,21 +244,21 @@
             $o[] = "\$fv->checkRegex('$field', '/^\d{4}-\d{2}-\d{2}$/', true, _(\"<strong>$title</strong> must be a valid date in YYYY-MM-DD format.\"));";
             break;
-            
+
         case 'timestamp' :
             $o[] = "\$fv->checkRegex('$field', '/^\d{14}$/', true, _(\"<strong>$title</strong> must be a valid mysql timestamp in YYYYMMDDhhmmss format.\"));";
             break;
-            
+
         case 'time' :
             $o[] = "\$fv->checkRegex('$field', '/^\d{1,3}:\d{2}:\d{2}$/', true, _(\"<strong>$title</strong> must be a valid time in hh:mm:ss format.\"));";
             break;
-        
+
         case 'year' :
             $o[] = "\$fv->checkRegex('$field', '/^\d{4}$/', true, _(\"<strong>$title</strong> must be a valid year in YYYY format.\"));";
             break;
-        
+
         default :
             break;
         }
-        
+
         if (preg_match('/email/', $field)) {
             $o[] = "\$fv->validateEmail('$field');";
@@ -266,5 +266,5 @@
             $o[] = "\$fv->validatePhone('$field');";
         }
-        
+
         // Blank between cols?
         $o[] = '';
@@ -278,5 +278,5 @@
 
 echo "function validateInput()
-{    
+{
     global \$fv;
 
