Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
commit
e3d9dd89e9
5 files changed
+21
-13
No files matched your search
@@ -198,6 +198,7 @@ class ManufacturerCore extends ObjectModel
|
|||||||
LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`)
|
LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`)
|
||||||
WHERE m.`id_manufacturer` = '.(int)$manufacturer['id_manufacturer'].
|
WHERE m.`id_manufacturer` = '.(int)$manufacturer['id_manufacturer'].
|
||||||
($active ? ' AND product_shop.`active` = 1 ' : '').
|
($active ? ' AND product_shop.`active` = 1 ' : '').
|
||||||
|
' AND p.visibility NOT IN (\'none\')'.
|
||||||
($all_group ? '' : ' AND p.`id_product` IN (
|
($all_group ? '' : ' AND p.`id_product` IN (
|
||||||
SELECT cp.`id_product`
|
SELECT cp.`id_product`
|
||||||
FROM `'._DB_PREFIX_.'category_group` cg
|
FROM `'._DB_PREFIX_.'category_group` cg
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ class HelperListCore extends Helper
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($this->specificConfirmDelete !== false)
|
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));
|
$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,9 @@ class ManufacturerControllerCore extends FrontController
|
|||||||
{
|
{
|
||||||
$data = Manufacturer::getManufacturers(true, $this->context->language->id, true, false, false, false);
|
$data = Manufacturer::getManufacturers(true, $this->context->language->id, true, false, false, false);
|
||||||
$nbProducts = count($data);
|
$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);
|
$this->pagination($nbProducts);
|
||||||
|
|
||||||
foreach ($data as &$item)
|
foreach ($data as &$item)
|
||||||
@@ -129,4 +132,4 @@ class ManufacturerControllerCore extends FrontController
|
|||||||
else
|
else
|
||||||
$this->context->smarty->assign('nbManufacturers', 0);
|
$this->context->smarty->assign('nbManufacturers', 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -372,6 +372,7 @@ class PSCleaner extends Module
|
|||||||
|
|
||||||
// @Todo: Remove attachment files, images...
|
// @Todo: Remove attachment files, images...
|
||||||
Image::clearTmpDir();
|
Image::clearTmpDir();
|
||||||
|
$this->clearAllCaches();
|
||||||
|
|
||||||
return $logs;
|
return $logs;
|
||||||
}
|
}
|
||||||
@@ -559,6 +560,9 @@ class PSCleaner extends Module
|
|||||||
|
|
||||||
protected function clearAllCaches()
|
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();
|
Context::getContext()->smarty->clearAllCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,42 +53,42 @@
|
|||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
{if $p != 1}
|
{if $p != 1}
|
||||||
{assign var='p_previous' value=$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'}">« {l s='Previous'}</a></li>
|
<li id="pagination_previous"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_previous)}">« {l s='Previous'}</a></li>
|
||||||
{else}
|
{else}
|
||||||
<li id="pagination_previous" class="disabled"><span>« {l s='Previous'}</span></li>
|
<li id="pagination_previous" class="disabled"><span>« {l s='Previous'}</span></li>
|
||||||
{/if}
|
{/if}
|
||||||
{if $start==3}
|
{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><a {$no_follow_text} href="{$link->goPage($requestPage, 2)|escape:'html'}">2</a></li>
|
<li><a {$no_follow_text} href="{$link->goPage($requestPage, 2)}">2</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
{if $start==2}
|
{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}
|
||||||
{if $start>3}
|
{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>
|
<li class="truncate">...</li>
|
||||||
{/if}
|
{/if}
|
||||||
{section name=pagination start=$start loop=$stop+1 step=1}
|
{section name=pagination start=$start loop=$stop+1 step=1}
|
||||||
{if $p == $smarty.section.pagination.index}
|
{if $p == $smarty.section.pagination.index}
|
||||||
<li class="current"><span>{$p|escape:'htmlall':'UTF-8'}</span></li>
|
<li class="current"><span>{$p|escape:'htmlall':'UTF-8'}</span></li>
|
||||||
{else}
|
{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}
|
{/if}
|
||||||
{/section}
|
{/section}
|
||||||
{if $pages_nb>$stop+2}
|
{if $pages_nb>$stop+2}
|
||||||
<li class="truncate">...</li>
|
<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}
|
||||||
{if $pages_nb==$stop+1}
|
{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}
|
||||||
{if $pages_nb==$stop+2}
|
{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-1)}">{$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)}">{$pages_nb|intval}</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
{if $pages_nb > 1 AND $p != $pages_nb}
|
{if $pages_nb > 1 AND $p != $pages_nb}
|
||||||
{assign var='p_next' value=$p+1}
|
{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'} »</a></li>
|
<li id="pagination_next"><a {$no_follow_text} href="{$link->goPage($requestPage, $p_next)}">{l s='Next'} »</a></li>
|
||||||
{else}
|
{else}
|
||||||
<li id="pagination_next" class="disabled"><span>{l s='Next'} »</span></li>
|
<li id="pagination_next" class="disabled"><span>{l s='Next'} »</span></li>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in new issue
Block a user