/usr/share/horde/whups/lib/Form/Queue/StepOne.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 | <?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.
*/
/**
* Queue editing forms.
*/
class Whups_Form_Queue_StepOne extends Horde_Form
{
public function __construct(&$vars, $title = '')
{
parent::__construct($vars, $title);
$this->addHidden('', 'id', 'int', true, true);
/* Queues. */
$this->addVariable(
_("New Queue"), 'queue', 'enum', true, false, null,
array(Whups::permissionsFilter($GLOBALS['whups_driver']->getQueues(),
'queue', Horde_Perms::EDIT)));
$this->addVariable(_("Comment"), 'newcomment', 'longtext', false);
/* Group restrictions. */
if ($GLOBALS['registry']->isAdmin(array('permission' => 'whups:admin', 'permlevel' => Horde_Perms::EDIT)) ||
$GLOBALS['injector']->getInstance('Horde_Perms')->hasPermission('whups:hiddenComments', $GLOBALS['registry']->getAuth(), Horde_Perms::EDIT)) {
$groups = $GLOBALS['injector']->getInstance('Horde_Group');
$mygroups = $groups->listGroups($GLOBALS['registry']->getAuth());
if ($mygroups) {
foreach (array_keys($mygroups) as $gid) {
$grouplist[$gid] = $groups->getName($gid, true);
}
asort($grouplist);
$grouplist = array_merge(array(0 => _("Any Group")),
$grouplist);
$this->addVariable(_("Viewable only by members of"), 'group',
'enum', true, false, null,
array($grouplist));
}
}
}
}
|