6.0.0-beta1
7/11/25

[#2419] Local SQL doesn't work (with fix)
Summary Local SQL doesn't work (with fix)
Queue Turba
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners selsky (at) columbia (dot) edu
Requester erland (at) lewin (dot) nu
Created 08/10/2005 (7275 days ago)
Due
Updated 09/06/2017 (2865 days ago)
Assigned 08/11/2005 (7274 days ago)
Resolved 08/11/2005 (7274 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/06/2017 08:17:11 AM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit b624e669f35c1c5e03edbc806389f7a22f867153
Author: Paul M Jones <pmjones@ciaweb.net>
Date:   Thu Sep 30 13:40:24 2004 +0000

     Wiki.php: fixed bug 2419 for getParseConf(), fixed similar bug in 
getFormatConf()
     package.xml: updated with new version and release date


     git-svn-id: 
https://svn.php.net/repository/pear/packages/Text_Wiki/trunk@169638 
c90b9560-bf6c-de11-be94-00142212c4b1

  Text/Wiki.php | 6 +++---
  package.xml   | 8 +++++---
  2 files changed, 8 insertions(+), 6 deletions(-)

http://github.com/horde/horde/commit/b624e669f35c1c5e03edbc806389f7a22f867153
08/11/2005 06:44:49 PM Matt Selsky State ⇒ Resolved
 
08/11/2005 06:33:56 PM Matt Selsky Comment #7 Reply to this comment
This has been fixed in Turba 2.0.4 and Kronolith 2.0.4.
08/11/2005 05:25:51 PM Jan Schneider Comment #6 Reply to this comment
I guess you could check if the function result is an array or a 
string? If not, revert.

And make sure to check if you need to fix other places too.
08/11/2005 05:12:49 PM Matt Selsky Comment #5 Reply to this comment
OK.  Do I need to revert, or can I do a version check and use bind 
variables with Horde >= 3.0.4?
08/11/2005 08:36:09 AM Jan Schneider Comment #4
State ⇒ Assigned
Reply to this comment
Do I have to upgrade Horde from 3.0.2 to 3.0.5 to use Turba H3 2.0.3?
I don't think that was mentioned in the documentation anywhere. I
didn't expect API changes in a minor version number upgrade.
No, and it shouldn't be necessary.



Note to Matt: it shouldn't even be necessary if using Turba from CVS. 
You can't rely on something you introduced in Horde or framework HEAD.
08/11/2005 07:59:52 AM erland (at) lewin (dot) nu Comment #3 Reply to this comment
I didn't upgrade from CVS; I installed both Horde and Turba from the 
stable distributions. The reference to CVS in my comment was just 
because I checked CVS before posting the fix.



Do I have to upgrade Horde from 3.0.2 to 3.0.5 to use Turba H3 2.0.3? 
I don't think that was mentioned in the documentation anywhere. I 
didn't expect API changes in a minor version number upgrade.



The CVS header of the Horde SQL.php is:



$Horde: framework/SQL/SQL.php,v 1.30.2.1 2005/01/03 12:19:12 jan Exp $



and in Turba:



$Horde: turba/lib/Driver/sql.php,v 1.59.10.9 2005/06/10 04:29:14 selsky Exp \

$



Thanks for the help.


08/10/2005 10:23:42 PM Matt Selsky Comment #2
State ⇒ Feedback
Reply to this comment
What are the $Horde version numbers of framework/SQL/SQL.php and 
turba/lib/Driver/sql.php?  Are you sure you installed the latest 
framework when you upgraded from CVS?
08/10/2005 01:51:04 PM Jan Schneider Assigned to Matt Selsky
State ⇒ Assigned
 
08/10/2005 09:38:12 AM erland (at) lewin (dot) nu Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Local SQL doesn't work (with fix)
Queue ⇒ Turba
State ⇒ Unconfirmed
Reply to this comment
I just installed Turba h3-2.0.3 on Horde 3.0.2, configured to use my 
local MySQL database.



I added a contact without problems, but the lists didn't show the 
contact, just empty entries called 'D' and another single letter name.



I tracked it down the file turba/lib/Driver/sql.php and the section 
around line 310:



                     $binds = Horde_SQL::buildClause($this->_db, 
$vals['field'],\

  $vals['op'], $rhs, true);

                     $clause .= $binds[0];

                     $values = array_merge($values, $binds[1]);



Horde_SQL::buildClause returns a string, not an array. Changing the 
clause line above to:



$clause .= $binds



and removing the "$values=..." line fixes the problem.



The bug was apparently introduced in CVS version 1.72 of the file on June 9.



Cheers!


Saved Queries