]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
debugging for addopenid problem
[quix0rs-gnu-social.git] / actions / public.php
index d92a704a6bc7876423096ecdb6aee7e242e6da69..7e47b9f759935bb5a3ac17c73f2fe154d0e00d5a 100644 (file)
@@ -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');