rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit e942ad3e7bbf45b0557fe99563e5c0b81654e8e4
parent aedb79cde034a982d216b9b25c8b33d584b4b2ff
Author: MTRNord <mtrnord1@gmail.com>
Date:   Mon, 22 Dec 2014 11:36:14 +0100

update updater on client and server side change branch to "nightly" to get every day the last git develop build

Diffstat:
Mcore/update/update/update.php | 11+----------
Mthemes/jumbotron/update.php | 4++--
2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/core/update/update/update.php b/core/update/update/update.php @@ -42,11 +42,6 @@ class AutoUpdate { * Current version */ public $currentVersion = 0; - - /* - * Current Branch - */ - public $branch = 'nightly'; /* * Name of the latest version @@ -181,15 +176,11 @@ class AutoUpdate { $latest = 0; $update = ''; foreach ($versions as $key => $version) { - if ($this->branch = $version['branch']){ if ($key > $keyOld) { $keyOld = $key; $latest = $version['version']; $update = $version['url']; } - }else{ - echo "xxxxx"; - } } $this->log('New version found `'.$latest.'`.'); @@ -345,7 +336,7 @@ class AutoUpdate { } $updateFile = $this->tempDir.'/'.$this->latestVersion.'.zip'; - $updateUrl = $this->updateUrl.'/'.$this->branch.'/'.$this->latestVersion.'.zip'; + $updateUrl = $this->updateUrl.'/'.$this->latestVersion.'.zip'; //Download update if (!is_file($updateFile)) { diff --git a/themes/jumbotron/update.php b/themes/jumbotron/update.php @@ -25,11 +25,11 @@ if ($root_3[1] == 'core') { } require($root . '/core/update/update/update.php'); - +$branch = "stable"; $update = new AutoUpdate(true); $update->currentVersion = 1; //Must be an integer - you can't compare strings -$update->branch = 'stable'; $update->updateUrl = 'http://media.nordgedanken.de/rpicms/server'; //Replace with your server update directory +$update->updateIni = 'update.ini.'.$branch; //Check for a new update $latest = $update->checkUpdate();