[-] FO : #PSFV-553 - Fix bugs with pager and ordering with some controllers

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13642 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-02-27 16:34:32 +00:00
parent 17aca59d9f
commit 9b0b2c4aa3
3 changed files with 29 additions and 16 deletions
+13 -5
View File
@@ -416,14 +416,22 @@ class LinkCore
public function getPaginationLink($type, $id_object, $nb = false, $sort = false, $pagination = false, $array = false)
{
// If no parameter $type, try to get it by using the controller name
if (!$type && !$id_object)
{
$method_name = 'get'.Dispatcher::getInstance()->getController().'Link';
if (method_exists($this, $method_name) && isset($_GET['id_'.Dispatcher::getInstance()->getController()]))
{
$type = Dispatcher::getInstance()->getController();
$id_object = $_GET['id_'.Dispatcher::getInstance()->getController()];
}
}
if ($type && $id_object)
$url = $this->{'get'.$type.'Link'}($id_object, null);
else
{
$url = $this->url;
if (Configuration::get('PS_REWRITING_SETTINGS'))
$url = $this->getPageLink(basename($url));
}
$url = $this->getPageLink(Context::getContext()->controller->php_self);
$vars = (!$array) ? '' : array();
$vars_nb = array('n', 'search_query');
$vars_sort = array('orderby', 'orderway');
+2 -1
View File
@@ -320,7 +320,8 @@ class FrontControllerCore extends Controller
'vat_management' => (int)Configuration::get('VATNUMBER_MANAGEMENT'),
'opc' => (bool)Configuration::get('PS_ORDER_PROCESS_TYPE'),
'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE') || !(bool)Group::getCurrent()->show_prices,
'b2b_enable' => (bool)Configuration::get('PS_B2B_ENABLE')
'b2b_enable' => (bool)Configuration::get('PS_B2B_ENABLE'),
'request' => $link->getPaginationLink(false, false, false, true)
));
// Deprecated