/usr/share/horde/whups/queue/index.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 | <?php
/**
* Allows direct access to open tickets in specified queue.
*
* Copyright 2007-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.
*
* @author Michael J. Rubinsk <mrubinsk@horde.org>
*/
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('whups');
// See if we were passed a slug or id. Slug is tried first.
$slug = Horde_Util::getFormData('slug');
if ($slug) {
$queue = $whups_driver->getQueueBySlugInternal($slug);
$id = $queue['id'];
} else {
$id = Horde_Util::getFormData('id');
$queue = $whups_driver->getQueue($id);
}
if (!$id) {
$notification->push(_("Invalid queue"), 'horde.error');
Horde::url($prefs->getValue('whups_default_view') . '.php', true)
->redirect();
}
Whups::addFeedLink();
$page_output->header(array(
'title' => sprintf(_("Open tickets in %s"), $queue['name'])
));
$notification->notify(array('listeners' => 'status'));
$criteria = array('queue' => $id,
'category' => array('unconfirmed', 'new', 'assigned'));
try {
$tickets = $whups_driver->getTicketsByProperties($criteria);
Whups::sortTickets($tickets);
$values = Whups::getSearchResultColumns();
$self = Whups::urlFor('queue', $queue);
$results = new Whups_View_Results(array('title' => sprintf(_("Open tickets in %s"), $queue['name']),
'results' => $tickets,
'values' => $values,
'url' => $self));
$session->set('whups', 'last_search', $self);
$results->html();
} catch (Whups_Exception $e) {
$notification->push(
sprintf(_("There was an error locating tickets in this queue: %s"), $e->getMessage()),
'horde.error');
}
$page_output->footer();
|