Esempio n. 1
0
<?php

// uncomment the following to define a path alias
// O::setPathOfAlias('local','path/to/local-folder');
// This is the main Web application configuration. Any writable
//
O::setPathOfAlias('bootstrap', defined('BOOTSTRAP_PATH') ? BOOTSTRAP_PATH : dirname(__FILE__) . '/../extensions/bootstrap');
// CWebApplication properties can be configured here.
return array('basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..', 'name' => 'Oprecx', 'preload' => array('log'), 'import' => array('application.models.*', 'application.components.*'), 'modules' => array('admin', 'registration'), 'components' => array('user' => array('allowAutoLogin' => true, 'loginUrl' => array('user/login')), 'bootstrap' => array('class' => 'ext.bootstrap.components.Bootstrap', 'responsiveCss' => true, 'enableBootboxJS' => false, 'enableNotifierJS' => false, 'fontAwesomeCss' => true, 'yiiCss' => false), 'urlManager' => array('urlFormat' => 'path', 'showScriptName' => false, 'rules' => array('/' => 'site/index', '/about/<view:\\w+>' => array('site/page', 'urlSuffix' => '.html'), '/<controller:(user|site)>/<action:\\w+>' => '<controller>/<action>', '/admin/<rec:\\w+>' => 'admin/setting/general', '/admin/<rec:\\w+>/<controller:\\w+>' => 'admin/<controller>/index', '/admin/<rec:\\w+>/<controller:\\w+>/<action:\\w+>' => 'admin/<controller>/<action>', '/<module:(gii|admin)>' => '<module>/default/index', '/<module:(gii)>/<controller:\\w+>' => '<module>/<controller>/index', '/<module:(gii)>/<controller:\\w+>/<action:\\w+>' => '<module>/<controller>/<action>', '/<rec_name:\\w+>/' => array('registration/default/index', 'caseSensitive' => false), '/<rec_name:\\w+>/<action:\\w+>' => 'registration/default/<action>')), 'db' => array('connectionString' => DB_CON_STRING, 'emulatePrepare' => true, 'username' => DB_USER, 'password' => DB_PASSWORD, 'charset' => defined('DB_CHARSET') ? DB_CHARSET : 'utf8', 'tablePrefix' => defined('DB_TABLE_PREFIX') ? DB_TABLE_PREFIX : 'oprecx_', 'schemaCachingDuration' => 3600 * 24), 'errorHandler' => array('errorAction' => 'site/error'), 'log' => array('class' => 'CLogRouter', 'routes' => array(array('class' => 'CFileLogRoute', 'levels' => 'error, warning'))), 'messages' => array('class' => 'CPhpMessageSource', 'language' => 'en'), 'cache' => array('class' => defined('OPRECX_CACHE') ? OPRECX_CACHE : (function_exists('apc_add') ? 'CApcCache' : 'CDummyCache')), 'session' => array('sessionName' => 's', 'timeout' => 7200), 'request' => array('enableCookieValidation' => true, 'enableCsrfValidation' => true, 'csrfTokenName' => 'token')), 'params' => array('adminEmail' => '*****@*****.**', 'defaultLang' => 'id', 'supportedLang' => array('id' => 'Bahasa Indonesia', 'en' => 'English'), 'langMap' => array('en-us' => 'en', 'id-id' => 'id')));