X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontent.php;h=2377032a7939c7fd4a21911f9a1ad48da3fdd751;hb=a7ce601580b07e9b3e7653cbdb0a9b6bbb5c474e;hp=1e2307f553fd52b26348f9b9b0ce42d521e3163a;hpb=7141ce91635e071a54ec57b2971f9c745a996fc0;p=friendica.git diff --git a/mod/content.php b/mod/content.php index 1e2307f553..2377032a79 100644 --- a/mod/content.php +++ b/mod/content.php @@ -23,7 +23,7 @@ function content_content(&$a, $update = 0) { // Currently security is based on the logged in user - if(! local_user()) { + if (! local_user()) { return; } @@ -113,11 +113,11 @@ function content_content(&$a, $update = 0) { intval($group), intval($_SESSION['uid']) ); - if(! dbm::is_result($r)) { + if (! dbm::is_result($r)) { if($update) killme(); notice( t('No such group') . EOL ); - goaway($a->get_baseurl(true) . '/network'); + goaway(App::get_baseurl(true) . '/network'); // NOTREACHED } @@ -509,8 +509,8 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { 'like' => '', 'dislike' => '', 'comment' => '', - //'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), - 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state).'/display/'.$item['guid'], 'title'=> t('View in context'))), + //'conv' => (($preview) ? '' : array('href'=> App::get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), + 'conv' => (($preview) ? '' : array('href'=> App::get_baseurl($ssl_state).'/display/'.$item['guid'], 'title'=> t('View in context'))), 'previewing' => $previewing, 'wait' => t('Please wait'), ); @@ -742,10 +742,11 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { } } - if(local_user() && link_compare($a->contact['url'],$item['author-link'])) - $edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit")); - else + if (local_user() && link_compare($a->contact['url'],$item['author-link'])) { + $edpost = array(App::get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit")); + } else { $edpost = false; + } $drop = ''; $dropping = false; @@ -764,7 +765,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $isstarred = "unstarred"; if ($profile_owner == local_user()) { - if($toplevelpost) { + if ($toplevelpost) { $isstarred = (($item['starred']) ? "starred" : "unstarred"); $star = array( @@ -782,6 +783,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { intval($item['uid']), intval($item['id']) ); + if (dbm::is_result($r)) { $ignore = array( 'do' => t("ignore thread"), @@ -793,7 +795,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { ); } $tagger = ''; - if(feature_enabled($profile_owner,'commtag')) { + if (feature_enabled($profile_owner,'commtag')) { $tagger = array( 'add' => t("add tag"), 'class' => "", @@ -818,19 +820,22 @@ function render_content(&$a, $items, $mode, $update, $preview = false) { $sp = false; $profile_link = best_link_url($item,$sp); - if($profile_link === 'mailbox') + if ($profile_link === 'mailbox') { $profile_link = ''; - if($sp) + } + if ($sp) { $sparkle = ' sparkle'; - else + } else { $profile_link = zrl($profile_link); + } // Don't rely on the author-avatar. It is better to use the data from the contact table $author_contact = get_contact_details_by_url($item['author-link'], $profile_owner); - if ($author_contact["thumb"]) + if ($author_contact["thumb"]) { $profile_avatar = $author_contact["thumb"]; - else + } else { $profile_avatar = $item['author-avatar']; + } $like = ((x($conv_responses['like'],$item['uri'])) ? format_like($conv_responses['like'][$item['uri']],$conv_responses['like'][$item['uri'] . '-l'],'like',$item['uri']) : ''); $dislike = ((x($conv_responses['dislike'],$item['uri'])) ? format_like($conv_responses['dislike'][$item['uri']],$conv_responses['dislike'][$item['uri'] . '-l'],'dislike',$item['uri']) : '');