/usr/share/horde/whups/lib/Block/Myrequests.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 | <?php
/**
* Display a summary of the current user's requested tickets.
*/
class Whups_Block_Myrequests extends Whups_Block_Tickets
{
/**
* Is this block enabled?
*
* @var boolean
*/
public $enabled = true;
/**
*/
public function __construct($app, $params = array())
{
parent::__construct($app, $params);
$this->_name = _("My Requests");
}
/**
*/
protected function _content()
{
global $whups_driver, $prefs;
$queue_ids = array_keys(
Whups::permissionsFilter($GLOBALS['whups_driver']->getQueues(),
'queue',
Horde_Perms::READ));
$info = array('requester' => $GLOBALS['registry']->getAuth(),
'notowner' => 'user:' . $GLOBALS['registry']->getAuth(),
'nores' => true,
'queue' => $queue_ids);
$requests = $GLOBALS['whups_driver']->getTicketsByProperties($info);
if (!$requests) {
return '<p class="horde-content"><em>' . _("You have no open requests.") . '</em></p>';
}
return $this->_table($requests);
}
}
|