validate($vars)) { $form->getInfo($vars, $info); $token = $butler_driver->addRequestor($info); $errurl = Horde::applicationUrl(basename(__FILE__), true); if (is_a($token, 'PEAR_Error')) { $notification->push($token->getMessage() . ': ' . $token->getDebugInfo(), 'horde.error'); header('Location: ' . $errurl); exit; } $result = Butler::sendLink($info, $token); if (is_a($result, 'PEAR_Error')) { $notification->push(sprintf(_("Error while sending the file download link: %s."), $result->getMessage()), 'horde.error'); header('Location: ' . $errurl); exit; } $url = Horde::applicationUrl('thanks.php', true); header('Location: ' . $url); exit; } // Form action $url = Horde::applicationUrl(basename(__FILE__)); $title = $form->getTitle(); require BUTLER_TEMPLATES . '/common-header.inc'; require BUTLER_TEMPLATES . '/menu.inc'; $form->renderActive(null, null, $url, 'post'); require $registry->get('templates', 'horde') . '/common-footer.inc';