Database layer updates (2)

A small number of updates, $smcFunc -> $db calls. Mainly a number of queries in RepairBoards and Emailuser.

I suspect it interferes with Ema's replacements, then please feel free to ignore this one (we'll close it or I'll keep it updated). These aren't many, just a quasi random set.