]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
change arguments to Notice::publicStream
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 28 Sep 2008 13:27:47 +0000 (09:27 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Sun, 28 Sep 2008 13:27:47 +0000 (09:27 -0400)
darcs-hash:20080928132747-5ed1f-9e9b6d8b91f855758ca4b269418f6d5d6e4a2ae0.gz

actions/public.php
classes/Notice.php

index e0b2b1635d54e29dc95b4b8b2cd783a38c848924..43beaffc6a6074790fbc42e186f0eeb099afb026 100644 (file)
@@ -60,7 +60,8 @@ class PublicAction extends StreamAction {
        function show_notices($page) {
 
                $cnt = 0;
-               $notice = Notice::publicStream($page);
+               $notice = Notice::publicStream(($page-1)*NOTICES_PER_PAGE,
+                                                                          NOTICES_PER_PAGE + 1);
                
                if ($notice) {
                        common_element_start('ul', array('id' => 'notices'));
index 5bf8a2de80f2bc56c5f5d1515ea568ea453a65de..78ebc6aa57894b48b4cab3deebb16fce605efe6a 100644 (file)
@@ -290,7 +290,7 @@ class Notice extends Memcached_DataObject
                return $wrapper;
        }
        
-       function publicStream($page) {
+       function publicStream($offset=0, $limit=20) {
                
                $qry = 'SELECT * FROM notice ';
 
@@ -300,7 +300,7 @@ class Notice extends Memcached_DataObject
 
                return Notice::getStream($qry,
                                                                 'public',
-                                                                ($page-1)*NOTICES_PER_PAGE,
-                                                                NOTICES_PER_PAGE + 1);
+                                                                $offset, $limit);
+);
        }
 }