Corrected 2 matching that were not accurate enough

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@544607 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2012-05-15 19:01:56 +00:00
parent bdea3e9546
commit 2e144463e5

View File

@ -368,7 +368,7 @@
$sql = str_replace( 'OPTIMIZE TABLE', 'VACUUM', $sql);
}
// Handle 'SET NAMES ... COLLATE ...'
elseif( false !== strpos($sql, 'COLLATE'))
elseif( 0 === strpos($sql, 'SET NAMES') && false !== strpos($sql, 'COLLATE'))
{
$logto = 'SETNAMES';
$sql = "SET NAMES 'utf8'";
@ -406,7 +406,7 @@
$sql = preg_replace($pattern, '( ID', $sql);
$pattern = '/,ID/';
$sql = preg_replace($pattern, ', ID', $sql);
$pattern = '/[a-zA-Z_]+ID/';
$pattern = '/[0-9a-zA-Z_]+ID/';
$sql = preg_replace($pattern, '"$0"', $sql);
$pattern = '/\.ID/';
$sql = preg_replace($pattern, '."ID"', $sql);