diff options
author | friendica <info@friendica.com> | 2013-12-02 15:15:02 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-02 15:15:02 -0800 |
commit | d9f67876dce5da9ed056726f792e087d142699cb (patch) | |
tree | 4c615055a02508338f0992051bdafc5f773bb2b8 /include | |
parent | 3fdc3515b5dbfee4582467144d3c2d5eefc6a708 (diff) | |
download | volse-hubzilla-d9f67876dce5da9ed056726f792e087d142699cb.tar.gz volse-hubzilla-d9f67876dce5da9ed056726f792e087d142699cb.tar.bz2 volse-hubzilla-d9f67876dce5da9ed056726f792e087d142699cb.zip |
refactor magic-auth
Diffstat (limited to 'include')
-rw-r--r-- | include/Contact.php | 79 | ||||
-rwxr-xr-x | include/text.php | 2 |
2 files changed, 1 insertions, 80 deletions
diff --git a/include/Contact.php b/include/Contact.php index fcc5019e7..5725e06f0 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -489,62 +489,6 @@ function unmark_for_death($contact) { ); }} -if(! function_exists('contact_photo_menu')){ -function contact_photo_menu($contact) { - - $a = get_app(); - - $contact_url=""; - $pm_url=""; - $status_link=""; - $photos_link=""; - $posts_link=""; - $poke_link=""; - - $sparkle = false; - if($contact['xchan_network'] === NETWORK_ZOT) { - $sparkle = true; - $profile_link = $a->get_baseurl() . '/magic?f=&id=' . $contact['abook_id']; - } - else - $profile_link = $contact['xchan_url']; - - if($sparkle) { - $status_link = $profile_link . "&url=status"; - $photos_link = $profile_link . "&url=photos"; - $profile_link = $profile_link . "&url=profile"; - $pm_url = $a->get_baseurl() . '/message/new/' . $contact['xchan_hash']; - } - - $poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['abook_id']; - $contact_url = $a->get_baseurl() . '/connections/' . $contact['abook_id']; - $posts_link = $a->get_baseurl() . '/network/?cid=' . $contact['abook_id']; - - $menu = Array( - t("Poke") => $poke_link, - t("View Status") => $status_link, - t("View Profile") => $profile_link, - t("View Photos") => $photos_link, - t("Network Posts") => $posts_link, - t("Edit Contact") => $contact_url, - t("Send PM") => $pm_url, - ); - - - $args = array('contact' => $contact, 'menu' => &$menu); - - call_hooks('contact_photo_menu', $args); - - $o = ""; - foreach($menu as $k=>$v){ - if ($v!="") { - $o .= "<li><a href=\"$v\">$k</a></li>\n"; - } - } - return $o; -}} - - function random_profile() { $r = q("select xchan_url from xchan where 1 order by rand() limit 1"); if($r) @@ -553,26 +497,3 @@ function random_profile() { } -function contacts_not_grouped($uid,$start = 0,$count = 0) { - - if(! $count) { - $r = q("select count(*) as total from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) ", - intval($uid), - intval($uid) - ); - - return $r; - - - } - - $r = q("select * from contact where uid = %d and self = 0 and id not in (select distinct(`contact-id`) from group_member where uid = %d) and blocked = 0 and pending = 0 limit %d, %d", - intval($uid), - intval($uid), - intval($start), - intval($count) - ); - - return $r; -} - diff --git a/include/text.php b/include/text.php index 3d15a5c6b..ff695062f 100755 --- a/include/text.php +++ b/include/text.php @@ -1084,7 +1084,7 @@ function format_categories(&$item,$writeable) { if(! trim($term)) continue; $removelink = (($writeable) ? z_root() . '/filerm/' . $item['id'] . '?f=&cat=' . urlencode($t['term']) : ''); - $categories[] = array('term' => $term, 'writeable' => $writeable, 'removelink' => $removelink, 'url' => $t['url']); + $categories[] = array('term' => $term, 'writeable' => $writeable, 'removelink' => $removelink, 'url' => zid($t['url'])); } } $s = replace_macros(get_markup_template('item_categories.tpl'),array( |