Skip to content

Commit

Permalink
Moved configuration to internal configuration file.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Jan 12, 2015
1 parent 9341264 commit 334529f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
10 changes: 9 additions & 1 deletion application/config/internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@
'showScriptName' => true,
),
'assetManager' => array(
'baseUrl' => '/tmp/assets'
'baseUrl' => '/tmp/assets',
'basePath'=> dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'assets'

),
'request' => array(
'class'=>'LSHttpRequest',
'noCsrfValidationRoutes'=>array(
'remotecontrol'
),

'enableCsrfValidation'=>true, // CSRF protection
'enableCookieValidation'=>false // Enable to activate cookie protection
),
Expand All @@ -72,6 +75,11 @@
'schemaCachingDuration' => 3600,
'class' => 'DbConnection'
),
'session' => [
'cookieParams' => array(
'httponly' => true,
),
],
'messages' => array(
'class' => 'CGettextMessageSource',
'cachingDuration'=>3600,
Expand Down
23 changes: 2 additions & 21 deletions application/core/LSYii_Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,9 @@ public function __construct($config = null)
$config['components']['db']['enableParamLogging'] = true;
}
}


if (!isset($config['components']['request']))
{
$config['components']['request']=array();
}
if (!isset($config['components']['session']))
{
$config['components']['session']=array();
}
$config['components']['session']=array_merge_recursive($config['components']['session'],array(
'cookieParams' => array(
'httponly' => true,
),
));

if (!isset($config['components']['assetManager']))
{
$config['components']['assetManager']=array();
}
$config['components']['assetManager']=array_merge_recursive($config['components']['assetManager'],array(
'basePath'=> dirname(dirname(dirname(__FILE__))).DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'assets' // Enable to activate cookie protection
));


parent::__construct($config);
Yii::setPathOfAlias('bootstrap' , Yii::getPathOfAlias('ext.bootstrap'));
Expand Down

0 comments on commit 334529f

Please sign in to comment.