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

This commit is contained in:
gRoussac
2013-07-18 18:18:12 +02:00
5 changed files with 21 additions and 13 deletions
+1
View File
@@ -198,6 +198,7 @@ class ManufacturerCore extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`)
WHERE m.`id_manufacturer` = '.(int)$manufacturer['id_manufacturer'].
($active ? ' AND product_shop.`active` = 1 ' : '').
' AND p.visibility NOT IN (\'none\')'.
($all_group ? '' : ' AND p.`id_product` IN (
SELECT cp.`id_product`
FROM `'._DB_PREFIX_.'category_group` cg
+1 -1
View File
@@ -456,7 +456,7 @@ class HelperListCore extends Helper
);
if ($this->specificConfirmDelete !== false)
$data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : self::$cache_lang['DeleteItem'].$name;
$data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : addcslashes(Tools::htmlentitiesDecodeUTF8(self::$cache_lang['DeleteItem'].$name), '\'');
$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
+4 -1
View File
@@ -113,6 +113,9 @@ class ManufacturerControllerCore extends FrontController
{
$data = Manufacturer::getManufacturers(true, $this->context->language->id, true, false, false, false);
$nbProducts = count($data);
$this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE'))));
$this->p = abs((int)(Tools::getValue('p', 1)));
$data = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, $this->n, false);
$this->pagination($nbProducts);
foreach ($data as &$item)
@@ -129,4 +132,4 @@ class ManufacturerControllerCore extends FrontController
else
$this->context->smarty->assign('nbManufacturers', 0);
}
}
}
+4
View File
@@ -372,6 +372,7 @@ class PSCleaner extends Module
// @Todo: Remove attachment files, images...
Image::clearTmpDir();
$this->clearAllCaches();
return $logs;
}
@@ -559,6 +560,9 @@ class PSCleaner extends Module
protected function clearAllCaches()
{
$index = file_get_contents(_PS_TMP_IMG_DIR_.'index.php');
Tools::deleteDirectory(_PS_TMP_IMG_DIR_, false);
file_put_contents(_PS_TMP_IMG_DIR_.'index.php', $index);
Context::getContext()->smarty->clearAllCache();
}
}
+11 -11
View File
@@ -53,42 +53,42 @@
<ul class="pagination">
{if $p != 1}
{assign var='p_previous' value=$p-1}
<li id="pagination_previous"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_previous)|escape:'html'}">&laquo;&nbsp;{l s='Previous'}</a></li>
<li id="pagination_previous"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_previous)}">&laquo;&nbsp;{l s='Previous'}</a></li>
{else}
<li id="pagination_previous" class="disabled"><span>&laquo;&nbsp;{l s='Previous'}</span></li>
{/if}
{if $start==3}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)|escape:'html'}">1</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 2)|escape:'html'}">2</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)}">1</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 2)}">2</a></li>
{/if}
{if $start==2}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)|escape:'html'}">1</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)}">1</a></li>
{/if}
{if $start>3}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)|escape:'html'}">1</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 1)}">1</a></li>
<li class="truncate">...</li>
{/if}
{section name=pagination start=$start loop=$stop+1 step=1}
{if $p == $smarty.section.pagination.index}
<li class="current"><span>{$p|escape:'htmlall':'UTF-8'}</span></li>
{else}
<li><a {$no_follow_text} href="{$link->goPage($requestPage, $smarty.section.pagination.index)|escape:'html'}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
<li><a {$no_follow_text} href="{$link->goPage($requestPage, $smarty.section.pagination.index)}">{$smarty.section.pagination.index|escape:'htmlall':'UTF-8'}</a></li>
{/if}
{/section}
{if $pages_nb>$stop+2}
<li class="truncate">...</li>
<li><a href="{$link->goPage($requestPage, $pages_nb)|escape:'html'}">{$pages_nb|intval}</a></li>
<li><a href="{$link->goPage($requestPage, $pages_nb)}">{$pages_nb|intval}</a></li>
{/if}
{if $pages_nb==$stop+1}
<li><a href="{$link->goPage($requestPage, $pages_nb)|escape:'html'}">{$pages_nb|intval}</a></li>
<li><a href="{$link->goPage($requestPage, $pages_nb)}">{$pages_nb|intval}</a></li>
{/if}
{if $pages_nb==$stop+2}
<li><a href="{$link->goPage($requestPage, $pages_nb-1)|escape:'html'}">{$pages_nb-1|intval}</a></li>
<li><a href="{$link->goPage($requestPage, $pages_nb)|escape:'html'}">{$pages_nb|intval}</a></li>
<li><a href="{$link->goPage($requestPage, $pages_nb-1)}">{$pages_nb-1|intval}</a></li>
<li><a href="{$link->goPage($requestPage, $pages_nb)}">{$pages_nb|intval}</a></li>
{/if}
{if $pages_nb > 1 AND $p != $pages_nb}
{assign var='p_next' value=$p+1}
<li id="pagination_next"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_next)|escape:'html'}">{l s='Next'}&nbsp;&raquo;</a></li>
<li id="pagination_next"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_next)}">{l s='Next'}&nbsp;&raquo;</a></li>
{else}
<li id="pagination_next" class="disabled"><span>{l s='Next'}&nbsp;&raquo;</span></li>
{/if}