// Merge -> 8910

This commit is contained in:
rMalie
2011-09-30 08:17:25 +00:00
parent 84e77a9bf4
commit 0c40fb9a06
28 changed files with 2046 additions and 118 deletions
+2 -1
View File
@@ -67,7 +67,8 @@ class UpgraderCore
if (empty($this->link))
$this->checkPSVersion();
if (@copy($this->link, realpath($dest).DIRECTORY_SEPARATOR.$filename))
$destPath = realpath($dest).DIRECTORY_SEPARATOR.$filename;
if (@copy($this->link, $destPath) && md5_file($destPath) == $this->md5 )
return true;
else
return false;
+7 -4
View File
@@ -5,7 +5,7 @@ class Autoupgrade extends Module
function __construct()
{
$this->name = 'autoupgrade';
$this->tab = 'admin';
$this->tab = 'administration';
$this->version = 0.1;
if (!defined('_PS_ADMIN_DIR_'))
@@ -58,10 +58,13 @@ class Autoupgrade extends Module
$res &= @mkdir($autoupgradeDir);
if(file_exists($autoupgradeDir.DIRECTORY_SEPARATOR.'ajax-upgradetab.php'))
$res &= unlink($autoupgradeDir.DIRECTORY_SEPARATOR.'ajax-upgradetab.php');
$path = dirname(__FILE__).'/';
if (!defined('_PS_MODULE_DIR_'))
{
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
}
$res &= copy($path.'ajax-upgradetab.php',$autoupgradeDir . DIRECTORY_SEPARATOR . 'ajax-upgradetab.php');
$res &= copy($path.'logo.gif',_PS_ROOT_DIR_. DIRECTORY_SEPARATOR . 'img/t/AdminSelfUpgrade.gif');
$res &= copy(_PS_MODULE_DIR_.'autoupgrade/ajax-upgradetab.php',$autoupgradeDir . DIRECTORY_SEPARATOR . 'ajax-upgradetab.php');
$res &= copy(_PS_MODULE_DIR_.'autoupgrade/logo.gif',_PS_ROOT_DIR_. DIRECTORY_SEPARATOR . 'img/t/AdminSelfUpgrade.gif');
if (!$res
OR !Tab::getIdFromClassName('AdminSelfUpgrade')
+1 -1
View File
@@ -5,7 +5,7 @@
<version><![CDATA[0.1]]></version>
<description><![CDATA[Provides an automated method to upgrade your shop to the last PrestaShop version]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[admin]]></tab>
<tab><![CDATA[administration]]></tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>