Ignore:
Timestamp:
May 25, 2006 10:21:07 PM (18 years ago)
Author:
scdev
Message:

Updated App.inc.php thru Hierarchy.inc.php

Location:
branches/2.0singleton/bin
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0singleton/bin/file_importer.php

    r111 r127  
    77
    88require realpath(dirname(__FILE__) . '/..') . '/config/cli_config.inc.php';
     9
     10$app =& App::getInstance();
    911
    1012// Test arguments.
     
    5658
    5759        } else {
    58             App::logMsg('Could not open file: ' . $file, LOG_INFO, __FILE__, __LINE__);
     60            $app->logMsg('Could not open file: ' . $file, LOG_INFO, __FILE__, __LINE__);
    5961        }
    6062    }
    61     App::logMsg('Proccessing complete: ' . $file_count . ' files total.', LOG_INFO, __FILE__, __LINE__);
     63    $app->logMsg('Proccessing complete: ' . $file_count . ' files total.', LOG_INFO, __FILE__, __LINE__);
    6264} else {
    63     App::logMsg('No files available in that directory.', LOG_INFO, __FILE__, __LINE__);
     65    $app->logMsg('No files available in that directory.', LOG_INFO, __FILE__, __LINE__);
    6466}
    6567
  • branches/2.0singleton/bin/module_maker/form_template.cli.php

    r121 r127  
    2424// Make sure requested table is in database.
    2525if (!in_array($db_tbl, $tables)) {
    26     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)));
     26    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)));
    2727}
    2828
     
    6565<label for="$field"<\x3fphp \$fv->err('$field') \x3f>><\x3fphp echo _("$title"); \x3f></label>
    6666<select name="$field" id="$field" class="sc-small"><\x3fphp printSelectForm('<##>_tbl', "CONCAT(<##>_id, '&mdash;', <##>)", '$field', \$frm['$field'], true, 'ORDER BY $field ASC'); \x3f></select>
    67     <span class="commanditem commandtext"><a href="<\x3fphp echo App::oHREF('<##>.php?op=add&boomerang=true'); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo _("Add <##>") \x3f></a></span>
     67    <span class="commanditem commandtext"><a href="<\x3fphp echo \$app->oHREF('<##>.php?op=add&boomerang=true'); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo _("Add <##>") \x3f></a></span>
    6868    <\x3fphp if ('' != \$frm['<##>_id']) { \x3f>
    69     <span class="commanditem commandtext"><a href="<\x3fphp echo App::oHREF('<##>.php?op=edit&boomerang=true&<##>_id=' . \$frm['<##>_id']); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo sprintf(_("Edit <##> <em>%s</em>"), \$frm['<##>']) \x3f></a></span>
     69    <span class="commanditem commandtext"><a href="<\x3fphp echo \$app->oHREF('<##>.php?op=edit&boomerang=true&<##>_id=' . \$frm['<##>_id']); \x3f>" onClick="javascript:return confirm('<\x3fphp echo _("Notice: You are about to leave this form page and any changes you may have made without saving will be lost."); \x3f>')"><\x3fphp echo sprintf(_("Edit <##> <em>%s</em>"), \$frm['<##>']) \x3f></a></span>
    7070    <\x3fphp } \x3f>
    7171E_O_F;
  • branches/2.0singleton/bin/module_maker/list_template.cli.php

    r121 r127  
    3737// Make sure requested table is in database.
    3838if (!in_array($db_tbl, $tables)) {
    39     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)));
     39    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)));
    4040}
    4141
     
    8080            $listrows[] = "<\x3fphp echo strlen(\$list[\$i]['$field'])<50 \x3f oTxt(\$list[\$i]['$field'], true) : oTxt(trim(substr(\$list[\$i]['$field'], 0, 50)) . '...'); \x3f>";
    8181        } else if (preg_match('/.*(begin|start).*date.*/i', $field)) {
    82             $listrows[] = "<\x3fphp echo '0000-00-00' == \$list[\$i]['$field'] ? '' : date(App::getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
     82            $listrows[] = "<\x3fphp echo '0000-00-00' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
    8383        } else if (preg_match('/.*(end|expire).*date.*/i', $field)) {
    84             $listrows[] = "<\x3fphp echo '9999-12-31' == \$list[\$i]['$field'] ? '' : date(App::getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
     84            $listrows[] = "<\x3fphp echo '9999-12-31' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
    8585        } else if (preg_match('/datetime/i', $type)) {
    86             $listrows[] = "<\x3fphp echo '0000-00-00 00:00:00' == \$list[\$i]['$field'] ? '' : date(App::getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
     86            $listrows[] = "<\x3fphp echo '0000-00-00 00:00:00' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
    8787        } else if (preg_match('/date/i', $type)) {
    88             $listrows[] = "<\x3fphp echo '0000-00-00' == \$list[\$i]['$field'] ? '' : date(App::getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
     88            $listrows[] = "<\x3fphp echo '0000-00-00' == \$list[\$i]['$field'] ? '' : date(\$app->getParam('date_format'), strtotime(\$list[\$i]['$field'])); \x3f>";
    8989        } else if (preg_match('/(amount|_rate)/i', $field)) {
    9090            $listrows[] = "<\x3fphp printf('$%01.2f', \$list[\$i]['$field']); \x3f>";
     
    110110<div id="commandbox">
    111111<form action="<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>" method="get">
    112 <\x3fphp App::printHiddenSession(false); \x3f>
    113     <span class="sc-nowrap commandtext"><a href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . '?op=add'); \x3f>"><\x3fphp echo _("Add <##>"); \x3f></a></span>
     112<\x3fphp \$app->printHiddenSession(false); \x3f>
     113    <span class="sc-nowrap commandtext"><a href="<\x3fphp echo \$app->oHREF(\$_SERVER['PHP_SELF'] . '?op=add'); \x3f>"><\x3fphp echo _("Add <##>"); \x3f></a></span>
    114114    <br />
    115115
     
    149149    <\x3fphp for (\$i = 0; \$i <= \$page->last_item - \$page->first_item && \$page->total_items > 0; \$i++) { \x3f>
    150150    <tr>
    151         <td class="sc-nowrap"><a title="<\x3fphp printf(_("Edit %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . '?op=edit&$primary_key=' . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> &nbsp;</td>
    152         <td class="sc-nowrap"><a title="<\x3fphp printf(_("Versions of %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo App::oHREF("/admin/versions.php?record_table=$db_tbl&record_key=$primary_key&boomerang=true&record_val=" . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> &nbsp;</td>
     151        <td class="sc-nowrap"><a title="<\x3fphp printf(_("Edit %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo \$app->oHREF(\$_SERVER['PHP_SELF'] . '?op=edit&$primary_key=' . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> &nbsp;</td>
     152        <td class="sc-nowrap"><a title="<\x3fphp printf(_("Versions of %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo \$app->oHREF("/admin/versions.php?record_table=$db_tbl&record_key=$primary_key&boomerang=true&record_val=" . \$list[\$i]['$primary_key']); \x3f>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> &nbsp;</td>
    153153
    154154E_O_F;
     
    164164
    165165echo isset($op) ? '' : <<<E_O_F
    166         <td class="sc-nowrap" align="right"><a title="<\x3fphp printf(_("Delete %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo App::oHREF(\$_SERVER['PHP_SELF'] . "?op=del&$primary_key=" . \$list[\$i]['$primary_key']); \x3f>" onClick="javascript:return confirm('<\x3fphp printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt(\$list[\$i]['<##>'])) \x3f>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> &nbsp;</td>
     166        <td class="sc-nowrap" align="right"><a title="<\x3fphp printf(_("Delete %s"), oTxt(\$list[\$i]['<##>'])) \x3f>" href="<\x3fphp echo \$app->oHREF(\$_SERVER['PHP_SELF'] . "?op=del&$primary_key=" . \$list[\$i]['$primary_key']); \x3f>" onClick="javascript:return confirm('<\x3fphp printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt(\$list[\$i]['<##>'])) \x3f>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> &nbsp;</td>
    167167    </tr>
    168168    <\x3fphp } \x3f>
  • branches/2.0singleton/bin/module_maker/module.cli.php

    r119 r127  
    136136// Make sure requested table is in database.
    137137if (!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)));
    139139}
    140140
     
    266266        // If file upload errors, redirect to edit operation for the inserted record.
    267267        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%);
    269269        }
    270270E_O_F;
     
    300300
    301301$search['date'] = '/%DATE%/';
    302 $replace['date'] = date(App::getParam('date_format'));
     302$replace['date'] = date($app->getParam('date_format'));
    303303
    304304$search['name_plural'] = '/%NAME_PLURAL%/';
  • branches/2.0singleton/bin/module_maker/skel/admin.php

    r111 r127  
    1111$auth->requireLogin();
    1212// $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%);
    13 App::sslOn();
     13$app->sslOn();
    1414
    1515require_once 'codebase/lib/PageNumbers.inc.php';
     
    4141
    4242// Search limiters retain their values between page requests.
    43 App::carryQuery('search_query');
    44 App::carryQuery('filter_<##>');
     43$app->carryQuery('search_query');
     44$app->carryQuery('filter_<##>');
    4545%ADMIN_UPLOAD_CONFIG%
    4646/******************************************************************************
     
    5151// allows us to remember which page we came from so we can go back there.
    5252if (getFormData('boomerang', false) && isset($_SERVER['HTTP_REFERER'])) {
    53     App::setBoomerangURL($_SERVER['HTTP_REFERER'], '%NAME_PLURAL%');
     53    $app->setBoomerangURL($_SERVER['HTTP_REFERER'], '%NAME_PLURAL%');
    5454}
    5555
     
    8181//     $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_DELETE);
    8282    deleteRecord(getFormData('%PRIMARY_KEY%'));%ADMIN_UPLOAD_DEL%
    83     if (App::validBoomerangURL('%NAME_PLURAL%')) {
     83    if ($app->validBoomerangURL('%NAME_PLURAL%')) {
    8484        // Display boomerang page.
    85         App::dieBoomerangURL('%NAME_PLURAL%');
     85        $app->dieBoomerangURL('%NAME_PLURAL%');
    8686    }
    8787    // Display default page.
    88     App::dieURL($_SERVER['PHP_SELF']);
     88    $app->dieURL($_SERVER['PHP_SELF']);
    8989    break;
    9090
     
    9292//     $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_ADD);
    9393    if (getFormdata('cancel', false)) {
    94         if (App::validBoomerangURL('%NAME_PLURAL%')) {
     94        if ($app->validBoomerangURL('%NAME_PLURAL%')) {
    9595            // Display boomerang page.
    96             App::dieBoomerangURL('%NAME_PLURAL%');
     96            $app->dieBoomerangURL('%NAME_PLURAL%');
    9797        }
    9898        // Display default page.
    99         App::dieURL($_SERVER['PHP_SELF']);
     99        $app->dieURL($_SERVER['PHP_SELF']);
    100100    }
    101101    validateInput();
     
    109109        if (getFormdata('repeat', false)) {
    110110            // Display function again.
    111             App::dieURL($_SERVER['PHP_SELF'] . '?op=add');
    112         } else if (App::validBoomerangURL('%NAME_PLURAL%')) {
     111            $app->dieURL($_SERVER['PHP_SELF'] . '?op=add');
     112        } else if ($app->validBoomerangURL('%NAME_PLURAL%')) {
    113113            // Display boomerang page.
    114             App::dieBoomerangURL('%NAME_PLURAL%');
     114            $app->dieBoomerangURL('%NAME_PLURAL%');
    115115        }
    116116        // Display default page.
    117         App::dieURL($_SERVER['PHP_SELF']);
     117        $app->dieURL($_SERVER['PHP_SELF']);
    118118    }
    119119    break;
     
    122122//     $auth->requireAccessClearance(ZONE_ADMIN_%NAME_UPPER%_FUNC_EDIT);
    123123    if (getFormdata('reset', false)) {
    124         App::raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__);
    125         App::dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . getFormData('%PRIMARY_KEY%'));
     124        $app->raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__);
     125        $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . getFormData('%PRIMARY_KEY%'));
    126126    }
    127127    if (getFormdata('cancel', false)) {
     
    129129        $lock->select('%DB_TBL%', '%PRIMARY_KEY%', getFormData('%PRIMARY_KEY%'));
    130130        $lock->remove();
    131         if (App::validBoomerangURL('%NAME_PLURAL%')) {
     131        if ($app->validBoomerangURL('%NAME_PLURAL%')) {
    132132            // Display boomerang page.
    133             App::dieBoomerangURL('%NAME_PLURAL%');
     133            $app->dieBoomerangURL('%NAME_PLURAL%');
    134134        }
    135135        // Display default page.
    136         App::dieURL($_SERVER['PHP_SELF']);
     136        $app->dieURL($_SERVER['PHP_SELF']);
    137137    }
    138138    validateInput();
     
    148148            $qid = DB::query("SELECT %PRIMARY_KEY% FROM %DB_TBL% WHERE %PRIMARY_KEY% > '" . DB::escapeString(getFormData('%PRIMARY_KEY%')) . "' ORDER BY %PRIMARY_KEY% ASC LIMIT 1");
    149149            if (list($next_id) = mysql_fetch_row($qid)) {
    150                 App::dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id);
     150                $app->dieURL($_SERVER['PHP_SELF'] . '?op=edit&%PRIMARY_KEY%=' . $next_id);
    151151            } else {
    152                 App::raiseMsg(_("Cannot edit next, the end of the list was reached"), MSG_NOTICE, __FILE__, __LINE__);
     152                $app->raiseMsg(_("Cannot edit next, the end of the list was reached"), MSG_NOTICE, __FILE__, __LINE__);
    153153            }
    154         } else if (App::validBoomerangURL('%NAME_PLURAL%')) {
     154        } else if ($app->validBoomerangURL('%NAME_PLURAL%')) {
    155155            // Display boomerang page.
    156             App::dieBoomerangURL('%NAME_PLURAL%');
     156            $app->dieBoomerangURL('%NAME_PLURAL%');
    157157        }
    158158        // Display default page.
    159         App::dieURL($_SERVER['PHP_SELF']);
     159        $app->dieURL($_SERVER['PHP_SELF']);
    160160    }
    161161    break;
     
    164164//     $auth->requireAccessClearance(ZONE_ADMIN_PROGRAMS_FUNC_REORDER);
    165165    updateRank(getFormData('rank'));
    166     App::dieURL($_SERVER['PHP_SELF']);
     166    $app->dieURL($_SERVER['PHP_SELF']);
    167167    break;
    168168
     
    220220    ");
    221221    if (!$frm = mysql_fetch_assoc($qid)) {
    222         App::logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
    223         App::raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
    224         App::dieBoomerangURL();
     222        $app->logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
     223        $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
     224        $app->dieBoomerangURL();
    225225    }
    226226
     
    262262    ");
    263263    if (! list($name) = mysql_fetch_row($qid)) {
    264         App::logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
    265         App::raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
    266         App::dieBoomerangURL();
     264        $app->logMsg('Could not find record with %PRIMARY_KEY%: ' . $id, LOG_WARNING, __FILE__, __LINE__);
     265        $app->raiseMsg(sprintf(_("The requested record %s could not be found."), $id), MSG_ERR, __FILE__, __LINE__);
     266        $app->dieBoomerangURL();
    267267    }
    268268
     
    270270    DB::query("DELETE FROM %DB_TBL% WHERE %PRIMARY_KEY% = '" . DB::escapeString($id) . "'");
    271271
    272     App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);
     272    $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been deleted."), $name), MSG_SUCCESS, __FILE__, __LINE__);
    273273
    274274    // Unlock record.
     
    290290    $version->create('%DB_TBL%', '%PRIMARY_KEY%', $last_insert_id, $frm['<##>']);
    291291
    292     App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
     292    $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been added."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
    293293
    294294    return $last_insert_id;
     
    313313    $version->create('%DB_TBL%', '%PRIMARY_KEY%', $frm['%PRIMARY_KEY%'], $frm['<##>']);
    314314
    315     App::raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been updated."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
     315    $app->raiseMsg(sprintf(_("The %ITEM_TITLE% <strong>%s</strong> has been updated."), $frm['<##>']), MSG_SUCCESS, __FILE__, __LINE__);
    316316
    317317    // Unlock record.
     
    399399{
    400400    if (!is_array($ranks)) {
    401         App::logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__);
     401        $app->logMsg('Saving rank failed, data posted is not an array: ' . $ranks, LOG_ERR, __FILE__, __LINE__);
    402402        return false;
    403403    }
     
    423423    }
    424424
    425     App::raiseMsg(_("Records have been reordered with the new rank."), MSG_SUCCESS, __FILE__, __LINE__);
     425    $app->raiseMsg(_("Records have been reordered with the new rank."), MSG_SUCCESS, __FILE__, __LINE__);
    426426    if ($unspecified_counter > 0) {
    427         App::raiseMsg(sprintf(_("%s items with unspecified ranks were automatically assigned a rank of 10000."), $unspecified_counter), MSG_NOTICE, __FILE__, __LINE__);
     427        $app->raiseMsg(sprintf(_("%s items with unspecified ranks were automatically assigned a rank of 10000."), $unspecified_counter), MSG_NOTICE, __FILE__, __LINE__);
    428428    }
    429429}
  • branches/2.0singleton/bin/module_maker/skel/public.php

    r111 r127  
    4242    ");
    4343    if (!$item = mysql_fetch_assoc($qid)) {
    44         App::raiseMsg(_("Sorry that %ITEM_TITLE% could not be found"), MSG_WARNING, __FILE__, __LINE__);
    45         App::dieBoomerangURL();
     44        $app->raiseMsg(_("Sorry that %ITEM_TITLE% could not be found"), MSG_WARNING, __FILE__, __LINE__);
     45        $app->dieBoomerangURL();
    4646    }
    4747
  • branches/2.0singleton/bin/module_maker/sql.cli.php

    r111 r127  
    3737// Make sure requested table is in database.
    3838if (!in_array($db_tbl, $tables)) {
    39     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)));
     39    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)));
    4040}
    4141
  • branches/2.0singleton/bin/module_maker/validation.cli.php

    r111 r127  
    2424// Make sure requested table is in database.
    2525if (!in_array($db_tbl, $tables)) {
    26     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)));
     26    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)));
    2727}
    2828
Note: See TracChangeset for help on using the changeset viewer.