[dev] Nag error message fixup

John Morrissey jwm at horde.net
Thu Dec 12 17:00:03 PST 2002


The task name isn't displayed when an error occurs manipulating tasks.
The attached patch fixes that.

john
-- 
John Morrissey          _o            /\         ----  __o
jwm@horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
-------------- next part --------------
Index: task.php
===================================================================
RCS file: /repository/nag/task.php,v
retrieving revision 1.30
diff -u -u -r1.30 task.php
--- task.php	12 Dec 2002 20:01:30 -0000	1.30
+++ task.php	12 Dec 2002 21:58:29 -0000
@@ -190,6 +190,7 @@
     if (isset($task_id)) {
         $share = $GLOBALS['nag_shares']->getShare($tasklist_id);
         if (is_a($share, 'PEAR_Error') || $share->hasPermission(Auth::getAuth(), _PERMS_DELETE)) {
+            $task = Nag::getTask($tasklist_id, $task_id);
             $notification->push(sprintf(_("Access denied deleting task: %s"), $task['name']), 'horde.error');
         } else {
             $storage = &Nag_Driver::singleton($conf['storage']['driver'], $tasklist_id,
@@ -217,6 +218,7 @@
     if (isset($task_id)) {
         $share = $GLOBALS['nag_shares']->getShare($tasklist_id);
         if (is_a($share, 'PEAR_Error') || $share->hasPermission(Auth::getAuth(), _PERMS_EDIT)) {
+            $task = Nag::getTask($tasklist_id, $task_id);
             $notification->push(sprintf(_("Access denied completing task: %s"), $task['name']), 'horde.error');
         } else {
             $storage = &Nag_Driver::singleton($conf['storage']['driver'], $tasklist_id,


More information about the dev mailing list