Remove break which causes error, and detect error another way

This commit is contained in:
Miles Lott 2004-02-24 14:05:39 +00:00
parent 1c8e2629c5
commit aeb222d5d7

View File

@ -727,13 +727,15 @@
{ {
/* Errors encountered during validation */ /* Errors encountered during validation */
$errors = $ab_id; $errors = $ab_id;
break;
} }
// $ab_id = $this->bo->get_lastid(); // $ab_id = $this->bo->get_lastid();
Header('Location: ' if(!$errors)
. $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id . '&referer=' . $referer)); {
$GLOBALS['phpgw']->common->phpgw_exit(); Header('Location: '
. $GLOBALS['phpgw']->link('/index.php','menuaction=addressbook.uiaddressbook.view&ab_id=' . $ab_id . '&referer=' . $referer));
$GLOBALS['phpgw']->common->phpgw_exit();
}
} }
$GLOBALS['phpgw']->template->set_file(array('add' => 'add.tpl')); $GLOBALS['phpgw']->template->set_file(array('add' => 'add.tpl'));
@ -743,7 +745,6 @@
echo parse_navbar(); echo parse_navbar();
$custom = $this->fields->read_custom_fields(); $custom = $this->fields->read_custom_fields();
// while(list($x,$y) = @each($custom))
foreach($custom as $x => $y) foreach($custom as $x => $y)
{ {
$customfields[$y['name']] = $y['title']; $customfields[$y['name']] = $y['title'];