Plugin Directory

Changeset 969858


Ignore:
Timestamp:
08/21/2014 04:50:36 PM (12 years ago)
Author:
hawk__
Message:

Integrated changes from http://vitoriodelage.wordpress.com/2014/06/06/add-missing-wpsql_errno-in-pg4wp-plugin/
Changes for 1.3.1 release

Location:
postgresql-for-wordpress/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • postgresql-for-wordpress/trunk/pg4wp/db.php

    r557873 r969858  
    44Plugin URI: http://www.hawkix.net
    55Description: PG4WP is a special 'plugin' enabling WordPress to use a PostgreSQL database.
    6 Version: 1.3.0+
     6Version: 1.3.1
    77Author: Hawk__
    88Author URI: http://www.hawkix.net
     
    1919// If you just want to log queries that generate errors, leave PG4WP_DEBUG to "false"
    2020// and set this to true
    21 define( 'PG4WP_LOG_ERRORS', true);
     21define( 'PG4WP_LOG_ERRORS', false);
    2222
    2323// If you want to allow insecure configuration (from the author point of view) to work with PG4WP,
  • postgresql-for-wordpress/trunk/pg4wp/driver_pgsql.php

    r557852 r969858  
    5656    function wpsql_real_escape_string($s,$c=NULL) { return pg_escape_string($s); }
    5757    function wpsql_get_server_info() { return '5.0.30'; } // Just want to fool wordpress ...
     58   
     59/**** Modified version of wpsql_result() is at the bottom of this file
    5860    function wpsql_result($result, $i, $fieldname)
    5961        { return pg_fetch_result($result, $i, $fieldname); }
     62****/
    6063
    6164    // This is a fake connection except during installation
     
    481484        return $sql;
    482485    }
     486
     487/*
     488    Quick fix for wpsql_result() error and missing wpsql_errno() function
     489    Source : http://vitoriodelage.wordpress.com/2014/06/06/add-missing-wpsql_errno-in-pg4wp-plugin/
     490*/
     491    function wpsql_result($result, $i, $fieldname = null) {
     492        if (is_resource($result)) {
     493            if ($fieldname) {
     494                return pg_fetch_result($result, $i, $fieldname);
     495            } else {
     496                return pg_fetch_result($result, $i);
     497            }
     498        }
     499    }
     500   
     501    function wpsql_errno( $connection) {
     502        $result = pg_get_result($connection);
     503        $result_status = pg_result_status($result);
     504        return pg_result_error_field($result_status, PGSQL_DIAG_SQLSTATE);
     505    }
  • postgresql-for-wordpress/trunk/readme.txt

    r557870 r969858  
    55Requires at least: 2.9.2
    66Tested up to: 3.4
    7 Stable tag: 1.3.0
     7Stable tag: 1.3.1
    88License: GPLv2 or later
    99
     
    6666
    6767== Changelog ==
     68
     69= 1.3.1 =
     70* 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
    6871
    6972= 1.3.0 =
Note: See TracChangeset for help on using the changeset viewer.