commit fb2f5e4c90c69c50a1ad822bb67e05f1abfa6dd6
parent e1d52bb8789e4c4fa2c98b6f22a3eb4775095e64
Author: markseu <mark2011@mayberg.se>
Date: Sun, 18 Jun 2017 12:48:26 +0200
System update (painless update from previous version)
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/system/plugins/update.php b/system/plugins/update.php
@@ -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");