X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FPoll%2FPoll_response.php;h=b466e9f592ac84ac3a3b82986e12facafed480ca;hb=c36608b233800e02217b45d5e1eeed21ca3b9034;hp=a4ea999933ecdd146a7a80070d17cd9f355c8217;hpb=487b3be198ba0cc35d798c0eef717c12346042fa;p=quix0rs-gnu-social.git diff --git a/plugins/Poll/Poll_response.php b/plugins/Poll/Poll_response.php index a4ea999933..b466e9f592 100644 --- a/plugins/Poll/Poll_response.php +++ b/plugins/Poll/Poll_response.php @@ -46,27 +46,12 @@ class Poll_response extends Managed_DataObject { public $__table = 'poll_response'; // table name public $id; // char(36) primary key not null -> UUID + public $uri; // varchar(255) public $poll_id; // char(36) -> poll.id UUID public $profile_id; // int -> profile.id public $selection; // int -> choice # public $created; // datetime - /** - * Get an instance by key - * - * This is a utility method to get a single instance with a given key value. - * - * @param string $k Key to use to lookup (usually 'user_id' for this class) - * @param mixed $v Value to lookup - * - * @return User_greeting_count object found, or null for no hits - * - */ - function staticGet($k, $v=null) - { - return Memcached_DataObject::staticGet('Poll_response', $k, $v); - } - /** * Get an instance by compound key * @@ -117,7 +102,7 @@ class Poll_response extends Managed_DataObject * * @return Poll_response found response or null */ - function getByNotice($notice) + static function getByNotice($notice) { return self::staticGet('uri', $notice->uri); } @@ -200,12 +185,10 @@ class Poll_response extends Managed_DataObject $rendered = sprintf(_m('voted for "%s"'), $link); $tags = array(); - $replies = array(); $options = array_merge(array('urls' => array(), 'rendered' => $rendered, 'tags' => $tags, - 'replies' => $replies, 'reply_to' => $poll->getNotice()->id, 'object_type' => PollPlugin::POLL_RESPONSE_OBJECT), $options);