Fix each error

This commit is contained in:
Miles Lott 2001-03-18 15:44:30 +00:00
parent 8f2581cec1
commit e67c4b9486
3 changed files with 20 additions and 11 deletions

View File

@ -31,7 +31,7 @@
// Read in user custom fields, if any
$phpgw->preferences->read_repository();
$customfields = array();
while (list($col,$descr) = each($phpgw_info["user"]["preferences"]["addressbook"])) {
while (list($col,$descr) = @each($phpgw_info["user"]["preferences"]["addressbook"])) {
if ( substr($col,0,6) == 'extra_' ) {
$field = ereg_replace('extra_','',$col);
$field = ereg_replace(' ','_',$field);

View File

@ -36,7 +36,7 @@
// Read in user custom fields, if any
$phpgw->preferences->read_repository();
$customfields = array();
while (list($col,$descr) = each($phpgw_info["user"]["preferences"]["addressbook"])) {
while (list($col,$descr) = @each($phpgw_info["user"]["preferences"]["addressbook"])) {
if ( substr($col,0,6) == 'extra_' ) {
$field = ereg_replace('extra_','',$col);
$field = ereg_replace(' ','_',$field);
@ -45,17 +45,20 @@
}
if (!$submit) {
// not checking acl here, only on submit - that ok?
// merge in extra fields
$extrafields = array(
"ophone" => "ophone",
"address2" => "address2",
"address3" => "address3"
);
if ($rights & PHPGW_ACL_EDIT) {
$qfields = $this->stock_contact_fields + $extrafields + $customfields;
$fields = addressbook_read_entry($ab_id,$qfields);
addressbook_form("","edit.php","Edit",$fields[0],$customfields);
} else {
Header("Location: " . $phpgw->link('/addressbook/index.php',"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
$phpgw->common->phpgw_exit();
}
} else {
if ($url == "http://") {
$url = "";

View File

@ -32,7 +32,7 @@
// Read in user custom fields, if any
$phpgw->preferences->read_repository();
$customfields = array();
while (list($col,$descr) = each($phpgw_info["user"]["preferences"]["addressbook"])) {
while (list($col,$descr) = @each($phpgw_info["user"]["preferences"]["addressbook"])) {
if ( substr($col,0,6) == 'extra_' ) {
$field = ereg_replace('extra_','',$col);
$field = ereg_replace(' ','_',$field);
@ -208,8 +208,14 @@
$t->parse("columns","column",True);
}
if (1) {
$t->set_var(row_view_link,$phpgw->link("/addressbook/view.php","ab_id=$myid&start=$start&order=$order&filter="
. "$filter&query=$query&sort=$sort"));
} else {
$t->set_var(row_view_link,"");
$t->set_var("lang_view",lang("Private"));
}
$t->set_var(row_vcard_link,$phpgw->link("/addressbook/vcardout.php","ab_id=$myid&start=$start&order=$order&filter="
. "$filter&query=$query&sort=$sort"));
if ($rights & PHPGW_ACL_EDIT) {