mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit 367903fd81bb9c71ebf1872cedbb0e73927eb379
parent 397a518088e23ed7aa41022ac2d22f59ec7d1512
Author: markseu <mark2011@mayberg.se>
Date:   Wed, 29 Jul 2020 09:32:25 +0200

Improved update, thanks Steffen

Diffstat:
Msystem/extensions/update.php | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/system/extensions/update.php b/system/extensions/update.php @@ -2,7 +2,7 @@ // Update extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/update class YellowUpdate { - const VERSION = "0.8.26"; + const VERSION = "0.8.27"; const PRIORITY = "2"; public $yellow; // access to API public $updates; // number of updates @@ -157,7 +157,9 @@ class YellowUpdate { foreach ($this->yellow->toolbox->getDirectoryEntries($pathSource, "/.*/", true, false, false) as $entry) { $entrySource = $pathSource.$entry; $entryDestination = $pathDestination.$entry; - if (!$this->yellow->toolbox->copyFile($entrySource, $entryDestination)) { + $dataSource = $this->yellow->toolbox->readFile($entrySource); + $dataDestination = $this->yellow->toolbox->readFile($entryDestination); + if ($dataSource!=$dataDestination && !$this->yellow->toolbox->copyFile($entrySource, $entryDestination)) { $this->yellow->log("error", "Can't write file '$entryDestination'!"); } }