[bugs] [Bug 1213] Changed - Source not remembered between searches
in address book
bugs at bugs.horde.org
bugs at bugs.horde.org
Mon Mar 31 02:34:10 PST 2003
http://bugs.horde.org/show_bug.cgi?id=1213
*** shadow/1213 Thu Mar 27 20:54:56 2003
--- shadow/1213.tmp.16339 Mon Mar 31 02:34:10 2003
***************
*** 34,36 ****
--- 34,78 ----
+
+ ------- Additional Comments From c.green at its.uq.edu.au 03/31/03 02:34 -------
+ Here is a temporary fix, note this will still let people manually change the
+ source via the url.
+
+ It just sets the source name as an attribute of each object, and then uses that
+ when constructing the url rather than the $GLOBALS['source'] attribute.
+
+ I will post a more secure fix when I get around to it.
+
+ beast% cvs -q diff
+ Index: lib/Source.php
+ ===================================================================
+ RCS file: /turba/lib/Source.php,v
+ retrieving revision 1.2
+ diff -r1.2 Source.php
+ 215c215
+ < $list->insert(new Turba_Object($this, $attributes));
+ ---
+ > $list->insert(new Turba_Object($this, array_merge($attributes,
+ array('source' => $this->name))));
+
+ Index: templates/search/row.inc
+ ===================================================================
+ RCS file: /turba/templates/search/row.inc,v
+ retrieving revision 1.1
+ diff -r1.1 row.inc
+ 40c40
+ < <?php if ($ob->hasValue('__key')): ?><?=
+ Horde::link(Horde::applicationUrl('displayobject.php?source=' .
+ urlencode($GLOBALS['source']) . '&key=' . urlencode($ob->getValue('__key'))),
+ sprintf(_("Edit '%s'"), $ob->getValue('name'))); ?><?php endif; ?><?=
+ $ob->hasValue('name') ? $ob->getValue('name') : _("[Edit]") ?><?php if
+ ($ob->hasValue('__key')): ?></a><?php endif; ?>
+ ---
+ > <?php if ($ob->hasValue('__key')): ?><?=
+ Horde::link(Horde::applicationUrl('displayobject.php?source=' .
+ urlencode($ob->getValue('source')) . '&key=' .
+ urlencode($ob->getValue('__key'))), sprintf(_("Edit '%s'"),
+ $ob->getValue('name'))); ?><?php endif; ?><?= $ob->hasValue('name') ?
+ $ob->getValue('name') : _("[Edit]") ?><?php if ($ob->hasValue('__key')):
+ ?></a><?php endif; ?>
More information about the bugs
mailing list