From a143b6466641901db0536794e51cbfba756c4afd Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 10 Dec 2008 12:47:22 -0500 Subject: edit throttling darcs-hash:20081210174722-84dde-4c79d7f73230d008195bd19738bc9a6017b940e9.gz --- classes/Profile.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'classes/Profile.php') diff --git a/classes/Profile.php b/classes/Profile.php index 794dc1de9..b57d7e38d 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -24,7 +24,7 @@ if (!defined('LACONICA')) { exit(1); } */ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; -class Profile extends Memcached_DataObject +class Profile extends Memcached_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */ @@ -33,7 +33,7 @@ class Profile extends Memcached_DataObject public $id; // int(4) primary_key not_null public $nickname; // varchar(64) multiple_key not_null public $fullname; // varchar(255) multiple_key - public $profileurl; // varchar(255) + public $profileurl; // varchar(255) public $homepage; // varchar(255) multiple_key public $bio; // varchar(140) multiple_key public $location; // varchar(255) multiple_key @@ -145,4 +145,15 @@ class Profile extends Memcached_DataObject } return NULL; } + + function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0) { + $qry = + 'SELECT * ' . + 'FROM notice ' . + 'WHERE profile_id = %d '; + + return Notice::getStream(sprintf($qry, $this->id), + 'profile:notices:'.$this->id, + $offset, $limit, $since_id, $before_id); + } } -- cgit v1.2.3-54-g00ecf