Commit eb15bc2f authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Respect viewtype when building blocktype list for categories

parent 56edec15
......@@ -167,9 +167,10 @@ abstract class PluginBlocktype extends Plugin {
$sql = 'SELECT bti.name, bti.artefactplugin
FROM {blocktype_installed} bti
JOIN {blocktype_installed_category} btic ON btic.blocktype = bti.name
WHERE btic.category = ? AND bti.active = 1
JOIN {blocktype_installed_viewtype} btiv ON btiv.blocktype = bti.name
WHERE btic.category = ? AND bti.active = 1 AND btiv.viewtype = ?
ORDER BY bti.name';
if (!$bts = get_records_sql_array($sql, array($category))) {
if (!$bts = get_records_sql_array($sql, array($category, $view->get('type')))) {
return false;
}
......
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