// Merge -> revision 8507

This commit is contained in:
rMalie
2011-09-12 16:17:37 +00:00
parent b404900911
commit a1bdb7b35e
67 changed files with 1938 additions and 1509 deletions
+7
View File
@@ -40,6 +40,7 @@ class UpgraderCore{
public $version_num;
public $link;
public $autoupgrade;
public $autoupgrade_module;
public $changelog;
public $md5;
@@ -95,6 +96,7 @@ class UpgraderCore{
{
if (empty($this->link))
{
$lastCheck = Configuration::get('PS_LAST_VERSION_CHECK');
// if we use the autoupgrade process, we will never refresh it
// except if no check has been done before
@@ -103,12 +105,14 @@ class UpgraderCore{
libxml_set_streams_context(stream_context_create(array('http' => array('timeout' => 3))));
if ($feed = @simplexml_load_file($this->rss_version_link))
{
$this->version_name = (string)$feed->version->name;
$this->version_num = (string)$feed->version->num;
$this->link = (string)$feed->download->link;
$this->md5 = (string)$feed->download->md5;
$this->changelog = (string)$feed->download->changelog;
$this->autoupgrade = (int)$feed->autoupgrade;
$this->autoupgrade_module = (int)$feed->autoupgrade_module;
$this->desc = (string)$feed->desc ;
$configLastVersion = array(
'name' => $this->version_name,
@@ -116,9 +120,11 @@ class UpgraderCore{
'link' => $this->link,
'md5' => $this->md5,
'autoupgrade' => $this->autoupgrade,
'autoupgrade_module' => $this->autoupgrade_module,
'changelog' => $this->changelog,
'desc' => $this->desc
);
Configuration::updateValue('PS_LAST_VERSION',serialize($configLastVersion));
Configuration::updateValue('PS_LAST_VERSION_CHECK',time());
}
@@ -130,6 +136,7 @@ class UpgraderCore{
$this->version_num = $lastVersionCheck['num'];
$this->link = $lastVersionCheck['link'];
$this->autoupgrade = $lastVersionCheck['autoupgrade'];
$this->autoupgrade_module = $lastVersionCheck['autoupgrade_module'];
$this->md5 = $lastVersionCheck['md5'];
$this->desc = $lastVersionCheck['desc'];
$this->changelog = $lastVersionCheck['changelog'];