From a6bf28f3ee427c6c504fa6f01afd6db1f5e0a3f6 Mon Sep 17 00:00:00 2001 From: Max Shinn Date: Mon, 27 Dec 2010 16:39:21 -0600 Subject: [PATCH] Fixing photo page replies and descriptions --- plugins/GNUsocialPhotos/actions/photo.php | 2 +- plugins/GNUsocialPhotos/classes/gnusocialphoto.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);