]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixing photo page replies and descriptions
authorMax Shinn <trombonechamp@gmail.com>
Mon, 27 Dec 2010 22:39:21 +0000 (16:39 -0600)
committerMax Shinn <trombonechamp@gmail.com>
Mon, 27 Dec 2010 22:39:21 +0000 (16:39 -0600)
plugins/GNUsocialPhotos/actions/photo.php
plugins/GNUsocialPhotos/classes/gnusocialphoto.php

index 5eb91cbe68bf25246f82e8b9440239d107ee0aa3..5150cf7071d9726b5b947a18187f99f984c270fb 100644 (file)
@@ -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;
 
index 34daff73bb23ca9932b78ab27a135957d1b2f4de..70716340d9ceca15c4a157a2b68d88e8c5159e41 100644 (file)
@@ -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);