Commit 9e933511 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Hide draft posts in recentposts blocks (bug 3295)

parent e92f5655
......@@ -51,6 +51,7 @@ class PluginBlocktypeRecentposts extends PluginBlocktype {
'SELECT a.title, ' . db_format_tsfield('a.ctime', 'ctime') . ', p.title AS parenttitle, a.id, a.parent
FROM {artefact} a
JOIN {artefact} p ON a.parent = p.id
JOIN {artefact_blog_blogpost} ab ON (ab.blogpost = a.id AND ab.published = 1)
WHERE a.artefacttype = \'blogpost\'
AND a.parent IN ( ' . $artefactids . ' )
AND a.owner = (SELECT owner from {view} WHERE id = ?)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment