: |
diff --git a/addressbook/index.php b/addressbook/index.php
index 0ffeb924bc..57d6344339 100755
--- a/addressbook/index.php
+++ b/addressbook/index.php
@@ -185,16 +185,19 @@
// Some fields require special formating.
if ($column[0] == "url") {
+ if (! ereg("^http://",$field)) {
+ $data = "http://" . $field;
+ }
echo ''
. '' . $field. ' | ';
} else if ($column[0] == "email") {
if ($phpgw_info["user"]["apps"]["email"]) {
echo ''
. '' . $field . ' | ';
+ "to=" . urlencode($field)) . '" target="_new">' . $field . ' ';
} else {
echo ''
- . '' . $field. ' | ';
+ . '' . $field. ' ';
}
} else {
echo ''
diff --git a/addressbook/view.php b/addressbook/view.php
index 81f067cf33..c8d7aaf50c 100755
--- a/addressbook/view.php
+++ b/addressbook/view.php
@@ -19,6 +19,31 @@
$phpgw_info["flags"]["currentapp"] = "addressbook";
include("../header.inc.php");
+ function checkfor_specialformat($field,$data)
+ {
+ global $phpgw_info, $phpgw;
+
+ if ($field == "email") {
+ if ($phpgw_info["user"]["apps"]["email"]) {
+ $s = '' . $data . '';
+ } else {
+ $s = '' . $data . '';
+ }
+ } else if ($field == "URL") {
+ if (! ereg("^http://",$data)) {
+ $data = "http://" . $data;
+ }
+ $s = '' . $data . '';
+ } else if ($field == "birthday") {
+ $date = explode("/",$data);
+ $s = $phpgw->common->dateformatorder($date[2],$date[1],$date[0],True);
+ } else {
+ $s = $data . " ";
+ }
+ return $s;
+ }
+
if (! $ab_id) {
Header("Location: " . $phpgw->link("index.php"));
}
@@ -58,14 +83,16 @@
if (! $columns_to_display[$i]["field_name"]) break;
$columns_html .= "" . lang($columns_to_display[$i]["field_name"]) . ": | "
- . "" . $columns_to_display[$i]["field_value"] . " | ";
+ . "" . checkfor_specialformat($columns_to_display[$i]["field_name"],$columns_to_display[$i]["field_value"])
+ . " | ";
$i++;
if (! $columns_to_display[$i]["field_name"]) break;
- $columns_html .= "" . lang($columns_to_display[$i]["field_name"]) . ": | "
- . "" . $columns_to_display[$i]["field_value"];
+ $columns_html .= " | " . lang($columns_to_display[$i]["field_name"]) . ": | "
+ . "" . checkfor_specialformat($columns_to_display[$i]["field_name"],$columns_to_display[$i]["field_value"])
+ . " | ";
$i++;
$columns_html .= " ";
|