Index: trunk/bin/module_maker/skel/adm_list.ihtml
===================================================================
--- trunk/bin/module_maker/skel/adm_list.ihtml	(revision 22)
+++ 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 22)
+++ 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 22)
+++ 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 22)
+++ 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
     }
 }
