mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
extract up to 3 names from an add_email call
This commit is contained in:
parent
1e7fc18384
commit
fb10b7610e
@ -42,8 +42,20 @@
|
|||||||
if ($AddVcard){
|
if ($AddVcard){
|
||||||
Header("Location: " . $phpgw->link("/addressbook/vcardin.php"));
|
Header("Location: " . $phpgw->link("/addressbook/vcardin.php"));
|
||||||
} else if ($add_email) {
|
} else if ($add_email) {
|
||||||
list($fields["n_given"],$fields["n_family"]) = explode(" ", $name);
|
$named = explode(" ", $name);
|
||||||
$fields["email"] = $add_email;
|
for ($i=count($named);$i>=0;$i--) { $names[$i] = $named[$i]; }
|
||||||
|
if ($names[2])
|
||||||
|
{
|
||||||
|
$fields["n_given"] = $names[0];
|
||||||
|
$fields["n_middle"] = $names[1];
|
||||||
|
$fields["n_family"] = $names[2];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$fields["n_given"] = $names[0];
|
||||||
|
$fields["n_family"] = $names[1];
|
||||||
|
}
|
||||||
|
$fields["email"] = $add_email;
|
||||||
addressbook_form("","add.php","Add",$fields,'',$cat_id);
|
addressbook_form("","add.php","Add",$fields,'',$cat_id);
|
||||||
} else if (! $submit && ! $add_email) {
|
} else if (! $submit && ! $add_email) {
|
||||||
// Default
|
// Default
|
||||||
|
Loading…
Reference in New Issue
Block a user