// Merge -> revision 9221

This commit is contained in:
rMalie
2011-10-11 12:45:12 +00:00
parent b0cc80ad01
commit eeb5b16112
77 changed files with 1987 additions and 815 deletions
+13 -4
View File
@@ -31,9 +31,7 @@ class UpgraderCore
public $rss_version_link = 'http://www.prestashop.com/xml/upgrader.xml';
public $rss_md5file_link_dir = 'http://www.prestashop.com/xml/md5/';
/**
* link contains hte url where to download the file
*
* @var string
* @var boolean contains true if last version is not installed
*/
private $need_upgrade = false;
private $changed_files = array();
@@ -41,6 +39,9 @@ class UpgraderCore
public $version_name;
public $version_num;
/**
* @var string contains hte url where to download the file
*/
public $link;
public $autoupgrade;
public $autoupgrade_module;
@@ -68,7 +69,7 @@ class UpgraderCore
$this->checkPSVersion();
$destPath = realpath($dest).DIRECTORY_SEPARATOR.$filename;
if (@copy($this->link, $destPath) && md5_file($destPath) == $this->md5 )
if (@copy($this->link, $destPath))
return true;
else
return false;
@@ -131,13 +132,21 @@ class UpgraderCore
else
{
$last_version_check = @unserialize(Configuration::get('PS_LAST_VERSION'));
if (isset($last_version_check['name']))
$this->version_name = $last_version_check['name'];
if (isset($last_version_check['num']))
$this->version_num = $last_version_check['num'];
if (isset($last_version_check['link']))
$this->link = $last_version_check['link'];
if (isset($last_version_check['autoupgrade']))
$this->autoupgrade = $last_version_check['autoupgrade'];
if (isset($last_version_check['autoupgrade_module']))
$this->autoupgrade_module = $last_version_check['autoupgrade_module'];
if (isset($last_version_check['md5']))
$this->md5 = $last_version_check['md5'];
if (isset($last_version_check['desc']))
$this->desc = $last_version_check['desc'];
if (isset($last_version_check['changelog']))
$this->changelog = $last_version_check['changelog'];
}
}