commit 577cc3000e0699e1bc0add22e864315878f47654
parent cca07143f8c9651cf162ecca26b49e8c349d96ae
Author: markseu <mark2011@mayberg.se>
Date: Sun, 18 Jun 2017 15:39:41 +0200
System update (painless)
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/system/plugins/update.php b/system/plugins/update.php
@@ -23,12 +23,13 @@ class YellowUpdate
// Handle startup
function onStartup($update)
{
- if(filesize("yellow.php")==591 || filesize("yellow.php")==609) //TODO: remove later, detects old version
+ if(filesize("yellow.php")==591) //TODO: remove later, detects old version
{
$update = true;
- $fileData = $this->yellow->toolbox->readFile($fileNameScript);
+ $fileData = $this->yellow->toolbox->readFile("yellow.php");
+ $fileData = preg_replace("#Yellow requires#", "Datenstrom Yellow requires", $fileData);
$fileData = preg_replace("#yellow->plugins->load\(\)#", "yellow->load()", $fileData);
- $this->yellow->toolbox->createFile($fileNameScript, $fileData);
+ $this->yellow->toolbox->createFile("yellow.php", $fileData);
}
if($update) //TODO: remove later, converts old config file