From dd5109b3f5eb361f66dce82fcb371c1b10512522 Mon Sep 17 00:00:00 2001
From: rMalie
Date: Wed, 27 Jul 2011 08:03:00 +0000
Subject: [PATCH] // Fix adminMeta page + bug #PSFV-39
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7745 b9a71923-0436-4b27-9f14-aed3839534dd
---
admin-dev/confirm.php | 59 --------------------------------
admin-dev/tabs/AdminMeta.php | 1 +
admin-dev/tabs/AdminProducts.php | 4 +--
classes/Tools.php | 14 --------
config/config.inc.php | 4 +--
5 files changed, 5 insertions(+), 77 deletions(-)
delete mode 100644 admin-dev/confirm.php
diff --git a/admin-dev/confirm.php b/admin-dev/confirm.php
deleted file mode 100644
index 709ab99ec..000000000
--- a/admin-dev/confirm.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
-* @copyright 2007-2011 PrestaShop SA
-* @version Release: $Revision: 6844 $
-* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
-* International Registered Trademark & Property of PrestaShop SA
-*/
-
-define('PS_ADMIN_DIR', getcwd());
-
-include(PS_ADMIN_DIR.'/../config/config.inc.php');
-$cookie = new Cookie('psAdmin');
-Tools::setCookieLanguage();
-
-$translations = array(
- 'FR' => array(
- 'Referer is missing' => 'Vous devez indiquer un "referer"',
- 'Confirmation' => 'Confirmation',
- 'Yes' => 'Oui',
- 'No' => 'Non',
- 'close' => 'fermer')
-);
-
-if (!Tools::getValue('referer')):
- echo ''.Tools::historyc_l('Referer is missing', $translations).'
';
- echo ''.Tools::historyc_l('close', $translations).'
';
-else:
- $referer = Tools::htmlentitiesUTF8(rawurldecode(Tools::getValue('referer')));?>
-
-
-
-
-
-
-
-
-
-
-
- array('title' => $this->l('Title'), 'width' => 120),
'url_rewrite' => array('title' => $this->l('Friendly URL'), 'width' => 120)
);
+ $this->_group = 'GROUP BY a.id_meta';
$this->optionTitle = $this->l('URLs Setup');
$this->_fieldsOptions = array(
diff --git a/admin-dev/tabs/AdminProducts.php b/admin-dev/tabs/AdminProducts.php
index 665e7a26a..82edea1db 100644
--- a/admin-dev/tabs/AdminProducts.php
+++ b/admin-dev/tabs/AdminProducts.php
@@ -2447,11 +2447,11 @@ class AdminProducts extends AdminTab
- l('Delete this file') ?>
+ l('Delete this file') ?>
l('This is the link').': '.$productDownload->getHtmlLink(false, true) ?>
- l('Delete this file') ?>
+ l('Delete this file') ?>
diff --git a/classes/Tools.php b/classes/Tools.php
index 59aa218d3..e8adf99fb 100644
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -910,20 +910,6 @@ class ToolsCore
return (int)($row['total']);
}
- /*
- ** Historyc translation function kept for compatibility
- ** Removing soon
- */
- public static function historyc_l($key, $translations)
- {
- if (!$translations OR !is_array($translations))
- die(self::displayError());
- $iso = strtoupper(Language::getIsoById($cookie->id_lang));
- $lang = key_exists($context->language->iso_code, $translations) ? $translations[$context->language->iso_code] : false;
- return (($lang AND is_array($lang) AND key_exists($key, $lang)) ? stripslashes($lang[$key]) : $key);
- }
-
-
/**
* Return the friendly url from the provided string
*
diff --git a/config/config.inc.php b/config/config.inc.php
index c31ceea48..4618143ef 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -120,10 +120,10 @@ if (defined('PS_ADMIN_DIR'))
}
else
{
- if (!Validate::isLoadedObject($language = new Language($cookie->id_lang)))
+ $language = new Language($cookie->id_lang);
+ if (!Validate::isLoadedObject($language))
$language = new Language(Configuration::get('PS_LANG_DEFAULT'));
}
-
Context::getContext()->language = $language;
/* It is not safe to rely on the system's timezone settings, and this would generate a PHP Strict Standards notice. */