[turba] error in SelectSource.php

Bo Daley bo at tilda.com.au
Fri Mar 28 14:36:28 PST 2003


hi there,

is anyone else seeing an error in Turba (latest HEAD checkout) when you try to
add a contact? this error only happens for me when I have two or more address
books in sources.php.


Fatal error: Call to undefined function: _getheadertype() in
/var/www/html/horde/turba/lib/SelectSource.php on line 29


I think this is the patch that is required (to make SelectSources.php compatible
with the new Horde_Form changes..)

thanks,

bo.



Index: SelectSource.php
===================================================================
RCS file: /repository/turba/lib/SelectSource.php,v
retrieving revision 1.1
diff -u -r1.1 SelectSource.php
--- SelectSource.php    5 Feb 2003 02:41:25 -0000       1.1
+++ SelectSource.php    28 Mar 2003 03:33:06 -0000
@@ -26,8 +26,9 @@
 
         $this->_submit = _("Select");
 
-        $this->addVariable(_("Please choose an address book to add a contact
to."), '', _getHeaderType(), false);
-        $this->addVariable(_("Source"), 'source', _getEnumType($sources), false);
+        $params = isset($sources) ? array($sources) : array();
+        $this->addVariable(_("Please choose an address book to add a contact
to."), '', 'header', false);
+        $this->addVariable(_("Source"), 'source', 'enum', false, false, '',
$params);
 
     }




More information about the turba mailing list