]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Disable deprecated 'since' parameter on public_timeline API; causes performance probl...
authorBrion Vibber <brion@pobox.com>
Tue, 9 Feb 2010 03:22:55 +0000 (19:22 -0800)
committerBrion Vibber <brion@pobox.com>
Tue, 9 Feb 2010 03:22:55 +0000 (19:22 -0800)
actions/apitimelinepublic.php

index 3f4a46c0fa16e2bc6b55483d32304cce6e0807da..0fb0788e98795b286daf9b7f37f7d9cf0d92804c 100644 (file)
@@ -74,6 +74,10 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
         parent::prepare($args);
 
         $this->notices = $this->getNotices();
+        
+        if ($this->since) {
+            throw new ServerException("since parameter is disabled for performance; use since_id", 403);
+        }
 
         return true;
     }
@@ -145,7 +149,7 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
 
         $notice = Notice::publicStream(
             ($this->page - 1) * $this->count, $this->count, $this->since_id,
-            $this->max_id, $this->since
+            $this->max_id
         );
 
         while ($notice->fetch()) {