- Timestamp:
- Jun 6, 2006 3:19:17 AM (18 years ago)
- Location:
- trunk/bin/module_maker
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/_config.inc.php
r136 r151 3 3 * code by strangecode :: www.strangecode.com :: this document contains copyrighted information. */ 4 4 5 // Determine common site directory.6 $common_base = realpath($_SERVER['argv'][1]);7 8 5 // Test argument. 9 if ($_SERVER['argc'] > 1 && '' != $common_base && is_dir($common_base)) { 6 if ($_SERVER['argc'] > 1 && isset($_SERVER['argv'][1]) && '' != $_SERVER['argv'][1] && is_dir($_SERVER['argv'][1])) { 7 // Determine common site directory. 8 $common_base = realpath($_SERVER['argv'][1]); 9 10 10 // First arg is path to current site. Realpath removes trailing /s 11 11 define('COMMON_BASE', $common_base); -
trunk/bin/module_maker/list_template.cli.php
r136 r151 16 16 $db_tbl = $_SERVER['argv'][2]; 17 17 } else { 18 die(sprintf("Usage: %s site_directory db_table [operation]\n ", basename($_SERVER['argv'][0])));18 die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s", basename($_SERVER['argv'][0]), join(', ', $valid_ops))); 19 19 } 20 20 -
trunk/bin/module_maker/module.cli.php
r143 r151 18 18 die(basename($_SERVER['argv'][0]) . " Error: invalid arguments. Try like this: 19 19 20 " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [clean] 20 " . basename($_SERVER['argv'][0]) . " site_directory name_singular name_plural [operation] 21 22 Valid operations include: " . join(', ', $valid_ops) . " 21 23 22 24 The following files will be generated by this script: -
trunk/bin/module_maker/skel/admin.php
r143 r151 33 33 $fv = new FormValidator(); 34 34 35 $cache =& SessionCache::getInstance();35 $cache =& Cache::getInstance(); 36 36 37 37 %SORT_ORDER% … … 250 250 global $lock; 251 251 $db =& DB::getInstance(); 252 $cache =& SessionCache::getInstance();252 $cache =& Cache::getInstance(); 253 253 254 254 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $id); … … 285 285 global $auth; 286 286 $db =& DB::getInstance(); 287 $cache =& SessionCache::getInstance();287 $cache =& Cache::getInstance(); 288 288 289 289 // Break the cache because we are changing the list data. … … 306 306 global $auth, $lock; 307 307 $app =& App::getInstance(); 308 $cache =& SessionCache::getInstance();308 $cache =& Cache::getInstance(); 309 309 310 310 $lock->select('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%']); … … 334 334 $db =& DB::getInstance(); 335 335 $prefs =& Prefs::getInstance(); 336 $cache =& SessionCache::getInstance();336 $cache =& Cache::getInstance(); 337 337 338 338 $where_clause = ''; … … 411 411 { 412 412 $db =& DB::getInstance(); 413 $cache =& SessionCache::getInstance();413 $cache =& Cache::getInstance(); 414 414 415 415 if (!is_array($ranks)) { -
trunk/bin/module_maker/sql.cli.php
r147 r151 16 16 $db_tbl = $_SERVER['argv'][2]; 17 17 } else { 18 die(sprintf("Usage: %s site_directory db_table [operation]\n ", basename($_SERVER['argv'][0])));18 die(sprintf("Usage: %s site_directory db_table [operation]\nValid operations include: %s", basename($_SERVER['argv'][0]), join(', ', $valid_ops))); 19 19 } 20 20 -
trunk/bin/module_maker/validation.cli.php
r145 r151 187 187 } 188 188 if ($max_length > 0 && $len_type == 'string') { 189 $o[] = "\$fv->stringLength('$field', 0, $max_length, sprintf(_(\"%s must be % f-to-%fcharacters in length.\"), _(\"$title\"), 0, $max_length));";189 $o[] = "\$fv->stringLength('$field', 0, $max_length, sprintf(_(\"%s must be %d-to-%d characters in length.\"), _(\"$title\"), 0, $max_length));"; 190 190 } 191 191 if ($len_type == 'num') { 192 $o[] = "\$fv->numericRange('$field', $min, $max, sprintf(_(\"%s must be a number between % f and %f.\"), _(\"$title\"), $min, $max));";192 $o[] = "\$fv->numericRange('$field', $min, $max, sprintf(_(\"%s must be a number between %d and %d.\"), _(\"$title\"), $min, $max));"; 193 193 } 194 194
Note: See TracChangeset
for help on using the changeset viewer.