From 0f00a46d2aac7cda8c05829cb43261038f0817f2 Mon Sep 17 00:00:00 2001 From: hawk__ Date: Tue, 2 Aug 2011 00:11:18 +0000 Subject: [PATCH] More specific handling of "comment_ID" badly written from Akismet git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@418105 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- pg4wp/driver_pgsql.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pg4wp/driver_pgsql.php b/pg4wp/driver_pgsql.php index cc0341c..8f4eff2 100644 --- a/pg4wp/driver_pgsql.php +++ b/pg4wp/driver_pgsql.php @@ -299,8 +299,9 @@ // Remove illegal characters $sql = str_replace('`', '', $sql); - // Akismet sometimes doesn't write 'comment_ID' with 'ID' in capitals ... - $sql = str_replace(' comment_id ', ' comment_ID ', $sql); + // Akismet sometimes doesn't write 'comment_ID' with 'ID' in capitals where needed ... + if( false !== strpos( $sql, $table_prefix.'comments')) + $sql = str_replace(' comment_id ', ' comment_ID ', $sql); // Field names with CAPITALS need special handling if( false !== strpos($sql, 'ID'))