mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2026-01-27 00:42:18 +01:00
Add support for DATE_SUB for Akismet 2.2.7
git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@195975 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
@@ -257,6 +257,8 @@
|
||||
|
||||
// The following handles a new "INTERVAL" call in Akismet 2.2.7
|
||||
$sql = str_replace('INTERVAL 15 DAY', "'15 days'::interval", $sql);
|
||||
$pattern = '/DATE_SUB[ ]*\(([^,]+),([^\)]+)\)/';
|
||||
$sql = preg_replace( $pattern, '($1::timestamp - $2)', $sql);
|
||||
|
||||
// Field names with CAPITALS need special handling
|
||||
if( false !== strpos($sql, 'ID'))
|
||||
|
||||
Reference in New Issue
Block a user