Changeset 136 for trunk/bin/module_maker/module.cli.php
- Timestamp:
- Jun 3, 2006 7:47:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/module.cli.php
r119 r136 129 129 130 130 // Get DB tables. 131 $qid = DB::query("SHOW TABLES");131 $qid = $db->query("SHOW TABLES"); 132 132 while (list($row) = mysql_fetch_row($qid)) { 133 133 $tables[] = $row; … … 136 136 // Make sure requested table is in database. 137 137 if (!in_array($db_tbl, $tables)) { 138 die(sprintf("%s Warning: %s does not exist in database %s. Please select one of: \n\n%s\n\n", basename($_SERVER['argv'][0]), $db_tbl, App::getParam('db_name'), join("\n", $tables)));138 die(sprintf("%s Warning: %s does not exist in database %s. Please select one of: \n\n%s\n\n", basename($_SERVER['argv'][0]), $db_tbl, $app->getParam('db_name'), join("\n", $tables))); 139 139 } 140 140 141 141 // Ensure requested table contains columns. 142 142 // Get DB table column info. 143 $qid = DB::query("DESCRIBE " . DB::escapeString($db_tbl));143 $qid = $db->query("DESCRIBE " . $db->escapeString($db_tbl)); 144 144 while ($row = mysql_fetch_row($qid)) { 145 145 $cols[] = $row; … … 266 266 // If file upload errors, redirect to edit operation for the inserted record. 267 267 if (\$upload->anyErrors() || false === \$new_file) { 268 App::dieURL(\$_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . \$%PRIMARY_KEY%);268 \$app->dieURL(\$_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . \$%PRIMARY_KEY%); 269 269 } 270 270 E_O_F; … … 300 300 301 301 $search['date'] = '/%DATE%/'; 302 $replace['date'] = date( App::getParam('date_format'));302 $replace['date'] = date($app->getParam('date_format')); 303 303 304 304 $search['name_plural'] = '/%NAME_PLURAL%/';
Note: See TracChangeset
for help on using the changeset viewer.