diff options
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/include/conversation.php b/include/conversation.php index 8bbb87e2c..fb8ef8585 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -96,7 +96,7 @@ function localize_item(&$item){ if(! $item['object']) return; - if($item['item_flags'] & ITEM_THREAD_TOP) + if(intval($item['item_thread_top'])) return; $obj = json_decode_plus($item['object']); @@ -356,21 +356,12 @@ function localize_item(&$item){ } } */ - // add sparkle links to appropriate permalinks - -// $x = stristr($item['plink'],'/display/'); -// if($x) { -// $sparkle = false; -// $y = best_link_url($item,$sparkle,true); - // if($sparkle) -// $item['plink'] = $y . '?f=&url=' . $item['plink']; -// } // if item body was obscured and we changed it, re-obscure it // FIXME - we need a better filter than just the string 'data'; try and // match the fact that it's json encoded - if(($item['item_flags'] & ITEM_OBSCURED) + if(intval($item['item_obscured']) && strlen($item['body']) && (! strpos($item['body'],'data'))) { $item['body'] = json_encode(crypto_encapsulate($item['body'],get_config('system','pubkey'))); } @@ -682,8 +673,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ $likebuttons = false; $shareable = false; - $verified = (($item['item_flags'] & ITEM_VERIFIED) ? t('Message signature validated') : ''); - $forged = ((($item['sig']) && (! ($item['item_flags'] & ITEM_VERIFIED))) ? t('Message signature incorrect') : ''); + $verified = (intval($item['item_verified']) ? t('Message signature validated') : ''); + $forged = ((($item['sig']) && (! intval($item['item_verified']))) ? t('Message signature incorrect') : ''); $unverified = ''; @@ -939,7 +930,7 @@ function item_photo_menu($item){ if($contact) { $poke_link = $a->get_baseurl($ssl_state) . '/poke/?f=&c=' . $contact['abook_id']; - if (!($contact['abook_flags'] & ABOOK_FLAG_SELF)) + if (! intval($contact['abook_self'])) $contact_url = $a->get_baseurl($ssl_state) . '/connedit/' . $contact['abook_id']; $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $contact['abook_id']; @@ -1146,6 +1137,7 @@ function status_editor($a, $x, $popup = false) { '$newpost' => 'true', '$baseurl' => $a->get_baseurl(true), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), + '$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''), '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => t('Visible to <strong>everybody</strong>'), @@ -1188,7 +1180,7 @@ function status_editor($a, $x, $popup = false) { '$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''), '$id_select' => $id_select, '$id_seltext' => t('Post as'), - '$writefiles' => (perm_is_allowed($x['profile_uid'], get_observer_hash(), 'post_photos') || perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage')), + '$writefiles' => perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage'), '$bold' => t('Bold'), '$italic' => t('Italic'), '$underline' => t('Underline'), @@ -1397,7 +1389,8 @@ function render_location_default($item) { function prepare_page($item) { $a = get_app(); - $naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0); + $naked = 1; +// $naked = ((get_pconfig($item['uid'],'system','nakedpage')) ? 1 : 0); $observer = $a->get_observer(); //240 chars is the longest we can have before we start hitting problems with suhosin sites $preview = substr(urlencode($item['body']), 0, 240); @@ -1606,7 +1599,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ 'id' => 'profile-tab', ); } - if ($p['view_photos']) { + if ($p['view_storage']) { $tabs[] = array( 'label' => t('Photos'), 'url' => $a->get_baseurl() . '/photos/' . $nickname, @@ -1614,11 +1607,9 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ 'title' => t('Photo Albums'), 'id' => 'photo-tab', ); - } - if ($p['view_storage']) { $tabs[] = array( 'label' => t('Files'), - 'url' => $a->get_baseurl() . '/cloud/' . $nickname . ((get_observer_hash()) ? '' : '?f=&davguest=1'), + 'url' => $a->get_baseurl() . '/cloud/' . $nickname, 'sel' => ((argv(0) == 'cloud' || argv(0) == 'sharedwithme') ? 'active' : ''), 'title' => t('Files and Storage'), 'id' => 'files-tab', |