diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index a86f0551bab..02e4d63e5f0 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -951,11 +951,14 @@ class Conf extends stdClass } // conf->liste_limit = constant to limit size of lists + // This value can be overwritten by user choice in main.inc.php $this->liste_limit = getDolGlobalInt('MAIN_SIZE_LISTE_LIMIT', 15); if ((int) $this->liste_limit <= 0) { - // Mode automatic. + // Mode automatic. Similar code than into main.inc.php $this->liste_limit = 15; - if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) { + if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 700) { + $this->liste_limit = 8; + } elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) { $this->liste_limit = 10; } elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] > 1130) { $this->liste_limit = 20; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 24cb4211074..53cdffdb145 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1405,9 +1405,11 @@ if (!defined('NOLOGIN')) { $conf->liste_limit = getDolUserInt('MAIN_SIZE_LISTE_LIMIT'); // Can be 0 } if ((int) $conf->liste_limit <= 0) { - // Mode automatic. + // Mode automatic. Similar code than into conf.class.php $conf->liste_limit = 15; - if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) { + if (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 700) { + $conf->liste_limit = 8; + } elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 910) { $conf->liste_limit = 10; } elseif (!empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] > 1130) { $conf->liste_limit = 20;