I really don't like using strings for booleans. Consider changing this to a regular variable that is read from POST further up instead. Although this may be out of scope for this pull request.