Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
gRoussac
2013-07-30 19:19:32 +02:00
4 changed files with 18 additions and 21 deletions
+4 -5
View File
@@ -313,11 +313,10 @@ class AddressCore extends ObjectModel
{
$key = 'address_exists_'.(int)$id_address;
if (!Cache::isStored($key))
Cache::store(
$key, Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT `id_address`
FROM '._DB_PREFIX_.'address a
WHERE a.`id_address` = '.(int)$id_address));
{
$id_address = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT `id_address` FROM '._DB_PREFIX_.'address a WHERE a.`id_address` = '.(int)$id_address);
Cache::store($key, (bool)$id_address);
}
return Cache::retrieve($key);
}
+3 -3
View File
@@ -91,10 +91,10 @@ class LinkCore
if (!$id_lang)
$id_lang = Context::getContext()->language->id;
if ($id_shop === null)
$shop = Context::getContext()->shop;
else
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && $id_shop !== null)
$shop = new Shop($id_shop);
else
$shop = Context::getContext()->shop;
$url = 'http://'.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang);
+10 -12
View File
@@ -187,18 +187,16 @@ class ShopCore extends ObjectModel
public function setUrl()
{
$sql = 'SELECT su.physical_uri, su.virtual_uri,
su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
FROM '._DB_PREFIX_.'shop s
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
WHERE s.id_shop = '.(int)$this->id.'
AND s.active = 1
AND s.deleted = 0
AND su.main = 1';
if (!$row = Db::getInstance()->getRow($sql))
return;
$row = Db::getInstance()->getRow('
SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
FROM '._DB_PREFIX_.'shop s
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
WHERE s.id_shop = '.(int)$this->id.'
AND s.active = 1 AND s.deleted = 0 AND su.main = 1');
if (!$row)
return false;
$this->theme_id = $row['id_theme'];
$this->theme_name = $row['name'];
+1 -1
View File
@@ -688,7 +688,7 @@ class AdminModulesControllerCore extends AdminController
$backlink = self::$currentIndex.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name;
$hooklink = 'index.php?tab=AdminModulesPositions&token='.Tools::getAdminTokenLite('AdminModulesPositions').'&show_modules='.(int)$module->id;
$tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&type=modules&lang=';
$tradlink = 'index.php?tab=AdminTranslations&token='.Tools::getAdminTokenLite('AdminTranslations').'&module='.$module->name.'&type=modules&lang=';
$toolbar = '<table class="table" cellpadding="0" cellspacing="0" style="margin:auto;text-align:center"><tr>
<th>'.$this->l('Module').' <span style="color: green;">'.$module->name.'</span></th>