1<?php
2/**
3 * Copyright 2007-2017 Horde LLC (http://www.horde.org/)
4 *
5 * See the enclosed file COPYING for license information (LGPL-2). If you
6 * did not receive this file, see http://www.horde.org/licenses/lgpl.
7 *
8 * @author   Jan Schneider <jan@horde.org>
9 * @category Horde
10 * @license  http://www.horde.org/licenses/lgpl LGPL-2
11 * @package  Horde
12 */
13
14require_once __DIR__ . '/../lib/Application.php';
15Horde_Registry::appInit('horde', array('nologintasks' => true));
16
17$alarm = $injector->getInstance('Horde_Alarm');
18$id = Horde_Util::getPost('alarm');
19$snooze = Horde_Util::getPost('snooze');
20
21if ($id && $snooze) {
22    try {
23        $alarm->snooze($id, $registry->getAuth(), (int)$snooze);
24    } catch (Horde_Alarm_Exception $e) {
25        header('HTTP/1.0 500 ' . $e->getMessage());
26    }
27} else {
28    header('HTTP/1.0 400 Bad Request');
29}
30