From 79a3ad03ae91cab4c63171e691914ace0c911775 Mon Sep 17 00:00:00 2001 From: hawk__ Date: Sat, 27 Aug 2011 00:32:14 +0000 Subject: [PATCH] Modified the way install/upgrade code is detected git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@429282 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pg4wp/driver_pgsql.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index f5dd99a..1243579 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -308,7 +308,9 @@ $sql = "SET NAMES 'utf8'"; } // Load up upgrade and install functions as required - elseif( 0 === strpos( $sql, 'CREATE') || (defined('WP_INSTALLING') && WP_INSTALLING)) + $begin = substr( $sql, 0, 3); + $search = array( 'SHO', 'ALT', 'DES', 'CRE'); + if( in_array($begin, $search)) { require_once( PG4WP_ROOT.'/driver_pgsql_install.php'); $sql = pg4wp_installing( $sql, $logto);