modify some functions and reinsert the missing to opensim.mysql.php