Bugfix
This commit is contained in:
parent
5c88262985
commit
c2d4c73b65
@ -570,7 +570,7 @@ if ($_GET["id"] > 0)
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
||||
if ($objp->description) print nl2br($objp->description);
|
||||
if ($objp->description) print '<br>'.nl2br($objp->description);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -511,7 +511,7 @@ else
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
||||
if ($objp->description) print nl2br($objp->description);
|
||||
if ($objp->description) print '<br>'.nl2br($objp->description);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -1770,7 +1770,7 @@ class Form
|
||||
if ($selected)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT ."/comm/adresse_livraison.class.php");
|
||||
$livraison=new Livraison($this->db);
|
||||
$livraison=new AdresseLivraison($this->db);
|
||||
$livraison->fetch_adresse($selected);
|
||||
print '<a href=/comm/adresse_livraison.php?socid='.$livraison->socid.'&idl='.$livraison->idl.'&action=edit&origin='.$origin.'&originid='.$originid.'>'.$livraison->label.'</a>';
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ function propale_pdf_create($db, $id, $modele='', $outputlangs='')
|
||||
// Charge le modele
|
||||
if ($modelisok)
|
||||
{
|
||||
$classname = "pdf_expedition_".$modele;
|
||||
$classname = "pdf_propale_".$modele;
|
||||
require_once($dir.$file);
|
||||
|
||||
$obj = new $classname($db);
|
||||
|
||||
@ -484,7 +484,7 @@ else
|
||||
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
||||
if ($objp->description) print nl2br($objp->description);
|
||||
if ($objp->description) print '<br>'.nl2br($objp->description);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -317,11 +317,20 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
{
|
||||
if ($conf->global->LDAP_SERVER_HOST && $conf->global->LDAP_ADMIN_DN && $conf->global->LDAP_ADMIN_PASS)
|
||||
{
|
||||
$name = $conf->global->LDAP_FIELD_NAME;
|
||||
$firstname = $conf->global->LDAP_FIELD_FIRSTNAME;
|
||||
$mail = $conf->global->LDAP_FIELD_MAIL;
|
||||
$phone = $conf->global->LDAP_FIELD_PHONE;
|
||||
$fax = $conf->global->LDAP_FIELD_FAX;
|
||||
$mobile = $conf->global->LDAP_FIELD_MOBILE;
|
||||
$login = $conf->global->LDAP_FIELD_LOGIN_SAMBA;
|
||||
$SID = "objectsid";
|
||||
|
||||
$ldap = new AuthLdap();
|
||||
|
||||
if ($ldap->connect())
|
||||
{
|
||||
$justthese = array( "sn", "givenname", "samaccountname");
|
||||
$justthese = array( $name, $firstname, $login);
|
||||
$ldapusers = $ldap->getUsers('*', $justthese);
|
||||
|
||||
if ($ldapusers)
|
||||
@ -330,8 +339,8 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
|
||||
foreach ($ldapusers as $key => $ldapuser)
|
||||
{
|
||||
if($ldapuser["sn"] != "")
|
||||
$liste[$ldapuser["samaccountname"]] = utf8_decode($ldapuser["sn"])." ".utf8_decode($ldapuser["givenname"]);
|
||||
if($ldapuser[$name] != "")
|
||||
$liste[$ldapuser[$login]] = utf8_decode($ldapuser[$name])." ".utf8_decode($ldapuser[$firstname]);
|
||||
}
|
||||
|
||||
print '<form name="add_user_ldap" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
@ -344,17 +353,15 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
|
||||
if ($action == 'adduserldap')
|
||||
{
|
||||
|
||||
|
||||
$selecteduser = $_POST['users'];
|
||||
$justthese = array( "samaccountname",
|
||||
"sn",
|
||||
"givenname",
|
||||
"mail",
|
||||
"telephonenumber",
|
||||
"facsimiletelephonenumber",
|
||||
"mobile",
|
||||
"objectsid");
|
||||
$selecteduser = $_POST['users'];
|
||||
$justthese = array( $login,
|
||||
$name,
|
||||
$firstname,
|
||||
$mail,
|
||||
$phone,
|
||||
$fax,
|
||||
$mobile,
|
||||
$SID);
|
||||
|
||||
$selectedUser = $ldap->getUsers($selecteduser, $justthese);
|
||||
|
||||
@ -362,14 +369,14 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
{
|
||||
foreach ($selectedUser as $key => $attribute)
|
||||
{
|
||||
$ldap_nom = utf8_decode($attribute["sn"]?$attribute["sn"]:'');
|
||||
$ldap_prenom = utf8_decode($attribute["givenname"]?$attribute["givenname"]:'');
|
||||
$ldap_login = utf8_decode($attribute["samaccountname"]?$attribute["samaccountname"]:'');
|
||||
$ldap_phone = utf8_decode($attribute["telephonenumber"]?$attribute["telephonenumber"]:'');
|
||||
$ldap_fax = utf8_decode($attribute["facsimiletelephonenumber"]?$attribute["facsimiletelephonenumber"]:'');
|
||||
$ldap_mobile = utf8_decode($attribute["mobile"]?$attribute["mobile"]:'');
|
||||
$ldap_mail = utf8_decode($attribute["mail"]?$attribute["mail"]:'');
|
||||
$ldap_SID = bin2hex($attribute["objectsid"]);
|
||||
$ldap_nom = utf8_decode($attribute[$name]?$attribute[$name]:'');
|
||||
$ldap_prenom = utf8_decode($attribute[$firstname]?$attribute[$firstname]:'');
|
||||
$ldap_login = utf8_decode($attribute[$login]?$attribute[$login]:'');
|
||||
$ldap_phone = utf8_decode($attribute[$phone]?$attribute[$phone]:'');
|
||||
$ldap_fax = utf8_decode($attribute[$fax]?$attribute[$fax]:'');
|
||||
$ldap_mobile = utf8_decode($attribute[$mobile]?$attribute[$mobile]:'');
|
||||
$ldap_mail = utf8_decode($attribute[$mail]?$attribute[$mail]:'');
|
||||
$ldap_SID = bin2hex($attribute[$SID]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user