OSB enhancements to date

This commit is contained in:
Deon George
2010-11-30 09:41:08 +11:00
parent 8715a2059b
commit ec6a542bc3
478 changed files with 23423 additions and 9309 deletions

View File

@@ -8,7 +8,7 @@
* @see http://kohanaframework.org/guide/using.configuration
* @see http://php.net/timezones
*/
date_default_timezone_set('America/Chicago');
date_default_timezone_set('Australia/Melbourne');
/**
* Set the default locale.
@@ -50,7 +50,8 @@ ini_set('unserialize_callback_func', 'spl_autoload_call');
* - boolean caching enable or disable internal caching FALSE
*/
Kohana::init(array(
'base_url' => '/',
'base_url' => '/osb',
'index_file' => '',
));
/**
@@ -67,16 +68,32 @@ Kohana::$config->attach(new Kohana_Config_File);
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
// 'auth' => SMDPATH.'auth', // Basic authentication
// 'cache' => SMDPATH.'cache', // Caching with multiple backends
'auth' => SMDPATH.'auth', // Basic authentication
'cache' => SMDPATH.'cache', // Caching with multiple backends
// 'codebench' => SMDPATH.'codebench', // Benchmarking tool
// 'database' => SMDPATH.'database', // Database access
'database' => SMDPATH.'database', // Database access
// 'image' => SMDPATH.'image', // Image manipulation
// 'orm' => SMDPATH.'orm', // Object Relationship Mapping
'orm' => SMDPATH.'orm', // Object Relationship Mapping
// 'oauth' => SMDPATH.'oauth', // OAuth authentication
// 'pagination' => SMDPATH.'pagination', // Paging of results
// 'unittest' => SMDPATH.'unittest', // Unit testing
// 'userguide' => SMDPATH.'userguide', // User guide and API documentation
'xml' => SMDPATH.'xml', // XML module for Kohana 3 PHP Framework
'email' => SMDPATH.'email', // Email module for Kohana 3 PHP Framework
'gchart' => MODPATH.'gchart', // Google Chart Module
));
/**
* Load our modules defined in the DB
*/
Kohana::modules(array_merge(Kohana::modules(),Config::appmodules()));
/**
* Enable admin, user (account), reseller and affiliate interfaces
*/
Route::set('sections', '<directory>/<controller>(/<action>(/<id>(/<sid>)))',
array(
'directory' => '('.implode('|',Kohana::config('config.method_directory')).')' //(account|admin|affiliate|reseller|task)'
));
/**
@@ -89,6 +106,20 @@ Route::set('default', '(<controller>(/<action>(/<id>)))')
'action' => 'index',
));
// Static file serving (CSS, JS, images)
Route::set('default/media', 'media(/<file>)', array('file' => '.+'))
->defaults(array(
'controller' => 'welcome',
'action' => 'media',
'file' => NULL,
));
// Make sure their PHP version is current enough
if (strcmp(phpversion(),'5.3') < 0) {
echo 'This application requires PHP 5.3 or newer to run';
die();
}
if ( ! defined('SUPPRESS_REQUEST'))
{
/**