From 9d7f7f8e932cf0c82d17d9ae9bdc388cb158e841 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 16 Apr 2014 08:48:24 +0100 Subject: [PATCH] Start copying settings over $updateDone = true moved to end of new function, copyOverSettings Extra echo line in openNewZip and then calls this function Get settings from old config___settings.php file For now, for each one, get $key and $value Need to save these info new config___settings.php file --- lib/updater.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/updater.php b/lib/updater.php index 6217b06..1c719db 100644 --- a/lib/updater.php +++ b/lib/updater.php @@ -61,8 +61,6 @@ function copyOldVersion() { } function openZipNew($icvInfo) { - global $updateDone; - echo 'Retrieving zip from ICEcoder site...
'; $source = 'ICEcoder v'.$icvInfo; $target = '../'; @@ -109,6 +107,22 @@ function openZipNew($icvInfo) { } fclose($fpr); } + echo 'Finished copying over zip dirs & files...
'; + copyOverSettings($icvInfo); +} + +function copyOverSettings($icvInfo) { + global $updateDone; + + // Get settings from old version + include(PATH."lib/config___settings.php"); + echo "Getting...".PATH."lib/config___settings.php
"; + var_dump($ICEcoderSettings); + foreach ($ICEcoderSettings as $key => $value) { + echo "Key: $key; Value: $value
\n"; + // Now need to copy the settings over to new config file... + } + echo 'All update tasks completed...
'; $updateDone = true; }