Fix PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS option not correctly

supported.
Fix: No limit on ldap search on dolibarr side.
This commit is contained in:
Laurent Destailleur 2015-02-06 16:33:33 +01:00
parent 4477a712d6
commit 35129f2192
2 changed files with 9 additions and 5 deletions

View File

@ -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")
{

View File

@ -1270,14 +1270,14 @@ if ($action == 'create')
print '<tr><td class="fieldrequired">'.$langs->trans('Supplier').'</td>';
print '<td>';
if ($_REQUEST['socid'] > 0)
if (GETPOST('socid') > 0)
{
print $societe->getNomUrl(1);
print '<input type="hidden" name="socid" value="'.$_GET['socid'].'">';
print '<input type="hidden" name="socid" value="'.GETPOST('socid','int').'">';
}
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 '</td></tr>';
@ -1392,12 +1392,13 @@ if ($action == 'create')
print '</td></tr>';
// Project
if (! empty($conf->projet->enabled)) {
if (! empty($conf->projet->enabled))
{
$formproject = new FormProjets($db);
$langs->load('projects');
print '<tr><td>' . $langs->trans('Project') . '</td><td colspan="2">';
$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 '</td></tr>';
}