[nag] Error when finishing a task via checkbox
Sven Flossmann
sven at flossmann-online.de
Mon Oct 6 05:29:04 UTC 2008
hi,
I'm getting the following error, when I try to finish a task in the
tasklist via the checkbox:
Fatal error: Call to undefined method PEAR_Error::get() in
/var/www/www2.flossmann.net/horde_080912/horde/nag/lib/Driver.php on
line 345
The corresponding code segment is below.
What I'm not understand are the following two things:
a) Why is the tasked moved? (Where shall it be moved to?)
b) Obviously, an error happend (PEAR_Error). Why is the get() method not
defined?
btw: If I complete the task via edit -> mark it compete -> save ... then
it seems to work.
Thanks,
Sven
PS: NAG V2.3, Horde V3.3
if ($task->tasklist != $tasklist) {
/* Moving the task to another tasklist. */
$share = $GLOBALS['nag_shares']->getShare($task->tasklist);
if (!is_a($share, 'PEAR_Error') &&
$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) {
$share = $GLOBALS['nag_shares']->getShare($tasklist);
if (!is_a($share, 'PEAR_Error') &&
$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
$moved = $this->_move($task->id, $tasklist);
if (is_a($moved, 'PEAR_Error')) {
return $moved;
}
$new_storage = &Nag_Driver::singleton($tasklist);
$new_task = $new_storage->get($task->id);
/* Log the moving of this item in the history log. */
if (!empty($task->uid)) {
$history = &Horde_History::singleton();
$history->log('nag:' . $task->tasklist . ':' .
$task->uid, array('action' => 'delete'), true);
$history->log('nag:' . $tasklist . ':' . $task->uid,
array('action' => 'add'), true);
$log_tasklist = $tasklist;
}
} else {
--> $GLOBALS['notification']->push(sprintf(_("Access denied
moving the task to %s."), $share->get('name')), 'horde.error');
}
} else {
$GLOBALS['notification']->push(sprintf(_("Access denied
removing task from %s."), $share->get('name')), 'horde.error');
}
}
More information about the nag
mailing list