In wp-admin/includes/upgrade.php, remove dead code:

* In `maybe_create_table()` and `maybe_add_column()`, the response of `$wpdb->query()` is set to a variable that is never used.
* In `make_db_current_silent()`, which is a wrapper for `dbDelta`, a variable is set that is not used. This function appears to be a copy-paste of `make_db_current()`'s `dbDelta()` call but is meant to return nothing, and still does not.  

See #27882.

Built from https://develop.svn.wordpress.org/trunk@28305


git-svn-id: http://core.svn.wordpress.org/trunk@28133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-05-06 17:27:15 +00:00
parent aaa3eb07ad
commit c2d44c5736

View File

@ -1385,7 +1385,7 @@ function maybe_create_table($table_name, $create_ddl) {
if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name )
return true;
//didn't find it try to create it.
$q = $wpdb->query($create_ddl);
$wpdb->query($create_ddl);
// we cannot directly tell that whether this succeeded!
if ( $wpdb->get_var("SHOW TABLES LIKE '$table_name'") == $table_name )
return true;
@ -1447,7 +1447,7 @@ function maybe_add_column($table_name, $column_name, $create_ddl) {
}
}
//didn't find it try to create it.
$q = $wpdb->query($create_ddl);
$wpdb->query($create_ddl);
// we cannot directly tell that whether this succeeded!
foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) {
if ($column == $column_name) {
@ -1794,7 +1794,7 @@ function make_db_current( $tables = 'all' ) {
* @since 1.5.0
*/
function make_db_current_silent( $tables = 'all' ) {
$alterations = dbDelta( $tables );
dbDelta( $tables );
}
/**