]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialVideo/classes/Video.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / GNUsocialVideo / classes / Video.php
index 0311ee596ce9fcdd86fe0735445bfb38aa2ed9e9..9ba395d8cad839157f6f6a3ee75a0528280cda1b 100644 (file)
@@ -39,11 +39,11 @@ class Video extends Managed_DataObject
 
     public $__table = 'video'; // table name
     public $id;                // char (36) // UUID
-    public $uri;               // varchar (255)  // This is the corresponding notice's uri.
-    public $url;               // varchar (255)
+    public $uri;               // varchar (191)   This is the corresponding notice's uri.   not 255 because utf8mb4 takes more space
+    public $url;               // varchar (191)   not 255 because utf8mb4 takes more space
     public $profile_id;        // int
 
-    public static function getByNotice($notice)
+    public static function getByNotice(Notice $notice)
     {
         return self::getKV('uri', $notice->uri);
     }
@@ -63,10 +63,10 @@ class Video extends Managed_DataObject
                               'not null' => true,
                               'description' => 'UUID'),
                 'uri' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'url' => array('type' => 'varchar',
-                               'length' => 255,
+                               'length' => 191,
                                'not null' => true),
                 'profile_id' => array('type' => 'int', 'not null' => true),
             ),
@@ -75,7 +75,7 @@ class Video extends Managed_DataObject
         );
     }
 
-    function saveNew($profile, $url, $options=array())
+    static function saveNew(Profile $profile, $url, array $options=array())
     {
         $vid = new Video();