BoardIndex query
WHERE {query_see_board}' . (empty($boardIndexOptions['countChildPosts']) ? (empty($boardIndexOptions['base_level']) ? '' : '
AND b.child_level >= {int:child_level}') : '
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)),
So: - if we are
- not counting messages in childboards
- and base_level is 0 (i.e. we are in the BordIndex)
we retrieve all the boards - instead if we are
- not counting messages in childboards
- and base_level is not 0 (i.e. into a board)
we grab everything with child_lever higher than what we are looking for - finally if we are
- counting posts in child boards (and some them up to the parents)
we grab only the boards between base_level and base_level + 1
It's only me or that sounds odd?