Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 40b0e9a

Browse files
author
Charles Ma
committed
BUG: fixed dashboard refs #174
1 parent 9abaf36 commit 40b0e9a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

core/controllers/components/UpgradeComponent.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,17 @@ public function upgrade($currentVersion = null, $testing = false)
205205
else
206206
{
207207
$path = BASE_PATH."/core/configs/".$this->module.".local.ini";
208-
$data = parse_ini_file($path, true);
209-
if(file_exists($path.'.old'))
208+
if(file_exists($path))
210209
{
211-
unlink($path.'.old');
212-
}
213-
rename($path, $path.'.old');
214-
$data['global']['version'] = $migration['versionText'];
215-
$utility->createInitFile($path, $data);
210+
$data = parse_ini_file($path, true);
211+
if(file_exists($path.'.old'))
212+
{
213+
unlink($path.'.old');
214+
}
215+
rename($path, $path.'.old');
216+
$data['global']['version'] = $migration['versionText'];
217+
$utility->createInitFile($path, $data);
218+
}
216219
}
217220
return true;
218221
}//end upgrade
@@ -238,7 +241,7 @@ public function getClassName($filename)
238241
/** execute de upgrade*/
239242
protected function _processFile($migration)
240243
{
241-
require_once BASE_PATH.'/core/MIDASUpgrade.php';
244+
require_once BASE_PATH.'/core/models/MIDASUpgrade.php';
242245
$version = $migration['version'];
243246
$filename = $migration['filename'];
244247
$classname = $this->getClassName($filename);

0 commit comments

Comments
 (0)