Fix: Si l'email n'est pas renseign, il ne faut pas faire le test de sa validit.
This commit is contained in:
parent
c7c26a7240
commit
d13bc4e5e2
@ -21,8 +21,20 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\file htdocs/contact/index.php
|
||||||
|
\ingroup societe
|
||||||
|
\brief Page liste des contacts
|
||||||
|
\version $Revision$
|
||||||
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sécurité accés client
|
* Sécurité accés client
|
||||||
*/
|
*/
|
||||||
@ -138,23 +150,23 @@ if ($result)
|
|||||||
}
|
}
|
||||||
print '<p><table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
print '<p><table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
print '<tr class="liste_titre"><td>';
|
print '<tr class="liste_titre"><td>';
|
||||||
print_liste_field_titre("Nom","index.php","lower(p.name)", $begin);
|
print_liste_field_titre($langs->trans("Lastname"),"index.php","lower(p.name)", $begin);
|
||||||
print "</td><td>";
|
print "</td><td>";
|
||||||
print_liste_field_titre("Prénom","index.php","lower(p.firstname)", $begin);
|
print_liste_field_titre($langs->trans("Firstname"),"index.php","lower(p.firstname)", $begin);
|
||||||
print "</td><td>";
|
print "</td><td>";
|
||||||
print_liste_field_titre("Société","index.php","lower(s.nom)", $begin);
|
print_liste_field_titre($langs->trans("Company"),"index.php","lower(s.nom)", $begin);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td>Téléphone</td>';
|
print '<td>'.$langs->trans("Phone").'</td>';
|
||||||
|
|
||||||
if ($_GET["view"] == 'phone')
|
if ($_GET["view"] == 'phone')
|
||||||
{
|
{
|
||||||
print '<td>Portable</td>';
|
print '<td>'.$langs->trans("Mobile").'</td>';
|
||||||
print '<td>Fax</td>';
|
print '<td>'.$langs->trans("Fax").'</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td>email</td>';
|
print '<td>'.$langs->trans("EMail").'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -191,11 +203,17 @@ if ($result)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td><a href="mailto:'.$obj->email.'">'.$obj->email.'</a> ';
|
print '<td>';
|
||||||
if (!valid_email($obj->email))
|
if (! $obj->email) {
|
||||||
{
|
print ' ';
|
||||||
print "Email Invalide !";
|
}
|
||||||
}
|
elseif (! ValidEmail($obj->email))
|
||||||
|
{
|
||||||
|
print "Email Invalide !";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>';
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user