diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 95436a51e29..dc844ee3f02 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -176,7 +176,10 @@ class Ldap if (is_resource($this->connection)) { + // Execute the ldap_set_option here (after connect and before bind) $this->setVersion(); + ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. + if ($this->serverType == "activedirectory") { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f3e752ed9d4..26aeffad655 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1270,14 +1270,14 @@ if ($action == 'create') print ''.$langs->trans('Supplier').''; print ''; - if ($_REQUEST['socid'] > 0) + if (GETPOST('socid') > 0) { print $societe->getNomUrl(1); - print ''; + print ''; } else { - print $form->select_company((empty($_GET['socid'])?'':$_GET['socid']),'socid','s.fournisseur = 1',1); + print $form->select_company(GETPOST('socid','int'),'socid','s.fournisseur = 1',1); } print ''; @@ -1392,12 +1392,13 @@ if ($action == 'create') print ''; // Project - if (! empty($conf->projet->enabled)) { + if (! empty($conf->projet->enabled)) + { $formproject = new FormProjets($db); $langs->load('projects'); print '' . $langs->trans('Project') . ''; - $formproject->select_projects($soc->id, $projectid, 'projectid'); + $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$soc->id:-1), $projectid, 'projectid'); print ''; }