Improved support for PostgreSQL and PHP 5.3.x

druido - October 11, 2009 - 16:18
Project:Bibliography Module
Version:6.x-1.7
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:fixed
Description

Hi,
attached you find a patch for biblio_pages.inc that fixes a few errors of the type:

ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list

when using PostgreSQL, and an error due to using COUNT() with multiple arguments (which is non-standard SQL, as far as I know). The patch shouldn't break anything for MySQL users.

I also attach a patch for biblio_theme.inc that changes a couple of reference parameters. I made such changes because I started to get errors like

Parameter 1 to theme_biblio_filters() expected to be a reference, value given

in PHP 5.3.0.

The patches are against Biblio 6.x-1.7. I hope not to see any more errors with PostgreSQL starting with the next release :)

AttachmentSize
biblio.pages_.inc-20091011.patch2.4 KB
biblio_theme.inc-20091011.patch975 bytes

#1

rjerome - October 12, 2009 - 01:16

Thanks very much, I'll work these into the next release.

I too am hoping that D7 is going cure all these database issues.

Ron.

#2

druido - November 11, 2009 - 20:22

I've noticed that the patch does not work correctly in MySQL. Attached you find another patch (against 6.x-1.7). Basically, instead of re-writing the query at line 415, I have commented line 172:

$count_selects[] = "bkd.word";

Actually, I don't see why $count_selects should contain more items than "DISTINCT(n.nid)". Anyway, I've tested the enclosed patch with both PostgreSQL and MySQL and it works for me.

AttachmentSize
biblio.pages_.inc_.patch 1.62 KB

#3

rjerome - November 11, 2009 - 21:03

Looks good. And just in the nick of time, I am probably going to make a new release tonight ;-)

Committed: http://drupal.org/cvs?commit=287802

Ron.

#4

rjerome - December 4, 2009 - 20:22
Status:patch (to be ported)» fixed
 
 

Drupal is a registered trademark of Dries Buytaert.