// small fixes

This commit is contained in:
rGaillard
2012-04-16 09:47:34 +00:00
parent 2461f29b4c
commit 0dbe603cdb
10 changed files with 44 additions and 13 deletions
@@ -480,29 +480,29 @@ class AdminCustomerThreadsControllerCore extends AdminController
if ($thread->status != 'closed')
$actions['closed'] = array(
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=2&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=2&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'name' => $this->l('Mark this message as handled')
);
if ($thread->status != 'pending1')
$actions['pending1'] = array(
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=3&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=3&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'name' => $this->l('Mark this message as "pending 1" (will be answered later)')
);
else
$actions['pending1'] = array(
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'name' => $this->l('Disable pending status')
);
if ($thread->status != 'pending2')
$actions['pending2'] = array(
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=4&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=4&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'name' => $this->l('Mark this message as "pending 2" (will be answered later)')
);
else
$actions['pending2'] = array(
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'href' => self::$currentIndex.'&viewcustomer_thread&setstatus=1&id_customer_thread='.(int)Tools::getValue('id_customer_thread').'&viewmsg&token='.$this->token,
'name' => $this->l('Disable pending status')
);
@@ -91,7 +91,7 @@ class AdminPreferencesControllerCore extends AdminController
);
// No HTTPS activation if you haven't already.
if (!Tools::usingSecureMode())
if (!Tools::usingSecureMode() && !Configuration::get('PS_SSL_ENABLED'))
{
$fields['PS_SSL_ENABLED']['type'] = 'disabled';
$fields['PS_SSL_ENABLED']['disabled'] = '<a href="https://'.Tools::getShopDomainSsl().Tools::safeOutput($_SERVER['REQUEST_URI']).'">'.
+2 -2
View File
@@ -107,8 +107,8 @@ class AdminTaxesControllerCore extends AdminController
$tpl_enable = $this->context->smarty->createTemplate('helpers/list/list_action_enable.tpl');
$tpl_enable->assign(array(
'enabled' => (bool)$value,
'url_enable' => self::$currentIndex.'&'.$this->identifier.'='.$id.'&'.$active.$this->table.
((int)$id_category && (int)$id_product ? '&id_category='.$id_category : '').'&token='.($token != null ? $token : $this->token),
'url_enable' => self::$currentIndex.'&'.$this->identifier.'='.(int)$id.'&'.$active.$this->table.
((int)$id_category && (int)$id_product ? '&id_category='.(int)$id_category : '').'&token='.($token != null ? $token : $this->token),
'confirm' => isset($confirm) ? $confirm : null,
));
@@ -684,7 +684,11 @@ class AdminTranslationsControllerCore extends AdminController
else if (Tools::isSubmit('submitTranslationsMails') || Tools::isSubmit('submitTranslationsMailsAndStay'))
{
if ($this->tabAccess['edit'] === '1' && ($id_lang = Language::getIdByIso(Tools::getValue('lang'))) > 0)
{
if (!Validate::isLanguageIsoCode(Tools::strtolower($id_lang)))
die(Tools::displayError());
$this->submitTranslationsMails($id_lang);
}
else
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
}
@@ -791,7 +795,11 @@ class AdminTranslationsControllerCore extends AdminController
if ($module_name_pipe_pos)
{
$module_name = substr($mail_name, 0, $module_name_pipe_pos);
if (!Validate::isModuleName($module_name))
die(Tools::displayError());
$mail_name = substr($mail_name, $module_name_pipe_pos + 1);
if (!Validate::isTplName($mail_name))
die(Tools::displayError());
}
if ($type_content == 'html')
@@ -939,6 +947,8 @@ class AdminTranslationsControllerCore extends AdminController
public function initFormFront($lang)
{
$missing_translations_front = array();
if (!Validate::isLangIsoCode($lang))
die(Tools::displayError());
$_LANG = $this->fileExists(_PS_THEME_DIR_.'lang', Tools::strtolower($lang).'.php', '_LANG');
/* List templates to parse */
@@ -1026,6 +1036,8 @@ class AdminTranslationsControllerCore extends AdminController
public function initFormBack($lang)
{
if (!Validate::isLangIsoCode($lang))
die(Tools::displayError());
$_LANGADM = $this->fileExists(_PS_TRANSLATIONS_DIR_.$lang, 'admin.php', '_LANGADM');
// count will contain the number of expressions of the page
$count = 0;
@@ -1223,6 +1235,8 @@ class AdminTranslationsControllerCore extends AdminController
public function initFormErrors($lang)
{
if (!Validate::isLangIsoCode($lang))
die(Tools::displayError());
$_ERRORS = $this->fileExists(_PS_TRANSLATIONS_DIR_.$lang, 'errors.php', '_ERRORS');
$count_empty = 0;
@@ -1287,6 +1301,8 @@ class AdminTranslationsControllerCore extends AdminController
public function initFormFields($lang)
{
if (!Validate::isLangIsoCode($lang))
die(Tools::displayError());
$_FIELDS = $this->fileExists(_PS_TRANSLATIONS_DIR_.$lang, 'fields.php', '_FIELDS');
$missing_translations_fields = array();
$str_output = '';