Index: trunk/bin/module_maker/_config.inc.php
===================================================================
--- trunk/bin/module_maker/_config.inc.php	(revision 147)
+++ trunk/bin/module_maker/_config.inc.php	(revision 151)
@@ -3,9 +3,9 @@
  * code by strangecode :: www.strangecode.com :: this document contains copyrighted information. */
 
-// Determine common site directory.
-$common_base = realpath($_SERVER['argv'][1]);
-
 // Test argument.
-if ($_SERVER['argc'] > 1 && '' != $common_base && is_dir($common_base)) {
+if ($_SERVER['argc'] > 1 && isset($_SERVER['argv'][1]) && '' != $_SERVER['argv'][1] && is_dir($_SERVER['argv'][1])) {
+    // Determine common site directory.
+    $common_base = realpath($_SERVER['argv'][1]);
+    
     // First arg is path to current site. Realpath removes trailing /s
     define('COMMON_BASE', $common_base);
Index: trunk/bin/module_maker/list_template.cli.php
===================================================================
--- trunk/bin/module_maker/list_template.cli.php	(revision 147)
+++ trunk/bin/module_maker/list_template.cli.php	(revision 151)
@@ -16,5 +16,5 @@
     $db_tbl = $_SERVER['argv'][2];
 } else {
-    die(sprintf("Usage: %s site_directory db_table [operation]\n", basename($_SERVER['argv'][0])));
+    die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s", basename($_SERVER['argv'][0]), join(', ', $valid_ops)));
 }
 
Index: trunk/bin/module_maker/module.cli.php
===================================================================
--- trunk/bin/module_maker/module.cli.php	(revision 147)
+++ trunk/bin/module_maker/module.cli.php	(revision 151)
@@ -18,5 +18,7 @@
     die(basename($_SERVER['argv'][0]) . " Error: invalid arguments. Try like this:
 
-    " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [clean]
+    " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [operation]
+    
+Valid operations include: " . join(', ', $valid_ops) . "
 
 The following files will be generated by this script:
Index: trunk/bin/module_maker/skel/admin.php
===================================================================
--- trunk/bin/module_maker/skel/admin.php	(revision 147)
+++ trunk/bin/module_maker/skel/admin.php	(revision 151)
@@ -33,5 +33,5 @@
 $fv = new FormValidator();
 
-$cache =& SessionCache::getInstance();
+$cache =& Cache::getInstance();
 
 %SORT_ORDER%
@@ -250,5 +250,5 @@
     global $lock;
 	$db =& DB::getInstance();
-	$cache =& SessionCache::getInstance();
+	$cache =& Cache::getInstance();
 	
     $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id);
@@ -285,5 +285,5 @@
     global $auth;
 	$db =& DB::getInstance();
-	$cache =& SessionCache::getInstance();
+	$cache =& Cache::getInstance();
 	
     // Break the cache because we are changing the list data.
@@ -306,5 +306,5 @@
 	global $auth, $lock;
 	$app =& App::getInstance();
-    $cache =& SessionCache::getInstance();
+    $cache =& Cache::getInstance();
     
     $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']);
@@ -334,5 +334,5 @@
 	$db =& DB::getInstance();
 	$prefs =& Prefs::getInstance();
-	$cache =& SessionCache::getInstance();
+	$cache =& Cache::getInstance();
 	
     $where_clause = '';
@@ -411,5 +411,5 @@
 {
 	$db =& DB::getInstance();
-	$cache =& SessionCache::getInstance();
+	$cache =& Cache::getInstance();
 	
     if (!is_array($ranks)) {
Index: trunk/bin/module_maker/sql.cli.php
===================================================================
--- trunk/bin/module_maker/sql.cli.php	(revision 147)
+++ trunk/bin/module_maker/sql.cli.php	(revision 151)
@@ -16,5 +16,5 @@
     $db_tbl = $_SERVER['argv'][2];
 } else {
-    die(sprintf("Usage: %s site_directory db_table [operation]\n", basename($_SERVER['argv'][0])));
+    die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s", basename($_SERVER['argv'][0]), join(', ', $valid_ops)));
 }
 
Index: trunk/bin/module_maker/validation.cli.php
===================================================================
--- trunk/bin/module_maker/validation.cli.php	(revision 147)
+++ trunk/bin/module_maker/validation.cli.php	(revision 151)
@@ -187,8 +187,8 @@
         }
         if ($max_length > 0 && $len_type == 'string') {
-            $o[] = "\$fv->stringLength('$field', 0, $max_length, sprintf(_(\"%s must be %f-to-%f characters in length.\"), _(\"$title\"), 0, $max_length));";
+            $o[] = "\$fv->stringLength('$field', 0, $max_length, sprintf(_(\"%s must be %d-to-%d characters in length.\"), _(\"$title\"), 0, $max_length));";
         }
         if ($len_type == 'num') {
-            $o[] = "\$fv->numericRange('$field', $min, $max, sprintf(_(\"%s must be a number between %f and %f.\"), _(\"$title\"), $min, $max));";
+            $o[] = "\$fv->numericRange('$field', $min, $max, sprintf(_(\"%s must be a number between %d and %d.\"), _(\"$title\"), $min, $max));";
         }
 
