reformatting
Fix logic in category_get_id_by_name and use exceptions instead of $trigger_errors
Port of 7beac566f25dc30ffb3224c2823fee77c9223a1b [dregad]:

MantisGraph: incorrect issues count in graph by severity
When $g_bug_closed_status_threshold is not the "final" entry in
status_enum_string list, function enum_bug_group() in graph_api.php
computed the number of closed issues incorrectly due to use of '='
operator instead of '>=' in the query's where clause.

Also corrects some trailing whitespace.

Fixes #14356