Initial Membership Database Work

This commit is contained in:
Deon George
2014-07-09 13:04:56 +10:00
parent d4b3b0f9bc
commit febaad9ea6
37 changed files with 1395 additions and 834 deletions

View File

@@ -1,6 +1,9 @@
<?php defined('SYSPATH') or die('No direct script access.');
// -- Environment setup --------------------------------------------------------
$SERVER_NAMES = array(
'dev.leenooks.vpn',
);
// Load the core Kohana class
require SYSPATH.'classes/Kohana/Core'.EXT;
@@ -69,6 +72,12 @@ I18n::lang('en-us');
* Note: If you supply an invalid environment name, a PHP warning will be thrown
* saying "Couldn't find constant Kohana::<INVALID_ENV_NAME>"
*/
/**
* Set the environment status by the domain.
*/
Kohana::$environment = (! isset($_SERVER['SERVER_NAME']) OR in_array($_SERVER['SERVER_NAME'],$SERVER_NAMES)) ? Kohana::PRODUCTION : Kohana::DEVELOPMENT;
if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
@@ -90,9 +99,10 @@ if (isset($_SERVER['KOHANA_ENV']))
* - boolean expose set the X-Powered-By header FALSE
*/
Kohana::init(array(
'base_url' => '/aer',
'caching' => TRUE,
'index_file' => '',
'base_url' => Kohana::$environment === Kohana::PRODUCTION ? '/ebccc' : '/ebccc',
'caching' => Kohana::$environment === Kohana::PRODUCTION,
'profile' => Kohana::$environment !== Kohana::PRODUCTION,
'index_file' => FALSE,
));
/**
@@ -109,10 +119,10 @@ Kohana::$config->attach(new Config_File);
* Enable modules. Modules are referenced by a relative or absolute path.
*/
Kohana::modules(array(
'lnapp' => MODPATH.'lnApp', // lnApp Base Application Tools
'lnapp' => MODPATH.'lnapp', // lnApp Base Application Tools
// 'oauth' => MODPATH.'oauth', // OAuth Module for External Authentication
'auth' => SMDPATH.'auth', // Basic authentication
'cache' => SMDPATH.'cache', // Caching with multiple backends
// 'cache' => SMDPATH.'cache', // Caching with multiple backends
// 'cron' => SMDPATH.'cron', // Kohana Cron Module
// 'codebench' => SMDPATH.'codebench', // Benchmarking tool
'database' => SMDPATH.'database', // Database access
@@ -122,12 +132,17 @@ Kohana::modules(array(
// 'khemail' => SMDPATH.'khemail', // Email module for Kohana 3 PHP Framework
// 'minion' => SMDPATH.'minion', // CLI Tasks
'orm' => SMDPATH.'orm', // Object Relationship Mapping
'pagination' => SMDPATH.'pagination', // Kohana Pagination module for Kohana 3 PHP Framework
// 'pagination' => SMDPATH.'pagination', // Kohana Pagination module for Kohana 3 PHP Framework
// 'unittest' => SMDPATH.'unittest', // Unit testing
// 'userguide' => SMDPATH.'userguide', // User guide and API documentation
'xml' => SMDPATH.'xml', // XML module for Kohana 3 PHP Framework
// 'xml' => SMDPATH.'xml', // XML module for Kohana 3 PHP Framework
));
/**
* Load our modules defined in the DB
*/
Kohana::modules(array_merge(Kohana::modules(),Config::modules()));
/**
* Enable specalised interfaces
*/