';
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index ac7411b49c3..c916710e087 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -76,7 +76,7 @@ $begin=GETPOST('begin');
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="p.lastname";
if ($page < 0) { $page = 0; }
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page;
$langs->load("companies");
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index ef226d35908..22b619c599c 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -40,7 +40,7 @@ $sortfield=GETPOST('sortfield','alpha');
$sortorder=GETPOST('sortorder','alpha');
$page=GETPOST('page','int');
if ($page == -1) { $page = 0 ; }
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
$search_name=GETPOST('search_name');
diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php
index 1ce7c91343e..c59c67fe91c 100644
--- a/htdocs/contrat/services.php
+++ b/htdocs/contrat/services.php
@@ -38,7 +38,7 @@ $sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0 ; }
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
if (! $sortfield) $sortfield="c.rowid";
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 6d8eaf3c495..bcdcdea6147 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1718,13 +1718,13 @@ class Form
foreach ($scrit as $crit)
{
if ($i > 0) $sql.=" AND ";
- $sql.="(p.ref LIKE '".$prefix.$crit."%' OR p.label LIKE '".$prefix.$crit."%'";
- if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.label LIKE '".$prefix.$crit."%'";
+ $sql.="(p.ref LIKE '".$db->escape($prefix.$crit)."%' OR p.label LIKE '".$db->escape($prefix.$crit)."%'";
+ if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.label LIKE '".$db->escape($prefix.$crit)."%'";
$sql.=")";
$i++;
}
if (count($scrit) > 1) $sql.=")";
- if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$prefix.$filterkey."%'";
+ if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$db->escape($prefix.$filterkey)."%'";
$sql.=')';
}
$sql.= $db->order("p.ref");
@@ -2087,7 +2087,7 @@ class Form
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
$sql.= " AND p.tobuy = 1";
- if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
+ if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$this->db->escape($filtertype);
if (! empty($filtre)) $sql.=" ".$filtre;
// Add criteria on ref/label
if ($filterkey != '')
@@ -2101,11 +2101,11 @@ class Form
foreach ($scrit as $crit)
{
if ($i > 0) $sql.=" AND ";
- $sql.="(pfp.ref_fourn LIKE '".$prefix.$crit."%' OR p.ref LIKE '".$prefix.$crit."%' OR p.label LIKE '".$prefix.$crit."%')";
+ $sql.="(pfp.ref_fourn LIKE '".$this->db->escape($prefix.$crit)."%' OR p.ref LIKE '".$this->db->escape($prefix.$crit)."%' OR p.label LIKE '".$this->db->escape($prefix.$crit)."%')";
$i++;
}
if (count($scrit) > 1) $sql.=")";
- if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$prefix.$filterkey."%'";
+ if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
$sql.=')';
}
$sql.= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC";
@@ -2619,7 +2619,7 @@ class Form
/**
* Charge dans cache la liste des types de paiements possibles
*
- * @return int Nb of lines loaded, <0 if KO
+ * @return int Nb of lines loaded, <0 if KO
*/
function load_cache_types_paiements()
{
@@ -2632,9 +2632,9 @@ class Form
$this->cache_types_paiements = array();
- $sql = "SELECT id, code, libelle as label, type";
+ $sql = "SELECT id, code, libelle as label, type, active";
$sql.= " FROM ".MAIN_DB_PREFIX."c_paiement";
- $sql.= " WHERE active > 0";
+ //if ($active >= 0) $sql.= " WHERE active = ".$active;
$resql = $this->db->query($sql);
if ($resql)
@@ -2651,6 +2651,7 @@ class Form
$this->cache_types_paiements[$obj->id]['code'] =$obj->code;
$this->cache_types_paiements[$obj->id]['label']=$label;
$this->cache_types_paiements[$obj->id]['type'] =$obj->type;
+ $this->cache_types_paiements[$obj->id]['active'] =$obj->active;
$i++;
}
@@ -2708,14 +2709,15 @@ class Form
*
* @param string $selected Id du mode de paiement pre-selectionne
* @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz))
+ * @param string $filtertype To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz))
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
* @param int $empty 1=peut etre vide, 0 sinon
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
* @param int $maxlength Max length of label
+ * @param int $active Active or not, -1 = all
* @return void
*/
- function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=0, $noadmininfo=0, $maxlength=0)
+ function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=0, $noadmininfo=0, $maxlength=0, $active=1)
{
global $langs,$user;
@@ -2732,6 +2734,9 @@ class Form
if ($empty) print '';
foreach($this->cache_types_paiements as $id => $arraytypes)
{
+ // If not good status
+ if ($active >= 0 && $arraytypes['active'] != $active) continue;
+
// On passe si on a demande de filtrer sur des modes de paiments particuliers
if (count($filterarray) && ! in_array($arraytypes['type'],$filterarray)) continue;
@@ -3685,9 +3690,10 @@ class Form
* @param int $selected Id mode pre-selectionne
* @param string $htmlname Name of select html field
* @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz))
+ * @param int $active Active or not, -1 = all
* @return void
*/
- function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='')
+ function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1)
{
global $langs;
if ($htmlname != "none")
@@ -3697,7 +3703,7 @@ class Form
print '';
print '
';
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
@@ -3961,9 +3961,12 @@ function get_exdir($num,$level,$alpha,$withoutslash,$object,$modulepart)
else
{
// TODO
- // We will introduce here a common way of forging path for document storage
+ // We will enhance here a common way of forging path for document storage
// Here, object->id, object->ref and object->modulepart are required.
-
+ if (in_array($modulepart, array('thirdparty','contact')))
+ {
+ $path=$object->ref?$object->ref:$object->id;
+ }
}
if (empty($withoutslash) && ! empty($path)) $path.='/';
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index aaa7738a9b1..62a92f4d5ac 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -1008,17 +1008,16 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al
{
foreach($linkedobjects as $linkedobject)
{
+ $reftoshow = $linkedobject["ref_title"].' : '.$linkedobject["ref_value"];
+ if (! empty($linkedobject["date_value"]))
+ {
+ $reftoshow .= ' / '.$linkedobject["date_value"];
+ }
+
$posy+=3;
$pdf->SetXY($posx,$posy);
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->MultiCell($w, $h, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align);
-
- if (! empty($linkedobject["date_title"]) && ! empty($linkedobject["date_value"]))
- {
- $posy+=3;
- $pdf->SetXY($posx,$posy);
- $pdf->MultiCell($w, $h, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align);
- }
+ $pdf->MultiCell($w, $h, $reftoshow, '', $align);
}
}
@@ -1826,10 +1825,11 @@ function pdf_getTotalQty($object,$type,$outputlangs)
/**
* Return linked objects
+ * FIXME This function returns only one link per link type instead of all links. If we fix this, we must also fix function pdf_writeLinkedObjects
*
* @param object $object Object
* @param Translate $outputlangs Object lang for output
- * @return array Linked objects
+ * @return array Linked objects
*/
function pdf_getLinkedObjects($object,$outputlangs)
{
diff --git a/htdocs/core/modules/modSupplierProposal.class.php b/htdocs/core/modules/modSupplierProposal.class.php
index 98320a6f08b..692cf2aefab 100644
--- a/htdocs/core/modules/modSupplierProposal.class.php
+++ b/htdocs/core/modules/modSupplierProposal.class.php
@@ -142,7 +142,7 @@ class modSupplierProposal extends DolibarrModules
$this->menu[$r]=array(
'fk_menu'=>'fk_mainmenu=commercial', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
- 'titre'=>'supplier_proposalMENU_LEFT_TITLE',
+ 'titre'=>'SupplierProposalShort',
'leftmenu'=>'supplier_proposalsubmenu',
'url'=>'/supplier_proposal/index.php',
'langs'=>'supplier_proposal', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@@ -156,7 +156,7 @@ class modSupplierProposal extends DolibarrModules
$this->menu[$r]=array(
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
'type'=>'left',
- 'titre'=>'supplier_proposalMENU_LEFT_TITLE_NEW',
+ 'titre'=>'SupplierProposalNew',
'url'=>'/supplier_proposal/card.php?action=create',
'langs'=>'supplier_proposal',
'enabled'=>'$conf->supplier_proposal->enabled',
@@ -169,7 +169,7 @@ class modSupplierProposal extends DolibarrModules
$this->menu[$r]=array(
'fk_menu'=>'fk_mainmenu=commercial,fk_leftmenu=supplier_proposalsubmenu',
'type'=>'left',
- 'titre'=>'supplier_proposalMENU_LEFT_TITLE_LIST',
+ 'titre'=>'List',
'url'=>'/supplier_proposal/list.php',
'langs'=>'supplier_proposal',
'enabled'=>'$conf->supplier_proposal->enabled',
diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index 9477e91837e..83e1db184a5 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -34,7 +34,7 @@ $langs->load("donations");
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index bee47fe25bd..13760ebf776 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -43,7 +43,7 @@ $optioncss = GETPOST('optioncss','alpha');
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php
index ece9f9260ac..b980199c800 100644
--- a/htdocs/expensereport/index.php
+++ b/htdocs/expensereport/index.php
@@ -48,7 +48,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="d.date_create";
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
/*
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index 408bf91e3df..fe775139362 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -93,7 +93,7 @@ $sortfield = GETPOST("sortfield");
$page = GETPOST("page");
if (!$sortorder) $sortorder="DESC";
if (!$sortfield) $sortfield="d.date_debut";
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
if ($page == -1) {
$page = 0 ;
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 64c51f83675..241b8f522b0 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -44,7 +44,7 @@ $result = restrictedArea($user, 'ficheinter', $fichinterid,'fichinter');
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$page = GETPOST('page','int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php
index 13520b723b5..e6f6b288b14 100644
--- a/htdocs/fourn/contact.php
+++ b/htdocs/fourn/contact.php
@@ -50,7 +50,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="p.name";
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
/*
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 6b69adceb3e..4778aeb48a1 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -61,7 +61,7 @@ $sortorder = GETPOST("sortorder",'alpha');
$sortfield = GETPOST("sortfield",'alpha');
if ($page == -1) { $page = 0 ; }
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 599ce879d8e..c4b2e4c01f6 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -53,7 +53,7 @@ if ($page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="p.rowid";
$optioncss = GETPOST('optioncss','alpha');
@@ -454,7 +454,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (empty($action))
{
if ($page == -1) $page = 0 ;
- $limit = $conf->liste_limit;
+ $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
if (! $sortorder) $sortorder='DESC';
diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php
index f21390776d3..e54f2d3329b 100644
--- a/htdocs/fourn/product/list.php
+++ b/htdocs/fourn/product/list.php
@@ -49,7 +49,7 @@ if ($page < 0) {
$page = 0 ;
}
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
if (! $sortfield) $sortfield = 'p.ref';
diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php
index 002b6e35565..5d29468090e 100644
--- a/htdocs/hrm/admin/admin_establishment.php
+++ b/htdocs/hrm/admin/admin_establishment.php
@@ -61,7 +61,7 @@ if ($page == -1) {
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$form = new Form($db);
$establishmenttmp=new Establishment($db);
diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang
index c90b7abeba2..99a5753a665 100644
--- a/htdocs/langs/en_US/supplier_proposal.lang
+++ b/htdocs/langs/en_US/supplier_proposal.lang
@@ -1,9 +1,8 @@
# Dolibarr language file - Source file is en_US - supplier_proposal
SupplierProposal=Supplier commercial proposals
supplier_proposalDESC=Manage price requests to suppliers
-supplier_proposalMENU_LEFT_TITLE=Supplier proposals
-supplier_proposalMENU_LEFT_TITLE_NEW=New request
-supplier_proposalMENU_LEFT_TITLE_LIST=List
+SupplierProposalShort=Supplier proposals
+SupplierProposalNew=New request
CommRequest=Price request
CommRequests=Price requests
SearchRequest=Find a request
diff --git a/htdocs/langs/vi_VN/main.lang b/htdocs/langs/vi_VN/main.lang
index 0b0bd4299b9..be95acb178b 100644
--- a/htdocs/langs/vi_VN/main.lang
+++ b/htdocs/langs/vi_VN/main.lang
@@ -4,7 +4,7 @@ DIRECTION=ltr
# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader)
# stsongstdlight or cid0cs are for simplified Chinese
# To read Chinese pdf with Linux: sudo apt-get install poppler-data
-FONTFORPDF=helvetica
+FONTFORPDF=DejaVuSans
FONTSIZEFORPDF=10
SeparatorDecimal=.
SeparatorThousand=,
diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php
index e99691d8ff9..f08618e2313 100644
--- a/htdocs/loan/index.php
+++ b/htdocs/loan/index.php
@@ -45,7 +45,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield) $sortfield="l.rowid";
if (! $sortorder) $sortorder="DESC";
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$search_ref=GETPOST('search_ref','int');
$search_label=GETPOST('search_label','alpha');
diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php
index fe73419c98b..d152364929d 100644
--- a/htdocs/opensurvey/list.php
+++ b/htdocs/opensurvey/list.php
@@ -38,7 +38,7 @@ $status=GETPOST('status');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php
index 7dda37b6f2c..0d4cbda9fc2 100644
--- a/htdocs/product/ajax/products.php
+++ b/htdocs/product/ajax/products.php
@@ -169,8 +169,9 @@ if (! empty($action) && $action == 'fetch' && ! empty($id))
$match = preg_grep('/(' . $htmlname . '[0-9]+)/', array_keys($_GET));
sort($match);
- $idprod = (! empty($match [0]) ? $match [0] : '');
+ $idprod = (! empty($match[0]) ? $match[0] : '');
+
if (! GETPOST($htmlname) && ! GETPOST($idprod))
return;
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 9379e6d1f29..948f73b21ef 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -1315,7 +1315,7 @@ else
$picto=($object->type== Product::TYPE_SERVICE?'service':'product');
dol_fiche_head($head, 'card', $titre, 0, $picto);
- dol_banner_tab($object, 'id', '', ($user->societe_id?0:1), 'ref');
+ dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref');
print '
';
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index b68ac04b87d..8c744fbb6d3 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -3119,7 +3119,7 @@ class Product extends CommonObject
global $conf, $langs;
$langs->load('products');
- if (!empty($conf->productbatch->enabled)) $langs->load("productbatch");
+ if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
if ($type == 2)
{
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index 218b7dba066..b8a52024dfc 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -55,7 +55,7 @@ $sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if (! $sortfield) $sortfield="p.ref";
if (! $sortorder) $sortorder="ASC";
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
// Load sale and categ filters
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index 7788f289609..5b81f8c0818 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -58,7 +58,7 @@ $sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if (! $sortfield) $sortfield="p.ref";
if (! $sortorder) $sortorder="ASC";
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
// Load sale and categ filters
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 43c5bc0c184..a7dde67013a 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -43,7 +43,7 @@ if (! $sortfield) $sortfield="e.label";
if (! $sortorder) $sortorder="ASC";
$page = GETPOST("page");
if ($page < 0) $page = 0;
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page;
$year = strftime("%Y",time());
diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php
index ffce2e4db8f..652ec947a37 100644
--- a/htdocs/product/stock/massstockmove.php
+++ b/htdocs/product/stock/massstockmove.php
@@ -63,7 +63,7 @@ if (!$sortfield) {
if (!$sortorder) {
$sortorder = 'ASC';
}
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
$listofdata=array();
diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php
index fbb80551fad..32edd0b4e9d 100644
--- a/htdocs/product/stock/mouvement.php
+++ b/htdocs/product/stock/mouvement.php
@@ -54,7 +54,7 @@ $search_warehouse = trim(GETPOST("search_warehouse"));
$search_inventorycode = trim(GETPOST("search_inventorycode"));
$search_user = trim(GETPOST("search_user"));
$search_batch = trim(GETPOST("search_batch"));
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$page = GETPOST("page",'int');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php
index 5df580877c5..94629a3e821 100644
--- a/htdocs/product/stock/replenish.php
+++ b/htdocs/product/stock/replenish.php
@@ -58,7 +58,7 @@ $sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if ($page == -1) { $page = 0; }
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page ;
if (!$sortfield) {
diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php
index f07a111a0af..be56636ee57 100644
--- a/htdocs/product/stock/valo.php
+++ b/htdocs/product/stock/valo.php
@@ -41,7 +41,7 @@ if (! $sortfield) $sortfield="e.label";
if (! $sortorder) $sortorder="ASC";
$page = $_GET["page"];
if ($page < 0) $page = 0;
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page;
$year = strftime("%Y",time());
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 031239f1a85..2266f012964 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -165,7 +165,7 @@ if (empty($reshook))
else
{
$langs->load("errors");
- setEventMessage($langs->trans($object->error), null, 'errors');
+ setEventMessages($langs->trans($object->error), null, 'errors');
$error++;
}
@@ -204,13 +204,13 @@ if (empty($reshook))
if (empty($ref))
{
$error++;
- //$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet
+ //$_GET["id"]=$_POST["id"]; // We return on the project card
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors');
}
if (empty($_POST["title"]))
{
$error++;
- //$_GET["id"]=$_POST["id"]; // On retourne sur la fiche projet
+ //$_GET["id"]=$_POST["id"]; // We return on the project card
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
}
diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php
index d96d238c41b..4171bbab2e1 100644
--- a/htdocs/public/members/public_list.php
+++ b/htdocs/public/members/public_list.php
@@ -81,7 +81,7 @@ function llxFooterVierge()
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
-$limit = $conf->liste_limit;
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php
index 5af112ebfa0..33bd1ba1373 100644
--- a/htdocs/public/opensurvey/studs.php
+++ b/htdocs/public/opensurvey/studs.php
@@ -122,7 +122,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout
$num_rows = $db->num_rows($resql);
if ($num_rows > 0)
{
- setEventMessage($langs->trans("VoteNameAlreadyExists"),'errors');
+ setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors');
$error++;
}
else
@@ -181,7 +181,7 @@ for ($i=0; $i<$nblignes; $i++)
$testligneamodifier=true;
}
- //test pour voir si une ligne est a modifier
+ //test to see if a line is to be modified
if (isset($_POST['validermodifier'.$i]))
{
$modifier=$i;
@@ -293,11 +293,11 @@ print '
'."\n";
// Show choice titles
if ($object->format=="D")
{
- //affichage des sujets du sondage
+ //display of survey topics
print '
'."\n";
print '
'."\n";
- //affichage des années
+ //display of years
$colspan=1;
$nbofsujet=count($toutsujet);
for ($i=0;$i<$nbofsujet;$i++)
@@ -314,7 +314,7 @@ if ($object->format=="D")
print '
'."\n";
print '
'."\n";
- //affichage des mois
+ //display of months
$colspan=1;
for ($i=0;$i<$nbofsujet;$i++) {
$cur = intval($toutsujet[$i]); // intval() est utiliser pour supprimer le suffixe @* qui déplaît logiquement à strftime()
@@ -337,7 +337,7 @@ if ($object->format=="D")
print '
'."\n";
print '
'."\n";
- //affichage des jours
+ //display of days
$colspan=1;
for ($i=0;$i<$nbofsujet;$i++) {
$cur = intval($toutsujet[$i]);
@@ -356,7 +356,7 @@ if ($object->format=="D")
print '
'."\n";
- //affichage des horaires
+ //Display schedules
if (strpos($object->sujet, '@') !== false) {
print '
'."\n";
print '
'."\n";
@@ -375,7 +375,7 @@ if ($object->format=="D")
}
else
{
- //affichage des sujets du sondage
+ //display of survey topics
print '