aboutsummaryrefslogtreecommitdiffstats
path: root/mod/mail.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mail.php')
-rw-r--r--mod/mail.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/mail.php b/mod/mail.php
index 54663b3ae..0f905f1da 100644
--- a/mod/mail.php
+++ b/mod/mail.php
@@ -185,20 +185,20 @@ function mail_content(&$a) {
$a->page['htmlhead'] .= $header;
-
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
$prename = $preurl = $preid = '';
-
+
if(x($_REQUEST,'hash')) {
$r = q("select abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash
where abook_channel = %d and abook_xchan = '%s' limit 1",
intval(local_channel()),
dbesc($_REQUEST['hash'])
);
+
if($r) {
$prename = $r[0]['xchan_name'];
$preurl = $r[0]['xchan_url'];
- $preid = $r[0]['abook_id'];
+ $preid = $r[0]['abook_xchan'];
$preselect = array($preid);
}
}
@@ -213,7 +213,7 @@ function mail_content(&$a) {
if($r) {
$prename = $r[0]['xchan_name'];
$preurl = $r[0]['xchan_url'];
- $preid = $r[0]['abook_id'];
+ $preid = $r[0]['abook_xchan'];
}
}