Hack for WP using meta_value = integer (instead of text)
git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@196866 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
@@ -157,6 +157,10 @@
|
|||||||
if( false !== strpos( $sql, 'USE INDEX (comment_date_gmt)'))
|
if( false !== strpos( $sql, 'USE INDEX (comment_date_gmt)'))
|
||||||
$sql = str_replace( 'USE INDEX (comment_date_gmt)', '', $sql);
|
$sql = str_replace( 'USE INDEX (comment_date_gmt)', '', $sql);
|
||||||
|
|
||||||
|
// WP 2.9.1 uses a comparison where text data is not quoted
|
||||||
|
$pattern = '/AND meta_value = (-?\d+)/';
|
||||||
|
$sql = preg_replace( $pattern, 'AND meta_value = \'$1\'', $sql);
|
||||||
|
|
||||||
// ZdMultiLang support hacks
|
// ZdMultiLang support hacks
|
||||||
$sql = preg_replace( '/post_type="([^"]+)"/', 'post_type=\'$1\'', $sql);
|
$sql = preg_replace( '/post_type="([^"]+)"/', 'post_type=\'$1\'', $sql);
|
||||||
$sql = str_replace( 'link_url o_url', 'link_url AS o_url', $sql);
|
$sql = str_replace( 'link_url o_url', 'link_url AS o_url', $sql);
|
||||||
|
@@ -50,6 +50,8 @@ There is no screenshot for this plugin
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.1.0rc =
|
||||||
|
* Hack for WP using meta_value = integer (instead of text)
|
||||||
* Moved parts required only when installing/upgrading from driver_pgsql.php to a separate file
|
* Moved parts required only when installing/upgrading from driver_pgsql.php to a separate file
|
||||||
The file is loaded only when needed so that memory footprint should be a bit smaller
|
The file is loaded only when needed so that memory footprint should be a bit smaller
|
||||||
* Added UNIX_TIMESTAMP support
|
* Added UNIX_TIMESTAMP support
|
||||||
|
Reference in New Issue
Block a user