]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Poll/Poll_response.php
Some statically called functions in plugins now declared statically
[quix0rs-gnu-social.git] / plugins / Poll / Poll_response.php
index a4ea999933ecdd146a7a80070d17cd9f355c8217..b466e9f592ac84ac3a3b82986e12facafed480ca 100644 (file)
@@ -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);