This file is indexed.

/usr/share/horde/whups/ticket/watch.php is in php-horde-whups 3.0.0~beta1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
 * Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com>
 * Copyright 2001-2013 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file LICENSE for license information (BSD). If you
 * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
 */

require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('whups');

$ticket = Whups::getCurrentTicket();
$page_output->addLinkTag($ticket->feedLink());

$vars = Horde_Variables::getDefaultVariables();
$vars->set('id', $id = $ticket->getId());
foreach ($ticket->getDetails() as $varname => $value) {
    $vars->add($varname, $value);
}

Whups::addTopbarSearch();

$addform = new Whups_Form_AddListener($vars, _("Add Watcher"));
$delform = new Whups_Form_DeleteListener($vars, _("Remove Watcher"));

if ($vars->get('formname') == 'whups_form_addlistener') {
    if ($addform->validate($vars)) {
        $addform->getInfo($vars, $info);

        try {
            $whups_driver->addListener($id, '**' . $info['add_listener']);
            $ticket->notify(
                $info['add_listener'], false, array('**' . $info['add_listener'] => 'listener'));
            $notification->push(
                sprintf(_("%s will be notified when this ticket is updated."), $info['add_listener']),
                'horde.success');
            $ticket->show();
        } catch (Whups_Exception $e) {
            $notification->push($e, 'horde.error');
        }
    }
} elseif ($vars->get('formname') == 'whups_form_deletelistener') {
    if ($delform->validate($vars)) {
        $delform->getInfo($vars, $info);
        try {
            $whups_driver->deleteListener($id, '**' . $info['del_listener']);
            $notification->push(
                sprintf(_("%s will no longer receive updates for this ticket."), $info['del_listener']),
                'horde.success');
            $ticket->show();
        } catch (Whups_Exception $e) {
            $notification->push($e, 'horde.error');
        }
    }
}

$page_output->header(array(
    'title' => sprintf(_("Watchers for %s"), '[#' . $id . '] ' . $ticket->get('summary'))
));
$notification->notify(array('listeners' => 'status'));
require WHUPS_TEMPLATES . '/prevnext.inc';

$tabs = Whups::getTicketTabs($vars, $id);
echo $tabs->render('watch');

require WHUPS_TEMPLATES . '/ticket/watchers.inc';

$r = new Horde_Form_Renderer();

$addform->renderActive($r, $vars, Horde::url('ticket/watch.php'), 'post');
echo '<br class="spacer" />';

$delform->renderActive($r, $vars, Horde::url('ticket/watch.php'), 'post');
echo '<br class="spacer" />';

$form = new Whups_Form_TicketDetails($vars, $ticket, '[#' . $id . '] ' . $ticket->get('summary'));
$ticket->setDetails($vars);
$form->renderInactive($form->getRenderer(), $vars);

$page_output->footer();