X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublic.php;h=7e47b9f759935bb5a3ac17c73f2fe154d0e00d5a;hb=d0559fdf4dafcaf8446b437f4af089c944a23d09;hp=d92a704a6bc7876423096ecdb6aee7e242e6da69;hpb=74517da3f545d9659f58af8fa273ca4fafa9ff50;p=quix0rs-gnu-social.git diff --git a/actions/public.php b/actions/public.php index d92a704a6b..7e47b9f759 100644 --- a/actions/public.php +++ b/actions/public.php @@ -28,7 +28,9 @@ class PublicAction extends StreamAction { $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; - common_show_header(_t('Public timeline'), array($this, 'show_header')); + common_show_header(_t('Public timeline'), + array($this, 'show_header'), NULL, + array($this, 'show_top')); # XXX: Public sidebar here? @@ -37,6 +39,12 @@ class PublicAction extends StreamAction { common_show_footer(); } + function show_top() { + if (common_logged_in()) { + common_notice_form(); + } + } + function show_header() { common_element('link', array('rel' => 'alternate', 'href' => common_local_url('publicrss'), @@ -48,7 +56,9 @@ class PublicAction extends StreamAction { $notice = DB_DataObject::factory('notice'); - # XXX: filter out private notifications + # FIXME: bad performance + + $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)'); $notice->orderBy('created DESC');