Skip to content

Commit

Permalink
Installer fixes, use internal.php also when no config found
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Mar 26, 2013
1 parent 7df1d6f commit c719079
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 6 additions & 1 deletion application/config/internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@
)
);

$userConfig = require(dirname(__FILE__) . '/config.php');
if (!file_exists(APPPATH . 'config/config.php')) {
$userConfig = require(dirname(__FILE__) . '/config-sample-mysql.php');
} else {
$userConfig = require(dirname(__FILE__) . '/config.php');
}

return CMap::mergeArray($internalConfig, $userConfig);
/* End of file internal.php */
/* Location: ./application/config/internal.php */
2 changes: 1 addition & 1 deletion application/helpers/admin/import_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3469,7 +3469,7 @@ function XMLImportSurvey($sFullFilepath,$sXMLdata=NULL,$sNewSurveyName=NULL,$iDe
$insertdata['wishSID']=$iOldSID;
}

if ($iDBVersion<=143)
if ($iDBVersion<145)
{
if(isset($insertdata['private'])) $insertdata['anonymized']=$insertdata['private'];
unset($insertdata['private']);
Expand Down
7 changes: 2 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,10 @@
require_once BASEPATH . 'yii' . EXT;
require_once APPPATH . 'core/LSYii_Application' . EXT;

$config = APPPATH . 'config/internal' . EXT;
$config = require_once(APPPATH . 'config/internal' . EXT);

if (!file_exists(APPPATH . 'config/config' . EXT)) {
$config = APPPATH . 'config/config-sample-mysql' . EXT;

if (!file_exists(APPPATH . 'config/config' . EXT)) {
// If Yii can not start due to unwritable runtimePath, present an error
$config = require($config);
$runtimePath = $config['runtimePath'];
if (!is_dir($runtimePath) || !is_writable($runtimePath)) {
// @@TODO: present html page styled like the installer
Expand Down

0 comments on commit c719079

Please sign in to comment.