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
This commit is contained in:
hawk__
2011-08-27 00:32:14 +00:00
parent e0f6734b01
commit 79a3ad03ae

View File

@ -308,7 +308,9 @@
$sql = "SET NAMES 'utf8'"; $sql = "SET NAMES 'utf8'";
} }
// Load up upgrade and install functions as required // 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'); require_once( PG4WP_ROOT.'/driver_pgsql_install.php');
$sql = pg4wp_installing( $sql, $logto); $sql = pg4wp_installing( $sql, $logto);