X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FGNUsocialPhoto%2Fclasses%2FPhoto.php;h=c10b64524d24dfe0a34c4785cbd37d04461880c1;hb=c09e794d81163b67fc6ab3f442927eef6f47c8bd;hp=a6e01a8c1b385f1fffdc55b4da3647b8f627efd3;hpb=07ca304c65c261ba5f825bcbe1a9c8465eedfcdf;p=quix0rs-gnu-social.git diff --git a/plugins/GNUsocialPhoto/classes/Photo.php b/plugins/GNUsocialPhoto/classes/Photo.php index a6e01a8c1b..c10b64524d 100644 --- a/plugins/GNUsocialPhoto/classes/Photo.php +++ b/plugins/GNUsocialPhoto/classes/Photo.php @@ -39,14 +39,14 @@ class Photo extends Managed_DataObject public $__table = 'photo'; // table name public $id; // char (36) // UUID - public $uri; // varchar (255) // This is the corresponding notice's uri. - public $photo_uri; // varchar (255) - public $thumb_uri; // varchar (255) - public $title; // varchar (255) + public $uri; // varchar (191) // This is the corresponding notice's uri. not 255 because utf8mb4 takes more space + public $photo_uri; // varchar (191) not 255 because utf8mb4 takes more space + public $thumb_uri; // varchar (191) not 255 because utf8mb4 takes more space + public $title; // varchar (191) not 255 because utf8mb4 takes more space public $description; // text public $profile_id; // int - public static function getByNotice($notice) + public static function getByNotice(Notice $notice) { return self::getKV('uri', $notice->uri); } @@ -66,13 +66,13 @@ class Photo extends Managed_DataObject 'not null' => true, 'description' => 'UUID'), 'uri' => array('type' => 'varchar', - 'length' => 255, + 'length' => 191, 'not null' => true), 'photo_uri' => array('type' => 'varchar', - 'length' => 255, + 'length' => 191, 'not null' => true), 'photo_uri' => array('type' => 'varchar', - 'length' => 255, + 'length' => 191, 'not null' => true), 'profile_id' => array('type' => 'int', 'not null' => true), ), @@ -81,7 +81,7 @@ class Photo extends Managed_DataObject ); } - static function saveNew(Profile $profile, $photo_uri, $thumb_uri, $title, $description, $options=array()) + static function saveNew(Profile $profile, $photo_uri, $thumb_uri, $title, $description, array $options=array()) { $photo = new Photo();