[php-horde-Horde-Db/el6] open https://github.com/horde/horde/pull/113 for php 5.3

Remi Collet remi at fedoraproject.org
Tue Nov 11 14:22:20 UTC 2014


commit a3c6ae103d2bf2a51662f597aa0ce55c4c9e9da4
Author: Remi Collet <remi at fedoraproject.org>
Date:   Tue Nov 11 15:22:09 2014 +0100

    open https://github.com/horde/horde/pull/113 for php 5.3

 Horde_Db-php53.patch    |   39 +++++++++++++++++++++++++++++++++++++++
 php-horde-Horde-Db.spec |    9 ++++++++-
 2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/Horde_Db-php53.patch b/Horde_Db-php53.patch
new file mode 100644
index 0000000..490d434
--- /dev/null
+++ b/Horde_Db-php53.patch
@@ -0,0 +1,39 @@
+From 1252e32602b9a5335668e208d93ada869f25dca5 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora at famillecollet.com>
+Date: Tue, 11 Nov 2014 15:13:42 +0100
+Subject: [PATCH] fix compat with PHP 5.3
+
+---
+ framework/Db/lib/Horde/Db/Adapter/Base.php | 16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/framework/Db/lib/Horde/Db/Adapter/Base.php b/framework/Db/lib/Horde/Db/Adapter/Base.php
+index 7312ee5..b6a6d02 100644
+--- a/framework/Db/lib/Horde/Db/Adapter/Base.php
++++ b/framework/Db/lib/Horde/Db/Adapter/Base.php
+@@ -620,20 +620,14 @@ public function updateBlob($table, $fields, $where = null)
+         if (is_array($where)) {
+             $where = $this->_replaceParameters($where[0], $where[1]);
+         }
+-
++        $fnames = array();
++        foreach($fields as $field => $value) {
++            $fnames[] = $this->quoteColumnName($field) . ' = ?';
++        }
+         $query = sprintf(
+             'UPDATE %s SET %s%s',
+             $this->quoteTableName($table),
+-            implode(
+-                ', ',
+-                array_map(
+-                    function($field)
+-                    {
+-                        return $this->quoteColumnName($field) . ' = ?';
+-                    },
+-                    array_keys($fields)
+-                )
+-            ),
++            implode(', ', $fnames),
+             strlen($where) ? ' WHERE ' . $where : ''
+         );
+         return $this->update($query, $fields);
diff --git a/php-horde-Horde-Db.spec b/php-horde-Horde-Db.spec
index eef940c..b1ce1dc 100644
--- a/php-horde-Horde-Db.spec
+++ b/php-horde-Horde-Db.spec
@@ -22,6 +22,9 @@ License:        BSD
 URL:            http://pear.horde.org
 Source0:        http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
 
+# https://github.com/horde/horde/pull/113
+Patch0:         %{pear_name}-php53.patch
+
 BuildArch:      noarch
 BuildRequires:  php(language) >= 5.3.0
 BuildRequires:  php-pear(PEAR) >= 1.7.0
@@ -64,7 +67,10 @@ Horde database/SQL abstraction layer
 %setup -q -c
 
 cd %{pear_name}-%{version}
-cp -p ../package.xml %{name}.xml
+%patch0 -p3 -b .php53
+sed -e '/Base.php/s/md5sum=.*name=/name=/' \
+    ../package.xml >%{name}.xml
+touch -r ../package.xml %{name}.xml
 
 
 %build
@@ -114,6 +120,7 @@ fi
 %changelog
 * Thu Nov 06 2014 Remi Collet <remi at fedoraproject.org> - 2.2.0-1
 - Update to 2.2.0
+- open https://github.com/horde/horde/pull/113 for php 5.3
 
 * Sat Oct 25 2014 Remi Collet <remi at fedoraproject.org> - 2.1.5-1
 - Update to 2.1.5


More information about the scm-commits mailing list