<?php

// Set the path of Bootstrap to be the root of the project.
//Yii::setPathOfAlias('bootstrap', realpath(dirname(__FILE__).'/../../../'));

$config = array(

	'basePath'=>realpath(dirname(__FILE__).'/..'),
	'timeZone' => 'America/Mexico_City',
	'name'=>'Centinelas del Mayab',

	'preload'=>array(
		'bootstrap',
		'log',
	),

	'import'=>array(
		'application.models.*',
		'application.components.*',
        	'application.modules.user.models.*',
        	'application.modules.user.components.*',
	),

	'modules'=>array(
		'panel',

		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'pass',
			'ipFilters'=>false,
			'generatorPaths'=>array('bootstrap.gii'),
		),


	),

	'components'=>array(
		'funciones'=>array(
		        'class'=>'Funciones',
		        'someconfig'=>'someothervalue',
		),
		'bootstrap'=>array(
			'class'=>'ext.bootstrap.components.Bootstrap',
			'responsiveCss'=>false,
		),
    	'user'=>array(
        	// enable cookie-based authentication
        		'class' => 'WebUser',
        		'allowAutoLogin'=>true,
        		'loginUrl' => array('panel/acceso/login'),
    	),
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=CENTINELASMAYAB_db',
			'emulatePrepare' => true,
			'username' => 'sec_user',
			'password' => '5Qn6g2je6WkF7FX6CcBhAzUf',
			'charset' => 'utf8',
			'tablePrefix' => 'tbl_',
		),
		'errorHandler'=>array(
			'errorAction'=>'site/error',
		),
		/*'fb'=>array(
			'class'=>'ext.facebook.components.FacebookConnect',
			'appID'=>'106265262835735',
			'appNamespace'=>'yii-bootstrap',
		),*/
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
		'urlManager'=>array(
			'showScriptName'=>false,
			'urlFormat'=>'path',
			'urlSuffix'=>'.html',
			'rules'=>array(
				'index'=>'site/index',
				'setup'=>'site/setup',
			),
		),
	),

	// Application-level parameters
	'params'=>array(
		'appTitle'=>'Centinelas del Mayab',
		'appDescription'=>'Plataformas de Información geo-espacial y mapeo de conflictos',
	),
);

return file_exists(dirname(__FILE__).'/local.php')
		? CMap::mergeArray($config, require('local.php'))
		: $config;