Repository navigation
fix for #1519 - #1521
fix for #1519#1521
Conversation
|
Do we also need to handle module id -1 (_AM_SYSTEM_BLOCKS_TOPPAGE) |
|
Good point! Any code suggestions? Could you make PR? |
|
there is a problem: if we allow module id -1 or module id 0 without checking the module activeness then we have the same as in past time (blocks of inactive modules causing problems) |
|
I haven't looked into blocks for a while. Maybe we are handling module_id -1 correctly. For the tables, is:
b.mid of 0 are custom/new blocks? |
|
the new code is fine. we have two possibilities:
at this stage it doesn't matter where it is to show (top page, all pages,...) because this is handled by the next lines |
|
How about this: $sql = 'SELECT b.* FROM ' . $db->prefix('newblocks') . ' b ' .
'JOIN ' . $db->prefix('block_module_link') . ' m ON m.block_id = b.bid ' .
'LEFT JOIN ' . $db->prefix('modules') . ' mo ON mo.mid = b.mid ' .
'WHERE b.isactive = ' . $isactive . ' ' .
'AND ( (b.mid = 0) OR (b.mid > 0 AND mo.mid IS NOT NULL AND mo.isactive = ' . $isactive . ') )';This ensures:
Fixes the inactive module issue: blocks tied to inactive modules won’t show, even if m.module_id = -1 or 0. |
|
more in detail, but it is very fine :) |
|
This request is crazy !!! |
fix for #1519: New block doesn't show