From a43ad2b2c535ff139220c2390a58d1d4d708eac1 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 14 Jan 2011 15:19:48 +1100 Subject: [PATCH] PTA configuration of KH --- application/bootstrap.php | 21 +++++++++++++++------ kh.php | 4 ++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/application/bootstrap.php b/application/bootstrap.php index 72bdd15..c10916f 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -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. @@ -58,7 +58,8 @@ if (getenv('KOHANA_ENV') !== FALSE) * - boolean caching enable or disable internal caching FALSE */ Kohana::init(array( - 'base_url' => '/', + 'base_url' => '/pta', + 'index_file' => '', )); /** @@ -75,16 +76,16 @@ Kohana::$config->attach(new Kohana_Config_File); * Enable modules. Modules are referenced by a relative or absolute path. */ Kohana::modules(array( - // 'auth' => MODPATH.'auth', // Basic authentication + 'auth' => MODPATH.'auth', // Basic authentication // 'cache' => MODPATH.'cache', // Caching with multiple backends // 'codebench' => MODPATH.'codebench', // Benchmarking tool - // 'database' => MODPATH.'database', // Database access + 'database' => MODPATH.'database', // Database access // 'image' => MODPATH.'image', // Image manipulation - // 'orm' => MODPATH.'orm', // Object Relationship Mapping + 'orm' => MODPATH.'orm', // Object Relationship Mapping // 'oauth' => MODPATH.'oauth', // OAuth authentication // 'pagination' => MODPATH.'pagination', // Paging of results // 'unittest' => MODPATH.'unittest', // Unit testing - // 'userguide' => MODPATH.'userguide', // User guide and API documentation + 'userguide' => MODPATH.'userguide', // User guide and API documentation )); /** @@ -97,6 +98,14 @@ Route::set('default', '((/(/)))') 'action' => 'index', )); +// Static file serving (CSS, JS, images) +Route::set('default/media', 'media(/)', array('file' => '.+')) + ->defaults(array( + 'controller' => 'welcome', + 'action' => 'media', + 'file' => NULL, + )); + if ( ! defined('SUPPRESS_REQUEST')) { /** diff --git a/kh.php b/kh.php index 0c88d13..2403225 100644 --- a/kh.php +++ b/kh.php @@ -13,7 +13,7 @@ $application = 'application'; * * @see http://kohanaframework.org/guide/about.install#modules */ -$modules = 'modules'; +$modules = 'includes/kohana/modules'; /** * The directory in which the Kohana resources are located. The system @@ -21,7 +21,7 @@ $modules = 'modules'; * * @see http://kohanaframework.org/guide/about.install#system */ -$system = 'system'; +$system = 'includes/kohana/system'; /** * The default extension of resource files. If you change this, all resources