// 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
This commit is contained in:
rMalie
2011-07-27 08:03:00 +00:00
parent c9ad75fe11
commit dd5109b3f5
5 changed files with 5 additions and 77 deletions
-59
View File
@@ -1,59 +0,0 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @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 '<p>'.Tools::historyc_l('Referer is missing', $translations).'</p>';
echo '<p><a href="#" onclick="tb_remove()">'.Tools::historyc_l('close', $translations).'</a></p>';
else:
$referer = Tools::htmlentitiesUTF8(rawurldecode(Tools::getValue('referer')));?>
<h2><?php echo Tools::historyc_l('Confirmation', $translations) ?></h2>
<p>
<a href="#" class="thickbox confirm_yes" title="" onclick="tb_remove(); window.open('<?php echo $referer ?>', '_self')">
<?php echo Tools::historyc_l('Yes', $translations) ?>
</a>
<a href="#" class="confirm_no" onclick="tb_remove()"><?php echo Tools::historyc_l('No', $translations) ?></a>
</p>
<?php endif; //check if referer exists
+1
View File
@@ -42,6 +42,7 @@ class AdminMeta extends AdminTab
'title' => 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(
+2 -2
View File
@@ -2447,11 +2447,11 @@ class AdminProducts extends AdminTab
<input type="hidden" id="virtual_product_filename" name="virtual_product_filename" value="<?php echo $up_filename ?>" />
<?php endif; ?>
</div>
<a id="delete_downloadable_product" style="display:none;" href="confirm.php?height=200&amp;width=300&amp;modal=true&amp;referer=<?php echo rawurlencode($_SERVER['REQUEST_URI'].'&deleteVirtualProduct=true') ?>" class="thickbox red" title="<?php echo $this->l('Delete this file') ?>"><?php echo $this->l('Delete this file') ?></a>
<a id="delete_downloadable_product" style="display:none;" onclick="return confirm('<?php echo addslashes($this->l('Delete this file')) ?>')" href="<?php echo $_SERVER['REQUEST_URI'].'&deleteVirtualProduct=true' ?>" class="red"><?php echo $this->l('Delete this file') ?></a>
<?php else: ?>
<input type="hidden" id="virtual_product_filename" name="virtual_product_filename" value="<?php echo $productDownload->physically_filename ?>" />
<?php echo $this->l('This is the link').':&nbsp;'.$productDownload->getHtmlLink(false, true) ?>
<a href="confirm.php?height=200&amp;width=300&amp;modal=true&amp;referer=<?php echo rawurlencode($_SERVER['REQUEST_URI'].'&deleteVirtualProduct=true') ?>" class="thickbox red" title="<?php echo $this->l('Delete this file') ?>"><?php echo $this->l('Delete this file') ?></a>
<a onclick="return confirm('<?php echo addslashes($this->l('Delete this file')) ?>')" href="<?php echo $_SERVER['REQUEST_URI'].'&deleteVirtualProduct=true' ?>" class="red"><?php echo $this->l('Delete this file') ?></a>
<?php endif; // check if file exists ?>
</p>
<p class="block">
-14
View File
@@ -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
*
+2 -2
View File
@@ -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. */