System update (painless update from previous version)
This commit is contained in:
parent
e1d52bb878
commit
fb2f5e4c90
1 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,14 @@ class YellowUpdate
|
|||
// Handle startup
|
||||
function onStartup($update)
|
||||
{
|
||||
if(filesize("yellow.php")==591 || filesize("yellow.php")==609) //TODO: remove later, detects old version
|
||||
{
|
||||
$update = true;
|
||||
$fileData = $this->yellow->toolbox->readFile($fileNameScript);
|
||||
$fileData = preg_replace("#yellow->plugins->load\(\)#", "yellow->load()", $fileData);
|
||||
$this->yellow->toolbox->createFile($fileNameScript, $fileData);
|
||||
}
|
||||
|
||||
if($update) //TODO: remove later, converts old config file
|
||||
{
|
||||
$fileNameConfig = $this->yellow->config->get("configDir").$this->yellow->config->get("configFile");
|
||||
|
|
Loading…
Add table
Reference in a new issue