]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/conversation.php
counter in notice/message form uses global variable for max length
[quix0rs-gnu-social.git] / actions / conversation.php
index e0fb08fa764cd408d382b0e26465376841b63a54..6b5d8d54d9cc088e4ab96ed9854682968396115d 100644 (file)
@@ -31,6 +31,9 @@ if (!defined('LACONICA')) {
     exit(1);
 }
 
+// XXX: not sure how to do paging yet,
+// so set a 60-notice limit
+
 require_once INSTALLDIR.'/lib/noticelist.php';
 
 /**
@@ -107,12 +110,17 @@ class ConversationAction extends Action
 
     function showContent()
     {
-        $notices = Notice::conversationStream($this->id, 0, null);
+        $notices = Notice::conversationStream($this->id, null, null);
 
         $ct = new ConversationTree($notices, $this);
 
         $cnt = $ct->show();
     }
+
+    function isReadOnly()
+    {
+        return true;
+    }
 }
 
 /**
@@ -140,9 +148,7 @@ class ConversationTree extends NoticeList
 
     function show()
     {
-        $cnt = 0;
-
-        $this->_buildTree();
+        $cnt = $this->_buildTree();
 
         $this->out->elementStart('div', array('id' =>'notices_primary'));
         $this->out->element('h2', null, _('Notices'));
@@ -161,6 +167,8 @@ class ConversationTree extends NoticeList
 
     function _buildTree()
     {
+        $cnt = 0;
+
         $this->tree  = array();
         $this->table = array();
 
@@ -181,6 +189,8 @@ class ConversationTree extends NoticeList
                 $this->tree[$notice->reply_to] = array($notice->id);
             }
         }
+
+        return $cnt;
     }
 
     /**