X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fall.php;h=729b8dd16aec644e619fa6040967e5baa0e64216;hb=2abe10b8ea4b5d69fc7f6513bf465541454ca2cf;hp=944fec6d4b7c5958a7157e7a0e86a9157a0c8bb5;hpb=9515303b14288041576c50c1729f874c2e17191f;p=quix0rs-gnu-social.git diff --git a/actions/all.php b/actions/all.php index 944fec6d4b..729b8dd16a 100644 --- a/actions/all.php +++ b/actions/all.php @@ -69,6 +69,11 @@ class AllAction extends StreamAction { } $this->views_menu(); + + $this->show_feeds_list(array(0=>array('href'=>common_local_url('allrss', array('nickname' => $user->nickname)), + 'type' => 'rss', + 'version' => 'RSS 1.0', + 'item' => 'allrss'))); } function show_notices($user) { @@ -78,22 +83,24 @@ class AllAction extends StreamAction { $page = 1; } - list($cnt, $notice) = $user->noticesWithFriends(($page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); + $notice = $user->noticesWithFriends(($page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); - if ($cnt > 0) { - common_element_start('ul', array('id' => 'notices')); - for ($i = 0; $i < min($cnt, NOTICES_PER_PAGE); $i++) { - if ($notice->fetch()) { - $this->show_notice($notice); - } else { - // shouldn't happen! - break; - } + common_element_start('ul', array('id' => 'notices')); + + $cnt = 0; + + while ($notice->fetch() && $cnt <= NOTICES_PER_PAGE) { + $cnt++; + + if ($cnt > NOTICES_PER_PAGE) { + break; } - common_element_end('ul'); + + $this->show_notice($notice); } + common_element_end('ul'); common_pagination($page > 1, $cnt > NOTICES_PER_PAGE, - $page, 'all', array('nickname' => $profile->nickname)); + $page, 'all', array('nickname' => $user->nickname)); } }