Bug fix and code cleanup (fixes #606)

This PR does three things:
1. Fixes #606
2. Removes references to $modSettings['disable_log_report'] which doesn't appear anywhere else in SMF
3. General code cleanup related to point 2