Fix for a broken query when titlesEnable is set to false - Thanks Wanchope for reporting

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge branch 'release-2.1' of https://github.com/SimpleMachines/SMF2.1 into release-2.1
Merge branch 'release-2.1' of https://github.com/SimpleMachines/SMF2.1 into release-2.1
Spaces and tabs - nitpicking

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #516 from emanuele45/cleanup

Cleanup