Remove all menu entries on the contact list that are empty
This commit is contained in:
parent
a663e4693f
commit
caa9073a8f
1 changed files with 15 additions and 3 deletions
|
@ -219,10 +219,14 @@ function contact_photo_menu($contact) {
|
|||
$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['id'];
|
||||
}
|
||||
|
||||
$poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
|
||||
if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA)))
|
||||
$pm_url = $a->get_baseurl() . '/message/new/' . $contact['id'];
|
||||
|
||||
if ($contact["network"] == NETWORK_DFRN)
|
||||
$poke_link = $a->get_baseurl() . '/poke/?f=&c=' . $contact['id'];
|
||||
|
||||
$contact_url = $a->get_baseurl() . '/contacts/' . $contact['id'];
|
||||
$posts_link = $a->get_baseurl() . '/network/0?nets=all&cid=' . $contact['id'];
|
||||
$contact_drop_link = $a->get_baseurl() . "/contacts/" . $contact['id'] . '/drop?confirm=1';
|
||||
|
@ -254,6 +258,7 @@ function contact_photo_menu($contact) {
|
|||
}
|
||||
}
|
||||
return $o;*/
|
||||
|
||||
foreach($menu as $k=>$v){
|
||||
if ($v[1]!="") {
|
||||
if(($v[0] !== t("Network Posts")) && ($v[0] !== t("Send PM")) && ($v[0] !== t('Edit Contact')))
|
||||
|
@ -262,7 +267,14 @@ function contact_photo_menu($contact) {
|
|||
$menu[$k][2] = 0;
|
||||
}
|
||||
}
|
||||
return $menu;
|
||||
|
||||
$menucondensed = array();
|
||||
|
||||
foreach ($menu AS $menuitem)
|
||||
if ($menuitem[1] != "")
|
||||
$menucondensed[] = $menuitem;
|
||||
|
||||
return $menucondensed;
|
||||
}}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue