]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Poll/classes/Poll.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / Poll / classes / Poll.php
index 213bab492479f85bfae2dea18e733ab2371ebc3b..a8cbfa55c3c9b54e3d5ce40c64d89b2fb3a61f9f 100644 (file)
@@ -47,7 +47,7 @@ class Poll extends Managed_DataObject
 {
     public $__table = 'poll'; // table name
     public $id;          // char(36) primary key not null -> UUID
-    public $uri;
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $profile_id;  // int -> profile.id
     public $question;    // text
     public $options;     // text; newline(?)-delimited
@@ -62,7 +62,7 @@ class Poll extends Managed_DataObject
             'description' => 'Per-notice poll data for Poll plugin',
             'fields' => array(
                 'id' => array('type' => 'char', 'length' => 36, 'not null' => true, 'description' => 'UUID'),
-                'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => true),
+                'uri' => array('type' => 'varchar', 'length' => 191, 'not null' => true),
                 'profile_id' => array('type' => 'int'),
                 'question' => array('type' => 'text'),
                 'options' => array('type' => 'text'),
@@ -114,9 +114,9 @@ class Poll extends Managed_DataObject
         return Notice::getKV('uri', $this->uri);
     }
 
-    function bestUrl()
+    function getUrl()
     {
-        return $this->getNotice()->bestUrl();
+        return $this->getNotice()->getUrl();
     }
 
     /**
@@ -193,7 +193,7 @@ class Poll extends Managed_DataObject
                                         array('id' => $p->id));
         }
 
-        common_log(LOG_DEBUG, "Saving poll: $p->id $p->uri");
+        common_debug("Saving poll: $p->id $p->uri");
         $p->insert();
 
         // TRANS: Notice content creating a poll.