Fix for a broken query when titlesEnable is set to false - Thanks Wancho...

See:
http://www.simplemachines.org/community/index.php?topic=504193.msg3548276#msg3548276