X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-admin/install-helper.php diff --git a/wp-admin/install-helper.php b/wp-admin/install-helper.php index c654a92b..9d241d29 100644 --- a/wp-admin/install-helper.php +++ b/wp-admin/install-helper.php @@ -57,9 +57,10 @@ function maybe_create_table($table_name, $create_ddl) { return true; } } - //didn't find it try to create it. + // Didn't find it, so try to create it. $wpdb->query($create_ddl); - // we cannot directly tell that whether this succeeded! + + // We cannot directly tell that whether this succeeded! foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { if ($table == $table_name) { return true; @@ -90,9 +91,11 @@ function maybe_add_column($table_name, $column_name, $create_ddl) { return true; } } - //didn't find it try to create it. + + // Didn't find it, so try to create it. $wpdb->query($create_ddl); - // we cannot directly tell that whether this succeeded! + + // We cannot directly tell that whether this succeeded! foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { if ($column == $column_name) { return true; @@ -118,9 +121,11 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) { global $wpdb; foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { if ($column == $column_name) { - //found it try to drop it. + + // Found it, so try to drop it. $wpdb->query($drop_ddl); - // we cannot directly tell that whether this succeeded! + + // We cannot directly tell that whether this succeeded! foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { if ($column == $column_name) { return false; @@ -128,7 +133,7 @@ function maybe_drop_column($table_name, $column_name, $drop_ddl) { } } } - // else didn't find it + // Else didn't find it. return true; } @@ -167,7 +172,8 @@ function check_column($table_name, $col_name, $col_type, $is_null = null, $key = foreach ($results as $row ) { if ($row->Field == $col_name) { - // got our column, check the params + + // Got our column, check the params. if (($col_type != null) && ($row->Type != $col_type)) { ++$diffs; }