diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index db1ff97436..f61b7913d6 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -20,13 +20,18 @@ $grants = $phpgw->acl->get_grants('addressbook'); - if(!isset($owner) || !$owner) { + if(!isset($owner) || !$owner) + { $owner = $phpgw_info['user']['account_id']; $rights = PHPGW_ACL_READ + PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE + 16; - } else { - if($grants[$owner]) { + } + else + { + if($grants[$owner]) + { $rights = $grants[$owner]; - if (!($rights & PHPGW_ACL_READ)) { + if (!($rights & PHPGW_ACL_READ)) + { $owner = $phpgw_info['user']['account_id']; $rights = PHPGW_ACL_READ + PHPGW_ACL_ADD + PHPGW_ACL_EDIT + PHPGW_ACL_DELETE + 16; } @@ -82,14 +87,17 @@ // Return a select form element with the categories option dialog in it function cat_option($cat_id='',$notall=False,$java=True) { global $phpgw_info; - if ($java) { + if ($java) + { $jselect = ' onChange="this.form.submit();"'; } // Setup all and none first $cats_link = "\n" .'set_var("pref_".$name,$str[$name]); } - if (strlen($bday) > 2) { + if (strlen($bday) > 2) + { list( $month, $day, $year ) = split( '/', $bday ); $temp_month[$month] = "SELECTED"; $bday_month = ""; + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . ""; $bday_day = ''; $bday_year = ''; - } else { + } + else + { $bday_month = ""; + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . "" + . ""; $bday_day = ''; $bday_year = ''; } $time_zone = ""; reset($this->email_types); $hemail_type = '"; reset($this->adr_types); - while (list($type,$val) = each($this->adr_types)) { + while (list($type,$val) = each($this->adr_types)) + { $badrtype .= "\n".'adr_types); - while (list($type,$val) = each($this->adr_types)) { + while (list($type,$val) = each($this->adr_types)) + { $hadrtype .= "\n".''; - $label = ''; - $pubkey = ''; - } else { - $notes = "
'; + $label = ''; + $pubkey = ''; + } + else + { + $notes = "
"; if ($bday == "//") + { $bday = ""; + } } - if ($action) { + if ($action) + { echo '
'; } - if (! ereg("^http://",$url)) { + if (!ereg("^http://",$url)) + { $url = "http://". $url; } $birthday = $phpgw->common->dateformatorder($bday_year,$bday_month,$bday_day) - . '(e.g. 1969)'; + . '(e.g. 1969)'; if ($format == 'edit') { $create .= '' . lang("Created by") . ':' @@ -594,10 +643,13 @@ $t->set_var('lang_cats',lang('Category')); $t->set_var('cats_link',$cats_link); - if ($customfields) { + if ($customfields) + { $t->set_var('lang_custom',lang('Custom Fields').':'); $t->set_var("custom",$custom); - } else { + } + else + { $t->set_var("lang_custom",''); $t->set_var("custom",''); }