diff --git a/classes/ProductSale.php b/classes/ProductSale.php index 921f9d7b8..d264a1ef9 100644 --- a/classes/ProductSale.php +++ b/classes/ProductSale.php @@ -71,7 +71,11 @@ class ProductSaleCore $groups = FrontController::getCurrentCustomerGroups(); $sql_groups = (count($groups) ? 'IN ('.implode(',', $groups).')' : '= 1'); $interval = Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20; - + + $prefix = ''; + if ($order_by == 'date_add') + $prefix = 'p.'; + $sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, @@ -104,7 +108,7 @@ class ProductSaleCore WHERE cg.`id_group` '.$sql_groups.' ) GROUP BY product_shop.id_product - ORDER BY `'.pSQL($order_by).'` '.pSQL($order_way).' + ORDER BY '.$prefix.'`'.pSQL($order_by).'` '.pSQL($order_way).' LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); diff --git a/install-dev/classes/session.php b/install-dev/classes/session.php index 3002ca3d6..67bbcf9ab 100644 --- a/install-dev/classes/session.php +++ b/install-dev/classes/session.php @@ -43,13 +43,17 @@ class InstallSession public function __construct() { session_name('install_'.md5(__PS_BASE_URI__)); - if (!session_start() + if (!($session_started = session_start()) || (!isset($_SESSION['session_mode']) && (isset($_POST['submitNext']) || isset($_POST['submitPrevious']) || isset($_POST['language'])))) { InstallSession::$_cookie_mode = true; InstallSession::$_cookie = new Cookie('ps_install', null, time() + 7200, null, true); } - $_SESSION['session_mode'] = 'session'; + if ($session_started && !isset($_SESSION['session_mode'])) + { + $_SESSION['session_mode'] = 'session'; + session_write_close(); + } } public function clean() diff --git a/install-dev/theme/view.css b/install-dev/theme/view.css index 3ecd4f8e8..e9c96d71f 100644 --- a/install-dev/theme/view.css +++ b/install-dev/theme/view.css @@ -43,12 +43,11 @@ a {cursor:pointer;} width:990px; background :#fff; } - #header { - padding:6px 16px 16px 16px; - height:68px;/* 90 */ - background:#394049; - } - +#header { + padding:6px 16px 16px 16px; + height:50px; + background:#394049; +} #loaderSpace{ display:none; z-index: 100; @@ -77,7 +76,7 @@ div#leftpannel{ div#sheets { float:left; margin-top:65px; - min-height:400px; + min-height:360px; width:700px; background-color:#fff; } @@ -93,7 +92,7 @@ div#leftpannel{ div#buttons{ clear:both; margin:0 0 0 295px; - height:70px; + height:60px; width:650px; } * html div#buttons { @@ -407,7 +406,7 @@ ul#footer a:link, ul#footer a:active, ul#footer a:visited { } .sheet .contentTitle { position:absolute; - top:90px; + top:72px; left:0; padding:15px 25px 10px 38px; height:28px;/* 53 */ diff --git a/install-dev/theme/views/header.phtml b/install-dev/theme/views/header.phtml index 43119205f..b80b0d469 100644 --- a/install-dev/theme/views/header.phtml +++ b/install-dev/theme/views/header.phtml @@ -39,11 +39,13 @@