Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2017-01-27 00:53:04 +01:00
commit 14c31b451c
2 changed files with 17 additions and 7 deletions

View File

@ -1923,10 +1923,6 @@ function getElementProperties($element_type)
$subelement = $regs[2];
}
$classfile = strtolower($subelement);
$classname = ucfirst($subelement);
$classpath = $module.'/class';
// For compat
if($element_type == "action") {
$classpath = 'comm/action/class';
@ -1991,8 +1987,22 @@ function getElementProperties($element_type)
$module='propal';
$subelement='propaleligne';
}
$classfile = strtolower($subelement);
$classname = ucfirst($subelement);
if ($element_type == 'order_supplier') {
$classpath = 'fourn/class';
$module='fournisseur';
$subelement='commandefournisseur';
$classfile='fournisseur.commande';
}
if ($element_type == 'invoice_supplier') {
$classpath = 'fourn/class';
$module='fournisseur';
$subelement='facturefournisseur';
$classfile='fournisseur.facture';
}
if (!isset($classfile)) $classfile = strtolower($subelement);
if (!isset($classname)) $classname = ucfirst($subelement);
if (!isset($classpath)) $classpath = $module.'/class';
$element_properties = array(
'module' => $module,

View File

@ -65,7 +65,7 @@ $optioncss = GETPOST('optioncss','alpha');
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
$page = (GETPOST("page",'int')?GETPOST("page", 'int'):0);
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;