bug fix for admin.php

Bo Daley <[email protected]>
Newsgroups gmane.comp.horde.whups
Message-ID <[email protected]>
hi again,

this fixes a bug that was preventing editing of modules and types in Whups
administration.

thanks!

bo.


-- 
Whups mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
admin.php.diff (text/diff, 1.4 KB)
Index: admin.php
===================================================================
RCS file: /repository/whups/admin.php,v
retrieving revision 1.43
diff -u -r1.43 admin.php
--- admin.php	14 Jun 2003 04:07:08 -0000	1.43
+++ admin.php	23 Jun 2003 07:36:47 -0000
@@ -171,8 +171,9 @@
  case 'edittypeform':
  case 'edittypestep2form':
      $form = &Horde_Form::singleton('EditTypeStep2Form', $vars);
+     $form->validate($vars);
 
-     if ($vars->getVar('formname') == 'edittypestep2form' && $form->validate($vars) && $form->isValid()) {
+     if ($vars->getVar('formname') == 'edittypestep2form' && $form->isValid()) {
          $result = $whups->updateType($vars->getVar('type'), $vars->getVar('name'),
                                       $vars->getVar('description'));
          if (is_a($result, 'PEAR_Error')) {
@@ -286,8 +287,8 @@
  case 'editmoduleform':
  case 'editmodulestep2form':
      $form = &Horde_Form::singleton('EditModuleStep2Form', $vars);
-
-     if ($vars->getVar('formname') == 'editmodulestep2form' && $form->validate($vars) && $form->isValid()) {
+     $form->validate($vars);
+     if ($vars->getVar('formname') == 'editmodulestep2form' && $form->isValid()) {
          $result = $whups->updateModule($vars->getVar('module'), $vars->getVar('name'),
                                         $vars->getVar('description'), $vars->getVar('types'),
                                         $vars->getVar('subjectlist'), $vars->getVar('subjects'),
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.