Skip to content
Browse files

Prevent fatal error if plugin uses install-helper.php, fixes #6747 fo…

…r 2.6.1

git-svn-id: http://svn.automattic.com/wordpress/branches/2.6@8611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 627cd82 commit 1076eec0751feebed32a92e7d14eddb86d2c1fdf azaozz committed Aug 10, 2008
Showing with 4 additions and 1 deletion.
  1. +4 −1 wp-admin/install-helper.php
View
5 wp-admin/install-helper.php
@@ -9,6 +9,7 @@
** 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,13 +27,15 @@ function maybe_create_table($table_name, $create_ddl) {
}
return false;
}
+endif;
/**
** maybe_add_column()
** Add column to db table if it doesn't exist.
** 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()

0 comments on commit 1076eec

Please sign in to comment.
Something went wrong with that request. Please try again.