I can't work out how to filter using the Up field without using the Type field.
The function reference says:
mgd_list_topic_articles_all
(int topic, string [sort], int [type], int [up])I tried various combinations:
This is fine:
mgd_list_topic_articles_all( 28, "reverse created", 1)
and this is fine:
mgd_list_topic_articles_all( 15, "reverse created", 1, 25)
but this returns nothing:
mgd_list_topic_articles_all( 15, "reverse created", "",25)
I looked up the MySQL logs and found that when I put an empty string as the type, it defaults to zero. the relevant fragment is:
WHERE (article.type=0 AND article.topic IN (55) AND (article.up=25 OR 1=0)
This behaviour goes against what is in the comments in the annotated manual at
http://midgard-project.org/manual/en/function.list-topic-articles-all.php
Does anyone know what's going on here?
Thanks
James
