Skip to content

Commit

Permalink
fix #1335
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Jan 9, 2025
1 parent eb343fb commit 358b339
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions htdocs/kernel/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,10 @@ public function getAllByGroupModule($groupid, $module_id = 0, $toponlyblock = fa
return $blockids;
}
}
$sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b, ' . $db->prefix('block_module_link') . ' m WHERE m.block_id=b.bid';
$sql .= ' AND b.isactive=' . $isactive;
$sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b
JOIN ' . $db->prefix('block_module_link') . ' m ON m.block_id = b.bid
JOIN ' . $db->prefix('modules') . ' mo ON mo.mid = b.mid
WHERE b.isactive =' . $isactive . ' AND mo.isactive =' . $isactive;
if (isset($visible)) {
$sql .= ' AND b.visible=' . (int) $visible;
}
Expand Down

0 comments on commit 358b339

Please sign in to comment.