De-duplicate onBeforeUpdate and onBeforeInsert in database_edit.php
It annoyed me that a huge chunk of code was duplicated between onBeforeUpdate() and onBeforeInsert() in database_edit.php, and a few subtle differences had already crept up... bugs.
E.g. on Insert we were not checking is a database_user was filled in, but in the update method we call an error database_user_missing_txt for it.