From f73c18c2261a2149693d385ecc56c50b7d660861 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Fri, 1 May 2009 16:22:44 +0200 Subject: [PATCH] use the central class mapping. --- koward/lib/Koward/Form/Object.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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!'); } -- 2.11.0