[trean] Category delete patch attempt
   
    Michal
     
    michal@michal.no-ip.com
       
    Wed Oct 30 23:20:05 2002
    
    
  
I was trying to apply function to delete categories, but unsuccessfully. I did
this changes:
http://horde.nantucketkiteboarding.com/trean/Bookmarks.php.txt
http://horde.nantucketkiteboarding.com/trean/categories.inc.txt
http://horde.nantucketkiteboarding.com/trean/constants.php.txt
http://horde.nantucketkiteboarding.com/trean/edit.php.txt
i've added to lib/Bookmarks.php :
    function removeCategory($id)
    {
      return $this->_bookmarks->removeCategory($id);
    }
i've added to lib/constants.php :
/** @const TREAM_DEL_CATEGORY Delete a category. */ define('TREAN_DEL_CATEGORY',
108);
i've added to edit.php :
 case TREAN_DEL_CATEGORY:
     /* Remove the exisiting category */
     $res = $_SESSION['trean']->removeCategory(Horde::getFormData('id'));
     /* Get out of here */
     $url = Horde::addParameter('browse.php', 'category=' .
urlencode(Horde::getFormData('category')));
     header('Location: ' . Horde::applicationUrl($url));
     break;
and finally i've added to templates/browse/categories.inc - so it display little
basket next the name of category:
    $delurl = Horde::addParameter('edit.php', 'id=' . urlencode($name));
    $delurl = Horde::addParameter($delurl, 'actionID=' . TREAN_DEL_CATEGORY);
    $delurl = Horde::applicationUrl($delurl);
    echo Horde::link($delurl, _("Delete Category"));
    echo Horde::img('delete.gif', _('Delete')).'</a>';
But when I click Delete link. Nothing happen and I see this error message:
Fatal error: Call to undefined function: getname() in
/usr/local/wwwapps/horde/trean/templates/browse/bookmarks.inc on line 5
which is for me really confusing. 
Can somebody try to give me suggestion where can be error, please - my guess is
lib/Bookmarks.php ;)
Thanks
Michal