Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* 2007-2010 PrestaShop
|
* 2007-2013 PrestaShop
|
||||||
*
|
*
|
||||||
* NOTICE OF LICENSE
|
* NOTICE OF LICENSE
|
||||||
*
|
*
|
||||||
@@ -55,7 +55,7 @@ class WebserviceRequestCore
|
|||||||
* PrestaShop Webservice Documentation URL
|
* PrestaShop Webservice Documentation URL
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $_docUrl = 'http://doc.prestashop.com/display/PS14/Using+the+REST+webservice';
|
protected $_docUrl = 'http://doc.prestashop.com/display/PS15/Using+the+PrestaShop+Web+Service';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set if the authentication key was checked
|
* Set if the authentication key was checked
|
||||||
|
|||||||
@@ -1302,7 +1302,7 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
if ($this->tabAccess['edit'] === '1')
|
if ($this->tabAccess['edit'] === '1')
|
||||||
{
|
{
|
||||||
// Get a good path for module directory
|
// Get a good path for module directory
|
||||||
if ($this->theme_selected == self::DEFAULT_THEME_NAME)
|
if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
|
||||||
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
|
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
|
||||||
else
|
else
|
||||||
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
|
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
|
||||||
@@ -1379,10 +1379,10 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
$arr_mail_content['core_mail'] = Tools::getValue('core_mail');
|
$arr_mail_content['core_mail'] = Tools::getValue('core_mail');
|
||||||
|
|
||||||
// Get path of directory for find a good path of translation file
|
// Get path of directory for find a good path of translation file
|
||||||
if ($this->theme_selected != self::DEFAULT_THEME_NAME)
|
if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
|
||||||
$arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['override']['dir'];
|
|
||||||
else
|
|
||||||
$arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['dir'];
|
$arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['dir'];
|
||||||
|
else
|
||||||
|
$arr_mail_path['core_mail'] = $this->translations_informations[$this->type_selected]['override']['dir'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tools::getValue('module_mail'))
|
if (Tools::getValue('module_mail'))
|
||||||
@@ -1390,10 +1390,10 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
$arr_mail_content['module_mail'] = Tools::getValue('module_mail');
|
$arr_mail_content['module_mail'] = Tools::getValue('module_mail');
|
||||||
|
|
||||||
// Get path of directory for find a good path of translation file
|
// Get path of directory for find a good path of translation file
|
||||||
if ($this->theme_selected != self::DEFAULT_THEME_NAME)
|
if ($this->theme_selected == self::DEFAULT_THEME_NAME && _PS_MODE_DEV_)
|
||||||
$arr_mail_path['module_mail'] = $this->translations_informations['modules']['override']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/';
|
|
||||||
else
|
|
||||||
$arr_mail_path['module_mail'] = $this->translations_informations['modules']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/';
|
$arr_mail_path['module_mail'] = $this->translations_informations['modules']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/';
|
||||||
|
else
|
||||||
|
$arr_mail_path['module_mail'] = $this->translations_informations['modules']['override']['dir'].'{module}/mails/'.$this->lang_selected->iso_code.'/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save each mail content
|
// Save each mail content
|
||||||
@@ -2266,20 +2266,24 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function getModulesHasMails($with_module_name = false)
|
public function getModulesHasMails($with_module_name = false)
|
||||||
{
|
{
|
||||||
if ($this->theme_selected != self::DEFAULT_THEME_NAME)
|
|
||||||
$i18n_dir = $this->translations_informations['modules']['override']['dir'];
|
|
||||||
else
|
|
||||||
$i18n_dir = $this->translations_informations['modules']['dir'];
|
|
||||||
|
|
||||||
$arr_modules = array();
|
$arr_modules = array();
|
||||||
foreach (scandir($i18n_dir) as $module_dir)
|
foreach (scandir($this->translations_informations['modules']['dir']) as $module_dir)
|
||||||
{
|
{
|
||||||
$dir = $i18n_dir.$module_dir.'/';
|
if (!in_array($module_dir, self::$ignore_folder))
|
||||||
if (!in_array($module_dir, self::$ignore_folder) && Tools::file_exists_cache($dir.'mails/'))
|
{
|
||||||
if ($with_module_name)
|
$dir = false;
|
||||||
$arr_modules[$module_dir] = $dir;
|
if (($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_) && Tools::file_exists_cache($this->translations_informations['modules']['override']['dir'].$module_dir.'/mails/'))
|
||||||
else
|
$dir = $this->translations_informations['modules']['override']['dir'].$module_dir.'/';
|
||||||
$arr_modules[$dir] = scandir($dir);
|
elseif (Tools::file_exists_cache($this->translations_informations['modules']['dir'].$module_dir.'/mails/'))
|
||||||
|
$dir = $this->translations_informations['modules']['dir'].$module_dir.'/';
|
||||||
|
if ($dir !== false)
|
||||||
|
{
|
||||||
|
if ($with_module_name)
|
||||||
|
$arr_modules[$module_dir] = $dir;
|
||||||
|
else
|
||||||
|
$arr_modules[$dir] = scandir($dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $arr_modules;
|
return $arr_modules;
|
||||||
}
|
}
|
||||||
@@ -2327,7 +2331,7 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
$subject_mail = $this->getSubjectMail($dir, $file, $subject_mail);
|
$subject_mail = $this->getSubjectMail($dir, $file, $subject_mail);
|
||||||
|
|
||||||
// Get path of directory for find a good path of translation file
|
// Get path of directory for find a good path of translation file
|
||||||
if ($this->theme_selected != self::DEFAULT_THEME_NAME && @filemtime($this->translations_informations[$this->type_selected]['override']['dir']))
|
if (($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_) && @filemtime($this->translations_informations[$this->type_selected]['override']['dir']))
|
||||||
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
|
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
|
||||||
else
|
else
|
||||||
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
|
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
|
||||||
@@ -2519,7 +2523,7 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
public function initFormModules()
|
public function initFormModules()
|
||||||
{
|
{
|
||||||
// Get path of directory for find a good path of translation file
|
// Get path of directory for find a good path of translation file
|
||||||
if ($this->theme_selected != self::DEFAULT_THEME_NAME)
|
if ($this->theme_selected != self::DEFAULT_THEME_NAME || !_PS_MODE_DEV_)
|
||||||
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
|
$i18n_dir = $this->translations_informations[$this->type_selected]['override']['dir'];
|
||||||
else
|
else
|
||||||
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
|
$i18n_dir = $this->translations_informations[$this->type_selected]['dir'];
|
||||||
|
|||||||
Reference in New Issue
Block a user