Minor updatess

This commit is contained in:
Deon George
2013-02-26 14:19:32 +11:00
parent 288d974cfa
commit 2cdd130d1a
16 changed files with 117 additions and 50 deletions

View File

@@ -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;
}

View File

@@ -16,6 +16,7 @@ class URL extends Kohana_URL {
'admin'=>'a',
'affiliate'=>'affiliate', // @todo To retire
'reseller'=>'r',
'task'=>'task',
'user'=>'u',
);

View File

@@ -12,7 +12,7 @@
*/
return array(
'appname' => 'OS Billing',
'appname' => 'OS Billing', // Our application name, as shown in the title bar of pages
'cache_type' => 'file',
'email_from' => array('noreply@graytech.net.au'=>'Graytech Hosting'),
'email_admin_only'=> array(

View File

@@ -0,0 +1,46 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
return array
(
// Enable the API browser. TRUE or FALSE
'api_browser' => TRUE,
// Enable these packages in the API browser. TRUE for all packages, or a string of comma seperated packages, using 'None' for a class with no @package
// Example: 'api_packages' => 'Kohana,Kohana/Database,Kohana/ORM,None',
'api_packages' => TRUE,
// Enables Disqus comments on the API and User Guide pages
'show_comments' => Kohana::$environment === Kohana::PRODUCTION,
// Leave this alone
'modules' => array(
'kohana' => array('enabled'=>FALSE),
'auth' => array('enabled'=>FALSE),
'cache' => array('enabled'=>FALSE),
'database' => array('enabled'=>FALSE),
'minion' => array('enabled'=>FALSE),
'orm' => array('enabled'=>FALSE),
'pagination' => array('enabled'=>FALSE),
// This should be the path to this modules userguide pages, without the 'guide/'. Ex: '/guide/modulename/' would be 'modulename'
'userguide' => array(
// Whether this modules userguide pages should be shown
'enabled' => TRUE,
// The name that should show up on the userguide index page
'name' => 'Userguide',
// A short description of this module, shown on the index page
'description' => 'Documentation viewer and api generation.',
// Copyright message, shown in the footer for this module
'copyright' => '&copy; 20082012 Kohana Team',
)
),
// Set transparent class name segments
'transparent_prefixes' => array(
'Kohana' => TRUE,
)
);