From: Ben Klang Date: Thu, 10 Jun 2010 16:24:23 +0000 (-0400) Subject: Hermes: fix adding job types form X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a419584b7ff4771240474e64e22f04063ab6e0a4;p=horde.git Hermes: fix adding job types form This is a dirty work around to a Horde_Form behavior. Horde_Variables#exists() only checks on expected variables, while Horde_Variables#get() returns the value if one was passed. Since the form name itself isn't "expected", exists() returns false. This work around makes this multi-form page work again. --- diff --git a/hermes/admin.php b/hermes/admin.php index 77fb8d492..63ea8c052 100644 --- a/hermes/admin.php +++ b/hermes/admin.php @@ -35,8 +35,14 @@ function _open() } } -if ($vars->exists('formname')) { - switch ($vars->get('formname')) { +// This is a dirty work around to a Horde_Form behavior. +// Horde_Variables#exists() only checks on expected variables, while +// Horde_Variables#get() returns the value if one was passed. Since the form +// name itself isn't "expected", exists() returns false. This work around +// makes this multi-form page work again. +$formname = $vars->get('formname'); +if (!empty($formname)) { + switch ($formname) { case 'addjobtypeform': $form = new AddJobTypeForm($vars); $form->validate($vars);