PHP5-port - move of wpdb::check_database_version()
|Reported by:||hakre||Owned by:|
The function wpdb::check_database_version() is doing a check of the database version against a needed database version. The database server version is returned from $this->db_version(), the required database version is in a global variable called $required_mysql_version.
This keeps the database code coupled to the global variable while the class is made to be replaced, e.g. for other database abstractions (compare #14508 which is made for extends wpdb). Normally the database class is a singleton in a global variable already.
Therefore this mixes global with local space twice. I suggest to de-couple wpdb a bit from that hardencoded global variable name and move the code out of the wpdb class into that alread existing global function called wp_check_mysql_version().
This should make the database interface a bit more lightweight which could be a benefit when porting to PHP5.