/usr/share/horde/nag/lib/Form/CreateTaskList.php is in php-horde-nag 4.1.3-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 | <?php
/**
* Horde_Form for creating task lists.
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.horde.org/licenses/gpl.
*
* @package Nag
*/
/**
* The Nag_CreateTaskListForm class provides the form for
* creating a task list.
*
* @author Chuck Hagenbuch <chuck@horde.org>
* @package Nag
*/
class Nag_Form_CreateTaskList extends Horde_Form
{
public function __construct($vars)
{
parent::__construct($vars, _("Create Task List"));
$this->addVariable(_("Name"), 'name', 'text', true);
$v = $this->addVariable(_("Color"), 'color', 'colorpicker', false);
$v->setDefault(Nag::randomColor());
if ($GLOBALS['registry']->isAdmin()) {
$this->addVariable(
_("System Task List"), 'system', 'boolean', false, false,
_("System task lists don't have an owner. Only administrators can change the task list settings and permissions."));
}
$this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
$this->setButtons(array(_("Create")));
}
public function execute()
{
$info = array();
foreach (array('name', 'color', 'description', 'system') as $key) {
$info[$key] = $this->_vars->get($key);
}
return Nag::addTasklist($info);
}
}
|