- make sql portable - bring all sql inline - reduce query duplication - simplify if idioms - fix UI by unclobbering revision_id variable and allowing to select revision correctly
If the comment has a file attached, the comment content was being displayed using the attachement's mime type. Well, the script tried to, typically it would cause the script to bomb.