From 8eb384e4eefda33b855b1c3e13c48ca7a97e497b Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Thu, 8 Mar 2001 13:31:05 +0000 Subject: [PATCH] Adjust link() calls --- addressbook/acl_preferences.php | 2 +- addressbook/add.php | 4 ++-- addressbook/delete.php | 8 ++++---- addressbook/edit.php | 6 +++--- addressbook/vcardin.php | 6 +++--- addressbook/vcardout.php | 10 +++++----- addressbook/view.php | 11 +++++------ 7 files changed, 23 insertions(+), 24 deletions(-) diff --git a/addressbook/acl_preferences.php b/addressbook/acl_preferences.php index c9eac50b2f..00e7c78788 100755 --- a/addressbook/acl_preferences.php +++ b/addressbook/acl_preferences.php @@ -194,7 +194,7 @@ $var = Array( 'errors' => '', 'title' => '

'.lang($phpgw_info['flags']['currentapp'].' preferences').' - '.lang('acl').':


', - 'action_url' => $phpgw->link(''), + 'action_url' => $phpgw->link('/addressbook/acl_preferences.php'), 'bg_color' => $phpgw_info['theme']['th_bg'], 'submit_lang' => lang('submit'), 'common_hidden_vars_form' => $common_hidden_vars diff --git a/addressbook/add.php b/addressbook/add.php index 5e115668dd..5b36312ed6 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -85,14 +85,14 @@ addressbook_add_entry($phpgw_info["user"]["account_id"],$fields); $ab_id = addressbook_get_lastid(); - Header("Location: " . $phpgw->link("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("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 a93e353b1e..fe15ddd7d3 100755 --- a/addressbook/delete.php +++ b/addressbook/delete.php @@ -24,7 +24,7 @@ include("../header.inc.php"); if (! $ab_id) { - @Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/")); + @Header("Location: " . $phpgw->link("/addressbook/")); } $this = CreateObject("phpgwapi.contacts"); @@ -36,9 +36,9 @@ 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("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("delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); + $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")); $t->pparse("out","delete"); @@ -46,6 +46,6 @@ } else { $this->account_id=$phpgw_info["user"]["account_id"]; $this->delete($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/","cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query")); } ?> diff --git a/addressbook/edit.php b/addressbook/edit.php index 20f6dafeeb..3a9ec6bfd5 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -92,7 +92,7 @@ //} addressbook_update_entry($ab_id,$userid,$fields); - Header("Location: " . $phpgw->link("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(); } @@ -106,8 +106,8 @@ $t->set_var("lang_cancel",lang("cancel")); $t->set_var("lang_delete",lang("delete")); $t->set_var("lang_submit",lang("submit")); - $t->set_var("cancel_link",'

'); - $t->set_var("delete_link",''); + $t->set_var("cancel_link",''); + $t->set_var("delete_link",''); $t->parse("out","edit"); $t->pparse("out","edit"); diff --git a/addressbook/vcardin.php b/addressbook/vcardin.php index c023c25836..03dde58622 100644 --- a/addressbook/vcardin.php +++ b/addressbook/vcardin.php @@ -37,7 +37,7 @@ if ($action == "Load Vcard") { if($uploadedfile == "none" || $uploadedfile == "") { - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/vcardin.php","action=GetFile")); + Header("Location: " . $phpgw->link("/addressbook/vcardin.php","action=GetFile")); } else { srand((double)microtime()*1000000); $random_number = rand(100000000,999999999); @@ -61,7 +61,7 @@ // Delete the temp file. unlink($filename); unlink($filename . ".info"); - Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/", "cd=14")); + Header("Location: " . $phpgw->link("/addressbook/", "cd=14")); } } @@ -79,7 +79,7 @@ $vcard_header = "

 " . lang("Address book - VCard in") . "


"; $t->set_var(vcard_header,$vcard_header); - $t->set_var(action_url,$phpgw->link("vcardin.php")); + $t->set_var(action_url,$phpgw->link("/addressbook/vcardin.php")); $t->set_var(lang_access,lang("Access")); $t->set_var(lang_groups,lang("Which groups")); diff --git a/addressbook/vcardout.php b/addressbook/vcardout.php index 6b7c6ae67d..1f0b211280 100644 --- a/addressbook/vcardout.php +++ b/addressbook/vcardout.php @@ -29,7 +29,7 @@ include("../header.inc.php"); if (! $ab_id) { - Header("Location: " . $phpgw->link("index.php")); + Header("Location: " . $phpgw->link("/addressbook/index.php")); $phpgw->common->phpgw_exit(); } @@ -72,10 +72,10 @@ /* First name and last must be in the vcard. */ if($lastname == "") { /* Run away here. */ - Header("Location: " . $phpgw->link("vcardout.php","nolname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort")); + Header("Location: " . $phpgw->link("/addressbook/vcardout.php","nolname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort")); } if($firstname == "" ) { - Header("Location: " . $phpgw->link("vcardout.php","nofname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort")); + Header("Location: " . $phpgw->link("/addressbook/vcardout.php","nofname=1&ab_id=$ab_id&start=$start&order=$order&filter=" . "$filter&query=$query&sort=$sort")); } header("Content-type: text/X-VCARD"); @@ -133,7 +133,7 @@ echo "

"; echo lang("This person's first name was not in the address book.") ."
"; echo lang("Vcards require a first name entry.") . "

"; - echo "OK"; + echo "OK"; echo "
"; } @@ -141,7 +141,7 @@ echo "

"; echo lang("This person's last name was not in the address book.") . "
"; echo lang("Vcards require a last name entry.") . "

"; - echo "OK"; + echo "OK"; echo "
"; } diff --git a/addressbook/view.php b/addressbook/view.php index 1776da8a30..5ee45cd478 100755 --- a/addressbook/view.php +++ b/addressbook/view.php @@ -32,7 +32,7 @@ $this = CreateObject("phpgwapi.contacts"); if (! $ab_id) { - Header("Location: " . $phpgw->link("index.php")); + Header("Location: " . $phpgw->link("/addressbook/index.php")); } while ($column = each($this->stock_contact_fields)) { @@ -67,8 +67,7 @@ $data=$coldata.''; } elseif ($column[0] == "email") { if ($phpgw_info["user"]["apps"]["email"]) { - $ref=''; + $ref=''; } else { $ref=''; } @@ -93,9 +92,9 @@ . $phpgw->common->grab_owner_name($record_owner) . '' . $access_link . ''; - $editlink = $phpgw->common->check_owner($record_owner,"edit.php",lang("edit"),"ab_id=" . $ab_id . "&start=".$start."&sort=".$sort."&order=".$order); - $vcardlink = ''; - $donelink = ''; + $editlink = $phpgw->common->check_owner($record_owner,"/addressbook/edit.php",lang("edit"),"ab_id=" . $ab_id . "&start=".$start."&sort=".$sort."&order=".$order); + $vcardlink = ''; + $donelink = ''; $t->set_var("access_link",$access_link); $t->set_var("ab_id",$ab_id);