Commit 98b850c5 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1951016: Blocks not being turned off on gridstack pages



When a blocktype is set to hidden (inactive) on the plugins page then
instances of the blocktype should not show on pages anymore unless we
are in versioning mode

Change-Id: I9901e18cc84a102227f4e75b57d0d84f838c6644
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit d9177ea4)
parent 55e794d7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2081,11 +2081,12 @@ class View {
            SELECT bi.id, bi.view, bi.row, bi.column, bi.order,
            positionx, positiony, width, height, blocktype, title, configdata
            FROM {block_instance_dimension} bd
            INNER JOIN {block_instance} bi
            ON bd.block = bi.id
            INNER JOIN {block_instance} bi ON bd.block = bi.id
            INNER JOIN {blocktype_installed} bt ON bt.name = bi.blocktype
            WHERE bi.view = ?
            AND bt.active = ?
            ORDER BY positiony, positionx';
            $blocks = get_records_sql_array($sql, array($this->get('id')));
            $blocks = get_records_sql_array($sql, array($this->get('id'), 1));
        }
        else {
            $blocks = $versioning->blocks;