diff --git a/addressbook/add.php b/addressbook/add.php index 8f355a7b1d..b23c185776 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -20,7 +20,8 @@ $phpgw_info["flags"]["enable_addressbook_class"] = True; include("../header.inc.php"); - $t = new Template($phpgw_info["server"]["app_tpl"]); + #$t = new Template($phpgw_info["server"]["app_tpl"]); + $t = new Template($phpgw->common->get_tpl_dir("addressbook")); $t->set_file(array( "add" => "add.tpl")); $this = CreateObject("phpgwapi.contacts"); diff --git a/addressbook/delete.php b/addressbook/delete.php index e17e822219..c37da0f4bf 100755 --- a/addressbook/delete.php +++ b/addressbook/delete.php @@ -26,15 +26,17 @@ $this = CreateObject("phpgwapi.contacts"); - $t = new Template($phpgw_info["server"]["app_tpl"]); + #$t = new Template($phpgw_info["server"]["app_tpl"]); + $t = new Template($phpgw->common->get_tpl_dir("addressbook")); $t->set_file(array("delete" => "delete.tpl")); if ($confirm != "true") { - $phpgw->db->query("select owner from addressbook where id='$ab_id'"); - $phpgw->db->next_record(); + $fields = $this->read($ab_id, array("owner" => $owner)); + #$phpgw->db->query("select owner from addressbook where id='$ab_id'"); + #$phpgw->db->next_record(); - if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"]) { + if ($fielfs["owner"] != $phpgw_info["user"]["account_id"]) { @Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); } diff --git a/addressbook/edit.php b/addressbook/edit.php index c9fec6a59f..0f41fdc6f0 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -20,7 +20,8 @@ $phpgw_info["flags"]["enable_addressbook_class"] = True; include("../header.inc.php"); - $t = new Template($phpgw_info["server"]["app_tpl"]); + #$t = new Template($phpgw_info["server"]["app_tpl"]); + $t = new Template($phpgw->common->get_tpl_dir("addressbook")); $t->set_file(array( "edit" => "edit.tpl")); if (! $ab_id) { diff --git a/addressbook/index.php b/addressbook/index.php index 94d457fc56..0d5bab940d 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -17,7 +17,8 @@ "enable_nextmatchs_class" => True); include("../header.inc.php"); - $t = new Template($phpgw_info["server"]["app_tpl"]); + #$t = new Template($phpgw_info["server"]["app_tpl"]); + $t = new Template($phpgw->common->get_tpl_dir("addressbook")); $t->set_file(array( "addressbook_header" => "header.tpl", "column" => "column.tpl", "row" => "row.tpl", @@ -48,7 +49,7 @@ $offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]; if ($filter == "none") { $filter = ""; } - else { $filter = "access=$filter"; } + if ($filter != "" ) { $filter = "access=$filter"; } $entries = $this->read($start,$offset,$columns_to_display,$query,$filter,$sort,$order); diff --git a/addressbook/view.php b/addressbook/view.php index 5f2cbf8204..47fa55b1aa 100755 --- a/addressbook/view.php +++ b/addressbook/view.php @@ -22,7 +22,8 @@ include("../header.inc.php"); - $t = new Template($phpgw_info["server"]["app_tpl"]); + #$t = new Template($phpgw_info["server"]["app_tpl"]); + $t = new Template($phpgw->common->get_tpl_dir("addressbook")); $t->set_file(array( "view" => "view.tpl")); $this = CreateObject("phpgwapi.contacts");