Change fieldnames to lowercase

This commit is contained in:
Miles Lott 2001-02-04 12:55:22 +00:00
parent cd7df86ee8
commit 9fb0322fea
3 changed files with 71 additions and 60 deletions

View File

@ -49,29 +49,39 @@
$url = ""; $url = "";
} }
$fields["ORG_Name"] = $company; $fields["org_name"] = $company;
$fields["N_Given"] = $firstname; $fields["org_unit"] = $department;
$fields["N_Family"] = $lastname; $fields["n_given"] = $firstname;
$fields["D_EMAIL"] = $email; $fields["n_family"] = $lastname;
$fields["D_EMAILTYPE"] = $email_type; $fields["n_middle"] = $middle;
$fields["TITLE"] = $title; $fields["n_prefix"] = $prefix;
$fields["A_TEL"] = $wphone; $fields["n_suffix"] = $suffix;
$fields["B_TEL"] = $hphone; if ($prefix) { $pspc = " "; }
$fields["C_TEL"] = $fax; if ($middle) { $mspc = " "; }
if ($suffix) { $sspc = " "; }
$fields["fn"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix;
$fields["d_email"] = $email;
$fields["d_emailtype"] = $email_type;
$fields["title"] = $title;
$fields["a_tel"] = $wphone;
$fields["b_tel"] = $hphone;
$fields["c_tel"] = $fax;
$fields["pager"] = $pager; $fields["pager"] = $pager;
$fields["mphone"] = $mphone; $fields["mphone"] = $mphone;
$fields["ophone"] = $ophone; $fields["ophone"] = $ophone;
$fields["ADR_Street"] = $street; $fields["adr_street"] = $street;
$fields["address2"] = $address2; $fields["address2"] = $address2;
$fields["ADR_Locality"] = $city; $fields["adr_locality"] = $city;
$fields["ADR_Region"] = $state; $fields["adr_region"] = $state;
$fields["ADR_PostalCode"] = $zip; $fields["adr_postalcode"] = $zip;
$fields["ADR_Country"] = $country; $fields["adr_Countryname"] = $country;
$fields["tz"] = $timezone;
$fields["bday"] = $bday; $fields["bday"] = $bday;
$fields["url"] = $url; $fields["url"] = $url;
$fields["notes"] = $notes; $fields["notes"] = $notes;
$fields["access"] = $access;
$this->add($phpgw_info["user"]["account_id"],$access,$fields); $this->add($phpgw_info["user"]["account_id"],$fields);
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/",
"cd=14")); "cd=14"));

View File

@ -57,36 +57,37 @@
$access = $phpgw->accounts->array_to_string($access,$n_groups); $access = $phpgw->accounts->array_to_string($access,$n_groups);
} }
$fields["ORG_Name"] = $company; $fields["org_name"] = $company;
$fields["ORG_Unit"] = $department; $fields["org_unit"] = $department;
$fields["N_Given"] = $firstname; $fields["n_given"] = $firstname;
$fields["N_Family"] = $lastname; $fields["n_family"] = $lastname;
$fields["N_Middle"] = $middle; $fields["n_middle"] = $middle;
$fields["N_Prefix"] = $prefix; $fields["n_prefix"] = $prefix;
$fields["N_Suffix"] = $suffix; $fields["n_suffix"] = $suffix;
if ($prefix) { $pspc = " "; } if ($prefix) { $pspc = " "; }
if ($middle) { $mspc = " "; } if ($middle) { $mspc = " "; }
if ($suffix) { $sspc = " "; } if ($suffix) { $sspc = " "; }
$fields["FN"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix; $fields["fn"] = $prefix . $pspc . $firstname . $mspc . $middle . $mspc . $lastname . $sspc . $suffix;
$fields["D_EMAIL"] = $email; $fields["d_email"] = $email;
$fields["D_EMAILTYPE"] = $email_type; $fields["d_emailtype"] = $email_type;
$fields["TITLE"] = $title; $fields["title"] = $title;
$fields["A_TEL"] = $wphone; $fields["a_tel"] = $wphone;
$fields["B_TEL"] = $hphone; $fields["b_tel"] = $hphone;
$fields["C_TEL"] = $fax; $fields["c_tel"] = $fax;
$fields["pager"] = $pager; $fields["pager"] = $pager;
$fields["mphone"] = $mphone; $fields["mphone"] = $mphone;
$fields["ophone"] = $ophone; $fields["ophone"] = $ophone;
$fields["ADR_Street"] = $street; $fields["adr_street"] = $street;
$fields["address2"] = $address2; $fields["address2"] = $address2;
$fields["ADR_Locality"] = $city; $fields["adr_locality"] = $city;
$fields["ADR_Region"] = $state; $fields["adr_region"] = $state;
$fields["ADR_PostalCode"] = $zip; $fields["adr_postalcode"] = $zip;
$fields["ADR_CountryName"] = $country; $fields["adr_countryname"] = $country;
$fields["TZ"] = $timezone; $fields["tz"] = $timezone;
$fields["bday"] = $bday; $fields["bday"] = $bday;
$fields["url"] = $url; $fields["url"] = $url;
$fields["notes"] = $notes; $fields["notes"] = $notes;
$fields["access"] = $access;
$this->update($ab_id,$phpgw_info["user"]["account_id"],$fields); $this->update($ab_id,$phpgw_info["user"]["account_id"],$fields);

View File

@ -34,28 +34,28 @@
$fields = $this->read_single_entry($ab_id,$this->stock_contact_fields); $fields = $this->read_single_entry($ab_id,$this->stock_contact_fields);
$email = $fields[0]["D_EMAIL"]; $email = $fields[0]["d_email"];
$fullname = $fields[0]["FN"]; $fullname = $fields[0]["fn"];
$prefix = $fields[0]["N_Prefix"]; $prefix = $fields[0]["n_prefix"];
$firstname = $fields[0]["N_Given"]; $firstname = $fields[0]["n_given"];
$middle = $fields[0]["N_Middle"]; $middle = $fields[0]["n_middle"];
$lastname = $fields[0]["N_Family"]; $lastname = $fields[0]["n_family"];
$suffix = $fields[0]["N_Suffix"]; $suffix = $fields[0]["n_suffix"];
$title = $fields[0]["TITLE"]; $title = $fields[0]["title"];
$hphone = $fields[0]["A_TEL"]; $hphone = $fields[0]["a_tel"];
$wphone = $fields[0]["B_TEL"]; $wphone = $fields[0]["b_tel"];
$fax = $fields[0]["C_TEL"]; $fax = $fields[0]["c_tel"];
$pager = $fields[0]["pager"]; $pager = $fields[0]["pager"];
$mphone = $fields[0]["mphone"]; $mphone = $fields[0]["mphone"];
$ophone = $fields[0]["ophone"]; $ophone = $fields[0]["ophone"];
$street = $fields[0]["ADR_Street"]; $street = $fields[0]["adr_street"];
$address2 = $fields[0]["address2"]; $address2 = $fields[0]["address2"];
$city = $fields[0]["ADR_Locality"]; $city = $fields[0]["adr_locality"];
$state = $fields[0]["ADR_Region"]; $state = $fields[0]["adr_region"];
$zip = $fields[0]["ADR_PostalCode"]; $zip = $fields[0]["adr_postalcode"];
$country = $fields[0]["ADR_CountryName"]; $country = $fields[0]["adr_countryname"];
$company = $fields[0]["ORG_Name"]; $company = $fields[0]["org_name"];
$dept = $fields[0]["ORG_Unit"]; $dept = $fields[0]["org_unit"];
$bday = $fields[0]["bday"]; $bday = $fields[0]["bday"];
$notes = $fields[0]["notes"]; $notes = $fields[0]["notes"];
$access = $fields[0]["access"]; $access = $fields[0]["access"];