[dev] [cvs] commit: agora/lib api.php
Vilius Šumskas
vilius at lnk.lt
Tue Oct 31 08:44:17 PST 2006
Hello Duck,
Tuesday, October 31, 2006, 6:32:14 PM, you wrote:
> duck 2006-10-31 08:32:14 PST
> Modified files:
> lib api.php
> Log:
> _agora_getThreads() was missing sort direction. This allows the
> functionality requested by ticked #3238 - to get the last X messages
> in thread. The change shouldn't brake anything since for comments _agora_doComments() is used.
I'm not sure if I understand the change correctly, but I ment "last X
_messages_ from *forum*" and I've done it in my own custom install of
Agora CVS 2006-06-XX with this SQL statement:
select a1.datatree_id, a2.attribute_value as timestamp, a3.attribute_value as author, a4.attribute_value as subject from horde_datatree_attributes as a1 left join horde_datatree_attributes as a2 on a1.datatree_id = a2.datatree_id and a2.attribute_key = 'timestamp' left join horde_datatree_attributes as a3 on a1.datatree_id = a3.datatree_id and a3.attribute_key = 'author' left join horde_datatree_attributes as a4 on a1.datatree_id = a4.datatree_id and a4.attribute_key = 'subject' where a1.attribute_value = 5396 and (a2.attribute_key = 'timestamp' or a3.attribute_key ='author' or a4.attribute_key = 'subject') order by a1.datatree_id desc limit 15
Functionality to get last X messages in thread or last X threads from forum
was long ago before that.
--
Best regards,
Vilius
More information about the dev
mailing list