[dev] bug in Turba CVS HEAD

Eric Rostetter eric.rostetter@physics.utexas.edu
Wed, 3 Jul 2002 01:35:02 -0500


As someone else reported, the turba search function is broken in CVS HEAD.
When you do a search, it goes to browse.php with the "key=**search" field,
but no "source=" field.  So browse.php simply asks you to select an address
book since none was passed in url, form, or session...

I "fixed" it with the following patch, which simply passes the "source"
variable along with the key.  BTW, should the key/source in the fixed
line do a urlencode???

Index: search.php
===================================================================
RCS file: /repository/turba/search.php,v
retrieving revision 1.67
diff -u -r1.67 search.php
--- search.php  23 Jun 2002 19:27:23 -0000      1.67
+++ search.php  3 Jul 2002 06:31:15 -0000
@@ -1,6 +1,6 @@
 <?php
 /*
- * $Horde: turba/search.php,v 1.67 2002/06/23 19:27:23 chuck Exp $
+ * $Horde: turba/search.php,v 1.66 2002/06/21 15:20:44 chuck Exp $
  *
  * Turba: Copyright 2000-2002 Charles J. Hagenbuch <chuck@horde.org>
  *
@@ -55,7 +55,7 @@
             $combinedResults->merge($turba_search_results, false);
             $combinedResults->merge($results);
             $turba_search_results = $combinedResults->serialize();
-            header('Location: ' .
Horde::applicationUrl("browse.php?key=**search", true));
+            header('Location: ' .
Horde::applicationUrl("browse.php?key=**search&source=$source", true));
         } else {
             $notification->push(sprintf(_("Failed to search the directory:
%s"), ''), 'horde.error');
         }


-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

"TAD (Technology Attachment Disorder) is an unshakable, impractical devotion
to a brand, platform, product line, or programming language. It's relatively
harmless among the rank and file, but when management is afflicted the damage
can be measured in dollars. It's also contagious -- someone with sufficient
political clout can infect an entire organization."

--"Enterprise Strategies" columnist Tom Yager.