Plugin Directory

Changeset 546507


Ignore:
Timestamp:
05/20/2012 10:24:18 AM (14 years ago)
Author:
hawk__
Message:

Moved the quoting hacks for PostgreSQL 9.1+ compatibility so that they apply to all queries

File:
1 edited

Legend:

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

    r544614 r546507  
    281281            $sql = str_replace( "post_date = '0000-00-00 00:00:00'", "post_date IS NULL", $sql);
    282282           
    283             // Correct quoting for PostgreSQL 9.1+ compatibility
    284             $sql = str_replace( "\\'", "''", $sql);
    285             $sql = str_replace( '\"', '"', $sql);
    286            
    287283            // This will avoid modifications to anything following ' SET '
    288284            list($sql,$end) = explode( ' SET ', $sql, 2);
     
    329325            if( preg_match('/^.{1}/us',$sql,$ar) != 1)
    330326                $sql = utf8_encode($sql);
    331            
    332             // Correct quoting for PostgreSQL 9.1+ compatibility
    333             $sql = str_replace( "\\'", "''", $sql);
    334             $sql = str_replace( '\"', '"', $sql);
    335327           
    336328            // This will avoid modifications to anything following ' VALUES'
     
    440432        $sql .= $end;
    441433       
     434        // Correct quoting for PostgreSQL 9.1+ compatibility
     435        $sql = str_replace( "\\'", "''", $sql);
     436        $sql = str_replace( '\"', '"', $sql);
     437       
    442438        if( PG4WP_DEBUG)
    443439        {
Note: See TracChangeset for help on using the changeset viewer.