mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-06-25 09:21:44 +02:00
Corrected a problem with ID quoting when importing in WP 2.9.2
git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@557841 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
@ -292,14 +292,14 @@
|
||||
$pattern = '/LIMIT[ ]+\d+/';
|
||||
$sql = preg_replace($pattern, '', $sql);
|
||||
|
||||
// For correct ID quoting
|
||||
$pattern = '/[ ]*`([^`]*ID[^`]*)`[ ]*=/';
|
||||
$sql = preg_replace( $pattern, ' "$1" =', $sql);
|
||||
|
||||
// For correct bactick removal
|
||||
$pattern = '/[ ]*`([^` ]+)`[ ]*=/';
|
||||
$sql = preg_replace( $pattern, ' $1 =', $sql);
|
||||
|
||||
// For correct ID quoting
|
||||
$pattern = '/[ ]*([^ ]*ID[^ ]*)[ ]*=/';
|
||||
$sql = preg_replace( $pattern, ' "$1" =', $sql);
|
||||
|
||||
// WP 2.6.1 => 2.8 upgrade, removes a PostgreSQL error but there are some remaining
|
||||
$sql = str_replace( "post_date = '0000-00-00 00:00:00'", "post_date IS NULL", $sql);
|
||||
|
||||
|
Reference in New Issue
Block a user