/usr/share/horde/whups/ticket/rss.php is in php-horde-whups 3.0.9-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 | <?php
/**
* Copyright 2001-2002 Robert E. Coyle <robertecoyle@hotmail.com>
* Copyright 2001-2016 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 = Horde_Util::getFormData('id');
$ticket = preg_replace('|\D|', '', $ticket);
if (!$ticket) {
exit;
}
// Get the ticket details first.
$details = $whups_driver->getTicketDetails($ticket);
// Check permissions on this ticket.
if (!count(Whups::permissionsFilter(array($details['queue'] => ''), 'queue', Horde_Perms::READ))) {
exit;
}
$history = Whups::permissionsFilter($whups_driver->getHistory($ticket),
'comment', Horde_Perms::READ);
$items = array();
$self = Whups::urlFor('ticket', $ticket, true, -1);
foreach (array_keys($history) as $i) {
if (!isset($history[$i]['comment_text'])) {
continue;
}
$items[$i]['title'] = htmlspecialchars(substr($history[$i]['comment_text'], 0, 60));
$items[$i]['description'] = htmlspecialchars($history[$i]['comment_text']);
$items[$i]['pubDate'] = htmlspecialchars(date('r', $history[$i]['timestamp']));
$items[$i]['url'] = $self . '#t' . $i;
}
$template = $injector->createInstance('Horde_Template');
$template->set('xsl', Horde_Themes::getFeedXsl());
$template->set('pubDate', htmlspecialchars(date('r')));
$template->set('title', htmlspecialchars($details['summary']));
$template->set('items', $items, true);
$template->set('url', Whups::urlFor('ticket', $ticket, true));
$template->set('rss_url', Whups::urlFor('ticket_rss', $ticket, true));
$template->set('description', htmlspecialchars($details['summary']));
$browser->downloadHeaders($details['summary'] . '.rss',
'text/xml', true);
echo $template->fetch(WHUPS_TEMPLATES . '/rss/items.rss');
|