Changes for 1.3.1 release

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@969858 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2014-08-21 16:50:36 +00:00
parent fb058eda35
commit b67e7c6780
3 changed files with 29 additions and 3 deletions

View File

@ -3,7 +3,7 @@
Plugin Name: PostgreSQL for WordPress (PG4WP)
Plugin URI: http://www.hawkix.net
Description: PG4WP is a special 'plugin' enabling WordPress to use a PostgreSQL database.
Version: 1.3.0+
Version: 1.3.1
Author: Hawk__
Author URI: http://www.hawkix.net
License: GPLv2 or newer.
@ -18,7 +18,7 @@ define('DB_DRIVER', 'pgsql'); // 'pgsql' or 'mysql' are supported for now
define( 'PG4WP_DEBUG', false);
// If you just want to log queries that generate errors, leave PG4WP_DEBUG to "false"
// and set this to true
define( 'PG4WP_LOG_ERRORS', true);
define( 'PG4WP_LOG_ERRORS', false);
// If you want to allow insecure configuration (from the author point of view) to work with PG4WP,
// change this to true

View File

@ -55,8 +55,11 @@
function wpsql_escape_string($s) { return pg_escape_string($s); }
function wpsql_real_escape_string($s,$c=NULL) { return pg_escape_string($s); }
function wpsql_get_server_info() { return '5.0.30'; } // Just want to fool wordpress ...
/**** Modified version of wpsql_result() is at the bottom of this file
function wpsql_result($result, $i, $fieldname)
{ return pg_fetch_result($result, $i, $fieldname); }
****/
// This is a fake connection except during installation
function wpsql_connect($dbserver, $dbuser, $dbpass)
@ -480,3 +483,23 @@
}
return $sql;
}
/*
Quick fix for wpsql_result() error and missing wpsql_errno() function
Source : http://vitoriodelage.wordpress.com/2014/06/06/add-missing-wpsql_errno-in-pg4wp-plugin/
*/
function wpsql_result($result, $i, $fieldname = null) {
if (is_resource($result)) {
if ($fieldname) {
return pg_fetch_result($result, $i, $fieldname);
} else {
return pg_fetch_result($result, $i);
}
}
}
function wpsql_errno( $connection) {
$result = pg_get_result($connection);
$result_status = pg_result_status($result);
return pg_result_error_field($result_status, PGSQL_DIAG_SQLSTATE);
}

View File

@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: database, postgresql, PostgreSQL, postgres, mysql
Requires at least: 2.9.2
Tested up to: 3.4
Stable tag: 1.3.0
Stable tag: 1.3.1
License: GPLv2 or later
PostgreSQL for WordPress is a special 'plugin' enabling WordPress to be used with a PostgreSQL database.
@ -66,6 +66,9 @@ There is no screenshot for this plugin
== Changelog ==
= 1.3.1 =
* Integrated changes pointed in http://vitoriodelage.wordpress.com/2014/06/06/add-missing-wpsql_errno-in-pg4wp-plugin/ to correct problems with WP 3.9.1
= 1.3.0 =
* Some cleanup in old code that is not needed anymore
* Enhanced wordpress-importer compatibility