From ee94089549ce1020413a6e6f42529f578745feac Mon Sep 17 00:00:00 2001 From: jengo Date: Thu, 8 Mar 2001 23:55:58 +0000 Subject: [PATCH] Updated to the new link() --- addressbook/add.php | 7 +++---- addressbook/delete.php | 6 +++--- addressbook/edit.php | 4 ++-- addressbook/inc/functions.inc.php | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/addressbook/add.php b/addressbook/add.php index 5b36312ed6..c67bed1360 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -29,8 +29,7 @@ $this = CreateObject("phpgwapi.contacts"); if ($AddVcard){ - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . - "/addressbook/vcardin.php")); + Header("Location: " . $phpgw->link("/addressbook/vcardin.php")); } else if ($add_email) { list($fields["firstname"],$fields["lastname"]) = explode(" ", $name); $fields["email"] = $add_email; @@ -85,14 +84,14 @@ addressbook_add_entry($phpgw_info["user"]["account_id"],$fields); $ab_id = addressbook_get_lastid(); - Header("Location: " . $phpgw->link("/addressbook/view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start")); + Header("Location: " . $phpgw->link("/addressbook/view.php","ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start")); $phpgw->common->phpgw_exit(); } $t->set_var("lang_ok",lang("ok")); $t->set_var("lang_clear",lang("clear")); $t->set_var("lang_cancel",lang("cancel")); - $t->set_var("cancel_url",$phpgw->link("/addressbook/index.php?sort=$sort&order=$order&filter=$filter&start=$start")); + $t->set_var("cancel_url",$phpgw->link("/addressbook/index.php","sort=$sort&order=$order&filter=$filter&start=$start")); $t->parse("out","add"); $t->pparse("out","add"); diff --git a/addressbook/delete.php b/addressbook/delete.php index fe15ddd7d3..74e653b040 100755 --- a/addressbook/delete.php +++ b/addressbook/delete.php @@ -24,7 +24,7 @@ include("../header.inc.php"); if (! $ab_id) { - @Header("Location: " . $phpgw->link("/addressbook/")); + @Header("Location: " . $phpgw->link("/addressbook/index.php")); } $this = CreateObject("phpgwapi.contacts"); @@ -36,7 +36,7 @@ if ($confirm != "true") { $t->set_var(lang_sure,lang("Are you sure you want to delete this entry ?")); - $t->set_var(no_link,$phpgw->link("/addressbook/view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); + $t->set_var(no_link,$phpgw->link("/addressbook/view.php","ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); $t->set_var(lang_no,lang("NO")); $t->set_var(yes_link,$phpgw->link("/addressbook/delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); $t->set_var(lang_yes,lang("YES")); @@ -46,6 +46,6 @@ } else { $this->account_id=$phpgw_info["user"]["account_id"]; $this->delete($ab_id); - @Header("Location: " . $phpgw->link("/addressbook/","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); + @Header("Location: " . $phpgw->link("/addressbook/index.php","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); } ?> diff --git a/addressbook/edit.php b/addressbook/edit.php index 3a9ec6bfd5..e04847e937 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -27,7 +27,7 @@ $t->set_file(array( "edit" => "edit.tpl")); if (! $ab_id) { - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); + Header("Location: " . $phpgw->link('/addressbook/index.php',"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); $phpgw->common->phpgw_exit(); } @@ -92,7 +92,7 @@ //} addressbook_update_entry($ab_id,$userid,$fields); - Header("Location: " . $phpgw->link("/addressbook/view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start")); + Header("Location: " . $phpgw->link("/addressbook/view.php","ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start")); $phpgw->common->phpgw_exit(); } diff --git a/addressbook/inc/functions.inc.php b/addressbook/inc/functions.inc.php index f8b66b4985..13217a9f6c 100755 --- a/addressbook/inc/functions.inc.php +++ b/addressbook/inc/functions.inc.php @@ -290,7 +290,7 @@ } if ($action) { - echo "
link($action)."\" method=\"post\">\n"; + echo "link('/addressbook/' . $action)."\" method=\"post\">\n"; } // test: