aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-20 17:38:41 -0800
committerfriendica <info@friendica.com>2014-11-20 17:38:41 -0800
commite74a3926feacbb3005a9f6dbbd6e54931a43ffba (patch)
tree3b4e5bb811a11df421abccbf11d0fd778faf080c /include
parent6cb9ee74990f6e7193ebc7228c00b483b82b87a9 (diff)
downloadvolse-hubzilla-e74a3926feacbb3005a9f6dbbd6e54931a43ffba.tar.gz
volse-hubzilla-e74a3926feacbb3005a9f6dbbd6e54931a43ffba.tar.bz2
volse-hubzilla-e74a3926feacbb3005a9f6dbbd6e54931a43ffba.zip
yet another option for the homepage
Diffstat (limited to 'include')
-rw-r--r--include/ItemObject.php4
-rw-r--r--include/conversation.php14
2 files changed, 11 insertions, 7 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index f6f7c0fba..6037daa7a 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -88,7 +88,7 @@ class Item extends BaseObject {
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
- $shareable = ((($conv->get_profile_owner() == local_user()) && ($item['item_private'] != 1)) ? true : false);
+ $shareable = ((($conv->get_profile_owner() == local_user() && local_user()) && ($item['item_private'] != 1)) ? true : false);
// allow an exemption for sharing stuff from your private feeds
if($item['author']['xchan_network'] === 'rss')
@@ -288,7 +288,7 @@ class Item extends BaseObject {
'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''),
'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''),
'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
- 'bookmark' => (($conv->get_profile_owner() == local_user() && $has_bookmarks) ? t('Save Bookmarks') : ''),
+ 'bookmark' => (($conv->get_profile_owner() == local_user() && local_user() && $has_bookmarks) ? t('Save Bookmarks') : ''),
'addtocal' => (($has_event) ? t('Add to Calendar') : ''),
'drop' => $drop,
'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''),
diff --git a/include/conversation.php b/include/conversation.php
index 96864c29a..6db9d3ce4 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -885,15 +885,18 @@ function item_photo_menu($item){
$vsrc_link = "";
$follow_url = "";
- if(local_user()) {
+
+ $local_user = local_user();
+
+ if($local_user) {
$ssl_state = true;
if(! count($a->contacts))
- load_contact_links(local_user());
+ load_contact_links($local_user);
$channel = $a->get_channel();
$channel_hash = (($channel) ? $channel['channel_hash'] : '');
}
- if((local_user()) && local_user() == $item['uid']) {
+ if(($local_user) && $local_user == $item['uid']) {
$vsrc_link = 'javascript:viewsrc(' . $item['id'] . '); return false;';
if($item['parent'] == $item['id'] && $channel && ($channel_hash != $item['author_xchan'])) {
$sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
@@ -901,12 +904,13 @@ function item_photo_menu($item){
}
$profile_link = chanlink_hash($item['author_xchan']);
- $pm_url = $a->get_baseurl($ssl_state) . '/mail/new/?f=&hash=' . $item['author_xchan'];
+ if($item['uid'] > 0)
+ $pm_url = $a->get_baseurl($ssl_state) . '/mail/new/?f=&hash=' . $item['author_xchan'];
if($a->contacts && array_key_exists($item['author_xchan'],$a->contacts))
$contact = $a->contacts[$item['author_xchan']];
else
- if(local_user() && $item['author']['xchan_addr'])
+ if($local_user && $item['author']['xchan_addr'])
$follow_url = z_root() . '/follow/?f=&url=' . $item['author']['xchan_addr'];
if($contact) {