commit 0df26874fab9e85c00b879965e375d842f0c6fbb
parent 2feb89ce9ecb67bf867a7bc7125a551ebf335fcf
Author: markseu <mark2011@mayberg.se>
Date: Tue, 20 Jun 2017 12:32:38 +0200
System update (detect old version)
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/system/plugins/update.php b/system/plugins/update.php
@@ -23,11 +23,12 @@ class YellowUpdate
// Handle startup
function onStartup($update)
{
- if(filesize("yellow.php")==591) //TODO: remove later, detects old version
+ if(!$this->yellow->config->isExisting("startupUpdateNotification")) //TODO: remove later, detects old version
{
$update = true;
+ $fileNameConfig = $this->yellow->config->get("configDir").$this->yellow->config->get("configFile");
+ $this->yellow->config->update($fileNameConfig, array("startupUpdateNotification" => "none"));
$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("yellow.php", $fileData);
}