diff --git a/plugins/GNUsocialPhotos/actions/photo.php b/plugins/GNUsocialPhotos/actions/photo.php index 5eb91cbe68..5150cf7071 100644 --- a/plugins/GNUsocialPhotos/actions/photo.php +++ b/plugins/GNUsocialPhotos/actions/photo.php @@ -50,7 +50,7 @@ class PhotoAction extends Action $this->user = Profile::staticGet('id', $this->notice->profile_id); - $notices = Notice::conversationStream((int)$this->photoid-1, null, null); //Why do I have to do -1? + $notices = Notice::conversationStream((int)$this->notice->conversation, null, null); //Why do I have to do -1? $this->conversation = new ConversationTree($notices, $this); return true; diff --git a/plugins/GNUsocialPhotos/classes/gnusocialphoto.php b/plugins/GNUsocialPhotos/classes/gnusocialphoto.php index 34daff73bb..70716340d9 100644 --- a/plugins/GNUsocialPhotos/classes/gnusocialphoto.php +++ b/plugins/GNUsocialPhotos/classes/gnusocialphoto.php @@ -75,7 +75,7 @@ class GNUsocialPhoto extends Memcached_DataObject 'uri' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL, 'thumb_uri' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL, 'title' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL, - 'photo_description' => DB_DATAOBJECT_TXT + DB_DATAOBJECT_NOTNULL); + 'photo_description' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL); } function keys() @@ -100,7 +100,7 @@ class GNUsocialPhoto extends Memcached_DataObject $photo->uri = $uri; $photo->album_id = $album_id; if(!empty($title)) $photo->title = $title; - if(!empty($photo_description)) $photo->photo_description = $photo_description; + if(!empty($photo_description)) $photo->photo_description = (string)$photo_description; if($insert_now) { $notice = Notice::saveNew($profile_id, $uri, $source);