X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=fdb93e480cc3676f8487dfa899edda6ad9d72d8f;hb=730322ee5fd1b04a026ce6d0bafae9079f307a4b;hp=fb69523e91b095d7485edf74c714ce8b368b43fa;hpb=9133a2384aecd61f8ee59b380d82dc2d58660703;p=friendica.git diff --git a/mod/display.php b/mod/display.php index fb69523e91..fdb93e480c 100644 --- a/mod/display.php +++ b/mod/display.php @@ -3,6 +3,16 @@ function display_content(&$a) { + if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + notice( t('Public access denied.') . EOL); + return; + } + + require_once("include/bbcode.php"); + require_once('include/security.php'); + require_once('include/conversation.php'); + + $o = '
' . "\r\n"; $nick = (($a->argc > 1) ? $a->argv[1] : ''); @@ -16,8 +26,6 @@ function display_content(&$a) { return; } - require_once("include/bbcode.php"); - require_once('include/security.php'); $groups = array(); @@ -45,6 +53,11 @@ function display_content(&$a) { } } + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", + intval($a->profile['uid']) + ); + if(count($r)) + $a->page_contact = $r[0]; $sql_extra = " AND `allow_cid` = '' @@ -85,7 +98,7 @@ function display_content(&$a) { $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, - `contact`.`network`, `contact`.`thumb`, `contact`.`self`, + `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 @@ -108,7 +121,6 @@ function display_content(&$a) { ); } - require_once('include/conversation.php'); $o .= conversation($a,$r,'display', false);