From efb38685f825026e3114ca778e07e8b7c415cec2 Mon Sep 17 00:00:00 2001 From: azaozz Date: Sun, 10 Aug 2008 23:13:39 +0000 Subject: [PATCH] Prevent fatal error if plugin uses install-helper.php, fixes #6747 for 2.7 git-svn-id: http://svn.automattic.com/wordpress/trunk@8610 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install-helper.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/install-helper.php b/wp-admin/install-helper.php index 8f0441810c..eebe0e3e9d 100644 --- a/wp-admin/install-helper.php +++ b/wp-admin/install-helper.php @@ -9,6 +9,7 @@ $debug = 0; ** Returns: true if already exists or on successful completion ** false on error */ +if ( ! function_exists('maybe_create_table') ) : function maybe_create_table($table_name, $create_ddl) { global $wpdb; foreach ($wpdb->get_col("SHOW TABLES",0) as $table ) { @@ -26,6 +27,7 @@ function maybe_create_table($table_name, $create_ddl) { } return false; } +endif; /** ** maybe_add_column() @@ -33,6 +35,7 @@ function maybe_create_table($table_name, $create_ddl) { ** Returns: true if already exists or on successful completion ** false on error */ +if ( ! function_exists('maybe_add_column') ) : function maybe_add_column($table_name, $column_name, $create_ddl) { global $wpdb, $debug; foreach ($wpdb->get_col("DESC $table_name",0) as $column ) { @@ -51,7 +54,7 @@ function maybe_add_column($table_name, $column_name, $create_ddl) { } return false; } - +endif; /** ** maybe_drop_column()