diff --git a/include/group.php b/include/group.php index e92e4480ba..598d09c2ea 100644 --- a/include/group.php +++ b/include/group.php @@ -25,7 +25,7 @@ function group_rmv($uid,$name) { $r = q("SELECT * FROM `group` WHERE `uid` = %d AND `name` = '%s' LIMIT 1", intval($uid), dbesc($name) - } + ); if(count($r)) $group_id = $r[0]['id']; if(! $group_id) @@ -102,4 +102,36 @@ function group_add_member($uid,$name,$member) { intval($member) ); return $r; +} + + + +function group_side() { + + if(! local_user()) + return; +$o .= <<< EOT + +
'; + + return $o; } \ No newline at end of file diff --git a/include/nav.php b/include/nav.php index c51c56ad22..d24abd4ac5 100644 --- a/include/nav.php +++ b/include/nav.php @@ -2,6 +2,11 @@ page['nav'] .= " \r\n\r\n"; diff --git a/mod/contacts.php b/mod/contacts.php index 38b49475ac..5bf906e060 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -1,6 +1,8 @@ page['aside'] .= group_side(); } function contacts_post(&$a) { @@ -12,8 +14,7 @@ function contacts_post(&$a) { $contact_id = intval($a->argv[1]); if(! $contact_id) return; -dbg(2); -print_r($_POST); + $orig_record = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($contact_id), intval($_SESSION['uid']) @@ -60,14 +61,6 @@ print_r($_POST); - - - - - - - - function contacts_content(&$a) { if(! local_user()) { @@ -75,8 +68,6 @@ function contacts_content(&$a) { return; } - - if($a->argc == 3) { $contact_id = intval($a->argv[1]); diff --git a/mod/profiles.php b/mod/profiles.php index 3f5980ba69..4bbfbb44cb 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -278,6 +278,12 @@ function profiles_content(&$a) { '$no_selected' => (($r[0]['publish'] == 0) ? " checked=\"checked\" " : "") )); + $opt_tpl = file_get_contents("view/profile-hide-friends.tpl"); + $hide_friends = replace_macros($opt_tpl,array( + '$yes_selected' => (($r[0]['hide-friends']) ? " checked=\"checked\" " : ""), + '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "") + )); + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); $a->page['htmlhead'] .= ""; @@ -295,7 +301,7 @@ function profiles_content(&$a) { '$default' => (($is_default) ? "This is your public profile.
It may be visible to anybody using the internet.