Skip to content

Commit

Permalink
Merge pull request #1493 from mambax7/feature/issue1335
Browse files Browse the repository at this point in the history
fix #1335
  • Loading branch information
GregMage authored Jan 13, 2025
2 parents 4784f2a + 358b339 commit 65a7bf8
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 65a7bf8

Please sign in to comment.