Minor updatess
This commit is contained in:
@@ -31,15 +31,6 @@ class Config extends Kohana_Config {
|
||||
public function __construct() {
|
||||
if (defined('PHPUNITTEST'))
|
||||
$_SERVER['SERVER_NAME'] = PHPUNITTEST;
|
||||
|
||||
// We need to know our site here, so that we can subsequently load our enabled modules.
|
||||
if (Kohana::$is_cli) {
|
||||
if (! $site = Minion_CLI::options('site'))
|
||||
// @todo Need to figure out how to make this CLI error nicer.
|
||||
throw new Minion_Exception_InvalidTask(_('Cant figure out the site, use --site= for CLI'));
|
||||
else
|
||||
$_SERVER['SERVER_NAME'] = $site;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,9 +107,19 @@ class Config extends Kohana_Config {
|
||||
public static function modules() {
|
||||
static $return = array();
|
||||
|
||||
if (! count($return))
|
||||
if (! count($return)) {
|
||||
// We need to know our site here, so that we can subsequently load our enabled modules.
|
||||
if (PHP_SAPI === 'cli') {
|
||||
if (! $site = Minion_CLI::options('site'))
|
||||
// @todo Need to figure out how to make this CLI error nicer.
|
||||
throw new Minion_Exception_InvalidTask(_('Cant figure out the site, use --site= for CLI'));
|
||||
else
|
||||
$_SERVER['SERVER_NAME'] = $site;
|
||||
}
|
||||
|
||||
foreach (ORM::factory('Module')->list_external() as $mo)
|
||||
$return[$mo->name] = MODPATH.$mo->name;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ class URL extends Kohana_URL {
|
||||
'admin'=>'a',
|
||||
'affiliate'=>'affiliate', // @todo To retire
|
||||
'reseller'=>'r',
|
||||
'task'=>'task',
|
||||
'user'=>'u',
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user