OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 16-Jun-2008 18:11:19
Branch: HEAD Handle: 2008061617111300
Modified files:
openpkg-src/drupal drupal.patch drupal.spec
Log:
fix helpers module for PostgreSQL usage
Summary:
Revision Changes Path
1.24 +61 -1 openpkg-src/drupal/drupal.patch
1.280 +1 -1 openpkg-src/drupal/drupal.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/drupal/drupal.patch
============================================================================
$ cvs diff -u -r1.23 -r1.24 drupal.patch
--- openpkg-src/drupal/drupal.patch 14 Jun 2008 14:26:34 -0000 1.23
+++ openpkg-src/drupal/drupal.patch 16 Jun 2008 16:11:13 -0000 1.24
@@ -330,7 +330,7 @@
--- /dev/null 2008-05-02 21:08:21 +0200
+++ sites/all/modules/img_assist/img_assist_popup.js 2008-05-02 21:05:56
+0200
@@ -0,0 +1,20 @@
-+/* $Id: drupal.patch,v 1.23 2008/06/14 14:26:34 rse Exp $ */
++/* $Id: drupal.patch,v 1.24 2008/06/16 16:11:13 rse Exp $ */
+
+function launch_popup(nid, mw, mh) {
+ var ox = mw;
@@ -784,3 +784,63 @@
}
}
+-----------------------------------------------------------------------------
+
+Fix helpers module for PostgreSQL usage.
+
+Index: sites/all/modules/helpers/helpers_database.module
+--- sites/all/modules/helpers/helpers_database.module.orig 2008-04-23
04:38:34 +0200
++++ sites/all/modules/helpers/helpers_database.module 2008-06-16
18:06:41 +0200
+@@ -16,7 +16,7 @@
+ *
+ * NOTE: This is open code - do not put a function declaration on it.
+ */
+- $db_types = array('mysql', 'mysqli', 'postgres');
++ $db_types = array('mysql', 'mysqli', 'pgsql');
+ $dbtype = $GLOBALS['db_type'];
+ if (in_array($dbtype, $db_types)) {
+ // Using include because the site may not be using this so we don't
want a fatal error.
+Index: sites/all/modules/helpers/includes/dra_pgsql.inc
+--- sites/all/modules/helpers/includes/dra_pgsql.inc.orig 2008-06-16
17:49:43 +0200
++++ sites/all/modules/helpers/includes/dra_pgsql.inc 2008-06-16 18:05:19
+0200
+@@ -0,0 +1,40 @@
++<?php
++/* $Id */
++ /**
++ * Return a result array from the previous query. PostgreSql version.
++ * This is very handy for building an option list for a form element.
++ *
++ * @param $result
++ * A database query result resource, as returned from db_query().
++ * @return
++ * The resulting array or FALSE.
++ * If the query contains -- the result array would be
++ * 0 columns (bool)FALSE
++ * 1 column value => value
++ * 2 columns 1st value => 2nd value
++ * 3 or more 1st value => array(2nd value, 3rd value,
...)
++ */
++function db_result_array($result) {
++ $array = array();
++ while ($row = pg_fetch_array($result, NULL, PGSQL_NUM)) {
++ $y = count($row);
++ switch ($y) {
++ case 0:
++ drupal_set_message(t('Db_result_array found no columns in the
result set.'), 'error');
++ return false;
++
++ case 1:
++ $array[$row[0]] = $row[0];
++ break;
++
++ case 2:
++ $array[$row[0]] = $row[1];
++ break;
++
++ default:
++ $array[$row[0]] = array_slice($row, 1);
++ break;
++ }
++ }
++ return $array;
++}
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/drupal/drupal.spec
============================================================================
$ cvs diff -u -r1.279 -r1.280 drupal.spec
--- openpkg-src/drupal/drupal.spec 14 Jun 2008 09:30:53 -0000 1.279
+++ openpkg-src/drupal/drupal.spec 16 Jun 2008 16:11:13 -0000 1.280
@@ -225,7 +225,7 @@
Group: CMS
License: GPL
Version: %{V_drupal}
-Release: 20080614
+Release: 20080616
# package options
%option with_mysql yes
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]