<?php
/*
Note: Checkout the file: ../includes/config.json
Access Rule: Yii::app()->cfg->
*/
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
$base = dirname(dirname($_SERVER['PHP_SELF']));
$base = in_array ($base, array ('\', '/')) ? '' : $base;
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR. '..',
//** Application Name
'name'=>Yii::app()->cfg->app->name,
//** Theme Name
'theme'=>Yii::app()->cfg->app->theme,
//** Default Date and Time Zone
'timeZone'=>Yii::app()->cfg->app->timeZone,
//** Main Language
'sourceLanguage'=>'00',
//** Main Language
'runtimePath'=>dirname(APPLICATION_ROOT_PATH).'/protected/runtime',
//** User selcted Language
'language'=>Yii::app()->cfg->app->language,
// preloading 'log' component
'preload'=>array('log'),
// autoloading model and component classes
'import'=>array(
'application.models.*',
'application.components.*',
'application.components.sitepal.*',
'application.libraries.*',
'application.core.*',
'application.core.sqlitemodels.*',
'application.sqlitemodels.*',
'application.mysqlmodels.*',
'application.services.*',
'application.mail.*',
'ext.LinkListPager.LinkListPager'
),
'modules'=>array(
// uncomment the following to enable the Gii tool
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'root',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
'generatorPaths'=>array(
'application.giitemplates',
),
),
),
// application components
'components'=>array(
'user'=>array(
'class'=>'WebUser',
// enable cookie-based authentication
'allowAutoLogin'=>true,
),
'ccore'=>array(
'class'=>'CoreComp',
),
'messages'=>array(
'class'=>'MessageSource',
),
/*'authManager'=>array(
'class'=>'DbAuthManager',
'connectionID'=>'sqlite',
),*/
'auth'=>array(
'class'=>'Auth',
),
'cache'=>array(
'class'=>'application.core.FileCache',
),
'assetManager'=>array(
'class'=>'AssetManager',
'basePath'=>APPLICATION_ROOT_PATH.'/../assets',
'baseUrl'=>$base.'/assets',
//'baseUrl'=>'assets',
),
'clientScript'=>array(
'class'=>'ClientScript',
),
'dbcache'=>array(
'class'=>'application.core.DbCache',
),
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
'showScriptName'=>false,
'urlFormat'=>'path',
'caseSensitive'=>false,
'matchValue'=>true,
'urlSuffix'=>Yii::app()->cfg->app->url->extension,
'class'=>'application.components.UrlManager',
'rules'=>array(
URL_RULE_LANG.'gii'=>'gii',
URL_RULE_LANG.'gii/<controller:w+>'=>'gii/<controller>',
URL_RULE_LANG.'gii/<controller:w+>/<action:w+>'=>'gii/<controller>/<action>',
),
),
'request'=>array(
'class'=>'HttpRequest',
'enableCookieValidation'=>true,
'enableCsrfValidation'=>true,
// No CSRF validation rules
'noCsrfValidationRoutes'=>array(
//'controller/action',
),
),
'coreMessages'=>array(
'basePath'=>null,
),
'sqlite'=>array(
//** Do not change this line, create other sqlite db.
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/access.db',
'schemaCachingDuration' => 3600,
'class' => 'CDbConnection'
),
'sqlitecore'=>array(
//** Do not change this line, create other sqlite db.
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/core.db',
'schemaCachingDuration' => 3600,
'class' => 'CDbConnection'
),
// uncomment the following to use a MySQL database
'db'=>array(
'connectionString' => 'mysql:host='.Yii::app()->cfg->app->dbMySQL->server.';dbname='.Yii::app()->cfg->app->dbMySQL->database,
'emulatePrepare' => true,
'schemaCachingDuration' => 3600,
'username' => Yii::app()->cfg->app->dbMySQL->username,
'password' => Yii::app()->cfg->app->dbMySQL->password,
'charset' => Yii::app()->cfg->app->dbMySQL->charset,
'initSQLs'=>array("set time_zone='".Yii::app()->cfg->app->timeZoneHours."';"),
),
'errorHandler'=>array(
// use 'site/error' action to display errors
'errorAction'=>'site/error',
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
/*array(
'class'=>'CWebLogRoute',
'categories'=>'system.db.CDbCommand',
'showInFireBug'=>true,
),*/
array(
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
// uncomment the following to show log messages on web pages
array(
'class'=>'CWebLogRoute',
),
),
),
),
// application-level parameters that can be accessed
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>Yii::app()->cfg->newsletter->adminEmail,
),
);