Removing unused code, removing dbname validation.
Adding api_error_log() and api_elog alias.
Minor - format code.
Merge branch '1.9.x' of github.com:chamilo/chamilo-lms into nuevo