First, thanks a million for the hugh effort in integrating this into drupal. Kudos!! lots of them.

My setup is drupal 5.2 over PostgreSQL 8.2 on Mac OS X Server.

The module installed just fine, but when I go to view the image from the random block, I get the following two errors.

* warning: pg_query() [function.pg-query]: Query failed: ERROR: function concat(text) does not exist at character 160 HINT: No function matches the given name and argument types. You may need to add explicit type casts. in /Library/WebServer/Documents/includes/database.pgsql.inc on line 125.
* user warning: query: SELECT COUNT(n.nid) FROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE n.type <> 'acidfree' AND tn.tid = 24 AND (n.moderate = 0 AND n.status = 1) AND CONCAT(LPAD(9999999999 - n.nid, 10, '0')) < '9999999850' in /Library/WebServer/Documents/includes/database.pgsql.inc on line 144.

Any suggestions on what I need to do to solve this issue?
Thanks a million.

CommentFileSizeAuthor
#1 acidfree.module_3.patch384 bytespillarsdotnet

Comments

pillarsdotnet’s picture

Status: Active » Needs review
StatusFileSize
new384 bytes

Here's a patch that works for me.

--- orig/acidfree/acidfree.module       2007-08-14 14:02:38.000000000 -0400
+++ patched/acidfree/acidfree.module    2007-09-14 14:10:28.000000000 -0400
@@ -2453,7 +2467,11 @@
     return implode('', $filter);
   }
   else {
-    return 'CONCAT('. implode(', ', $filter) .')';
+    if (count($filter)>1) {
+      return 'CONCAT('. implode(', ', $filter) .')';
+    } else {
+      return $filter[0];
+    }
   }
 }

vhmauery’s picture

Status: Needs review » Closed (fixed)

Fixed in CVS