diff --git a/addressbook/acl_preferences.php b/addressbook/acl_preferences.php index 679477fe36..72bb7bb353 100755 --- a/addressbook/acl_preferences.php +++ b/addressbook/acl_preferences.php @@ -85,6 +85,7 @@ } $acl->add($phpgw_info["flags"]["currentapp"],'u_'.$user_id,$totalacl); } + $acl->save_repository(); } $processed = Array(); diff --git a/addressbook/add.php b/addressbook/add.php index b04a59e39d..a615a14c26 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -41,9 +41,7 @@ } else { $bday = "$bday_month/$bday_day/$bday_year"; } - if ($access != "private" && $access != "public") { - $access = $phpgw->accounts->array_to_string($access,$n_groups); - } + if ($url == "http://") { $url = ""; } @@ -78,7 +76,6 @@ $fields["bday"] = $bday; $fields["url"] = $url; $fields["notes"] = $notes; - $fields["access"] = $access; $this->add($phpgw_info["user"]["account_id"],$fields); diff --git a/addressbook/edit.php b/addressbook/edit.php index 74d2ab8a15..c0fa59dfc4 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -33,14 +33,15 @@ if (!$submit) { // merge in extra fields - $extrafields = array ("pager" => "pager", - "mphone" => "mphone", - "ophone" => "ophone", - "access" => "access", - "address2" => "address2", - "bday" => "bday", - "url" => "url", - "notes" => "notes"); + $extrafields = array( + "pager" => "pager", + "mphone" => "mphone", + "ophone" => "ophone", + "address2" => "address2", + "bday" => "bday", + "url" => "url", + "notes" => "notes" + ); $qfields = $this->stock_contact_fields + $extrafields; $fields = $this->read_single_entry($ab_id,$qfields); form("","edit.php","Edit",$fields[0]); @@ -53,9 +54,6 @@ } else { $bday = "$bday_month/$bday_day/$bday_year"; } - if ($access != "private" && $access != "public") { - $access = $phpgw->accounts->array_to_string($access,$n_groups); - } $fields["org_name"] = $company; $fields["org_unit"] = $department; @@ -87,7 +85,6 @@ $fields["bday"] = $bday; $fields["url"] = $url; $fields["notes"] = $notes; - $fields["access"] = $access; $this->update($ab_id,$phpgw_info["user"]["account_id"],$fields); diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index e5410a4c93..6cd2493595 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -61,7 +61,7 @@ "d_email_home" => "", //yn "bday" => "birthday", "url" => "URL", - "access" => "access" + //"access" => "access" ); function display_name($column) { @@ -104,7 +104,7 @@ $company = $fields["org_name"]; $department = $fields["org_unit"]; $url = $fields["url"]; - $access = $fields["access"]; + //$access = $fields["access"]; if ($format != "view") { $email = ""; @@ -239,7 +239,8 @@ $birthday = $phpgw->common->dateformatorder($bday_year,$bday_month,$bday_day) . '(e.g. 1969)'; - +/* + // This is now handled by acl code, and should go away if ($format == "Edit") { if ($access != "private" && $access != "public") { $access_link .= ''.lang("Group access").':' @@ -298,7 +299,7 @@ $access_link = ''; $t->set_var("lang_access",''); } - +*/ if ($format == "view") $create .= ''.lang("Created by").':' . '' diff --git a/addressbook/index.php b/addressbook/index.php index bfebba8908..96a95ee988 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -105,12 +105,14 @@ $t->set_var("cols",$cols); $t->pparse("out","addressbook_header"); - + // Show the entries for ($i=0;$iacl->get_rights('u_'.$entries[$i]["owner"],$phpgw_info["flags"]["currentapp"]); + if ( ($rights & PHPGW_ACL_READ) || ($entries[$i]["owner"] == $account_id) ) { + //if ( ($entries[$i]["access"] == $filter) || + // ($entries[$i]["access"] == "," . $filter . ",") || + // ($filter == "") || ($filter == "none")) { $t->set_var(columns,""); $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); $t->set_var(row_tr_color,$tr_color); diff --git a/addressbook/view.php b/addressbook/view.php index 913e85ce35..86c0f6083c 100755 --- a/addressbook/view.php +++ b/addressbook/view.php @@ -22,7 +22,6 @@ include("../header.inc.php"); - #$t = new Template($phpgw_info["server"]["app_tpl"]); $t = new Template($phpgw->common->get_tpl_dir("addressbook")); $t->set_file(array( "view" => "view.tpl")); @@ -40,19 +39,19 @@ } } // merge in extra fields - $extrafields = array ("pager" => "pager", - "mphone" => "mphone", - "ophone" => "ophone", - "address2" => "address2", - "bday" => "bday", - "url" => "url", - "notes" => "notes", - "access" => "access"); + $extrafields = array ( + "pager" => "pager", + "mphone" => "mphone", + "ophone" => "ophone", + "address2" => "address2", + "bday" => "bday", + "url" => "url", + "notes" => "notes", + ); $qfields = $this->stock_contact_fields + $extrafields; $fields = $this->read_single_entry($ab_id,$qfields); $owner = $fields[0]["owner"]; - $access = $fields[0]["access"]; $view_header = "

 " . lang("Address book - view") . "


"; $view_header .= ''; @@ -79,6 +78,7 @@ $columns_html .= ""; } +/* if ($access == "private") { $access_link .= lang("Record Access") . " - " . $access; } elseif ($access != "private" && $access != "public") { @@ -86,12 +86,12 @@ } else { $access_link =""; } - +*/ $columns_html .= '' . '
" . $ref . $data . "
 
' . lang("Record owner") . '' - . $phpgw->common->grab_owner_name($owner) . '' + . $phpgw->common->grab_owner_name($owner) . '' . $access_link . '
'; - + $editlink = $phpgw->common->check_owner($owner,"edit.php",lang("edit"),"ab_id=" . $ab_id . "&start=".$start."&sort=".$sort."&order=".$order); $vcardlink = '

'; $donelink = '';