示例#1
0
文件: cmdline.php 项目: jvinet/pronto
} else {
    require_once DIR_FS_APP . DS . 'config' . DS . 'databases.php';
    foreach ($DATABASES as $key => $dbcfg) {
        $db =& Factory::db($dbcfg);
        Registry::set('pronto:db:' . $key, $db);
    }
    // we leave $db set for scripts that expect it
    unset($key, $dbcfg);
}
// TODO: this should be unset, left for back-compat for now...
//unset($db);
/************************************************************************
 * INTERNATIONALIZATION
 ************************************************************************/
$i18n = new I18N();
$i18n->autoset_language('en');
define('LANG', $i18n->get_language());
Registry::set('pronto:i18n', $i18n);
unset($i18n);
/************************************************************************
 * PRELOAD PLUGINS
 ************************************************************************/
foreach (explode(' ', PLUGINS) as $p) {
    if ($p) {
        Factory::plugin($p, 'page');
    }
}
unset($p);
// left in the symbol table for the cmdline script
$plugins =& Registry::get('pronto:plugins');
/************************************************************************