projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b533e86
)
this throws a Turba_Exception, not a PEAR_Error
author
Michael J Rubinsky
<mrubinsk@horde.org>
Fri, 7 Jan 2011 19:23:39 +0000
(14:23 -0500)
committer
Michael J Rubinsky
<mrubinsk@horde.org>
Fri, 7 Jan 2011 19:32:39 +0000
(14:32 -0500)
turba/addressbooks/create.php
patch
|
blob
|
history
diff --git
a/turba/addressbooks/create.php
b/turba/addressbooks/create.php
index
61cad1d
..
ecfcc0c
100644
(file)
--- a/
turba/addressbooks/create.php
+++ b/
turba/addressbooks/create.php
@@
-24,11
+24,11
@@
$form = new Turba_Form_CreateAddressBook($vars);
// Execute if the form is valid.
if ($form->validate($vars)) {
- $result = $form->execute();
- if ($result instanceof PEAR_Error) {
- $notification->push($result, 'horde.error');
- } else {
+ try {
+ $result = $form->execute();
$notification->push(sprintf(_("The address book \"%s\" has been created."), $vars->get('name')), 'horde.success');
+ } catch (Turba_Exception $e) {
+ $notification->push($e, 'horde.error');
}
Horde::url('addressbooks/', true)->redirect();