aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-06 05:07:28 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-06 05:07:28 -0700
commit1ea69ae275245f65ee0bb8f959744f0896913a0c (patch)
treea9d8178f063b592a4df64172ded6ad08910c9147 /mod
parent6817c5d59ad578370a2b60dbdcdba16e43dbac65 (diff)
downloadvolse-hubzilla-1ea69ae275245f65ee0bb8f959744f0896913a0c.tar.gz
volse-hubzilla-1ea69ae275245f65ee0bb8f959744f0896913a0c.tar.bz2
volse-hubzilla-1ea69ae275245f65ee0bb8f959744f0896913a0c.zip
bizzy
Diffstat (limited to 'mod')
-rw-r--r--mod/contacts.php39
-rw-r--r--mod/dfrn_request.php2
-rw-r--r--mod/item.php2
3 files changed, 40 insertions, 3 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index fb4e6cf6b..e1b6c4919 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -80,7 +80,44 @@ function contacts_content(&$a) {
return;
}
- if(($a->argc2 == 2) && ($a->argv[1] == 'all'))
+
+
+
+ if(($a->argc == 2) && intval($a->argv[1])) {
+
+ $contact_id = intval($a->argv[1]);
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d and `id` = %d LIMIT 1",
+ $_SESSION['uid'],
+ intval($contact_id)
+ );
+ if(! count($r)) {
+ notice("Contact not found.");
+ return;
+ }
+
+ require_once('view/contact_selectors.php');
+
+ $tpl = file_get_contents("view/contact_edit.tpl");
+
+ $o .= replace_macros($tpl,array(
+ '$profile_select' => contact_profile_assign($r[0]['profile-id']),
+ '$contact_id' => $r[0]['id'],
+ '$blocked' => $r[0]['blocked'],
+ '$rating' => $r[0]['rating'],
+ '$reason' => $r[0]['reason'],
+ // '$groups' => group_selector(),
+ '$photo' => $r[0]['photo'],
+ '$name' => $r[0]['name'],
+ '$dir_icon' => $dir_icon,
+ '$alt_text' => $alt_text
+
+ ));
+
+ return $o;
+
+ }
+
+ if(($a->argc == 2) && ($a->argv[1] == 'all'))
$sql_extra = '';
else
$sql_extra = " AND `blocked` = 0 ";
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 7675ee766..b6ae4346d 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -187,7 +187,7 @@ function dfrn_request_post(&$a) {
if(is_array($contact_record)) {
// There is a contact record but no issued-id, so this
// is a reciprocal introduction from a known contact
- $r = q("UPDATE `contact` SET `issued-id` = '%s', `ret-blocked` = 1 WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d LIMIT 1",
dbesc($issued_id),
intval($contact_record['id'])
);
diff --git a/mod/item.php b/mod/item.php
index dbf9d25a8..f667d4fc4 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -58,7 +58,7 @@ function item_post(&$a) {
intval($post_id));
}
}
- goaway($a->get_baseurl() . "/profile/$uid");
+ goaway($a->get_baseurl() . "/profile/$profile_uid");