From: Gunnar Wrobel Date: Fri, 1 May 2009 14:22:44 +0000 (+0200) Subject: use the central class mapping. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f73c18c2261a2149693d385ecc56c50b7d660861;p=horde.git use the central class mapping. --- diff --git a/koward/lib/Koward/Form/Object.php b/koward/lib/Koward/Form/Object.php index e81e9383b..5eb7ddbc7 100644 --- a/koward/lib/Koward/Form/Object.php +++ b/koward/lib/Koward/Form/Object.php @@ -45,15 +45,7 @@ class Koward_Form_Object extends Horde_Form { $type = $vars->get('type'); } else { $title = _("Edit Object"); - $class_name = get_class($this->object); - foreach ($this->koward->objects as $name => $config) { - if ($config['class'] == $class_name) { - $type = $name; - if (!empty($config['preferred'])) { - break; - } - } - } + $type = $this->koward->getType($this->object); if (empty($type)) { throw new Koward_Exception('Undefined object class!'); }