/usr/share/horde/sesha/lib/Form/CategoryList.php is in php-horde-sesha 1.0.0~beta1-11ubuntu1.
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 | <?php
/**
* Copyright 2004-2011 Horde LLC (http://www.horde.org/)
*
* See the enclosed file LICENSE for license information (GPL). If you
* did not receive this file, see http://www.horde.org/licenses/gpl.php.
*
* @author Bo Daley <bo@darkwork.net>
* @package Sesha
*/
class Sesha_Form_CategoryList extends Horde_Form {
public function __construct($vars)
{
parent::__construct($vars);
// This is probably wrong. The library should get the driver
// or the properties passed
$sesha_driver = $GLOBALS['injector']->getInstance('Sesha_Factory_Driver')->create();
$this->setButtons(array(_("Edit Category"),
_("Delete Category")));
$categories = $sesha_driver->getCategories();
$params = array();
foreach ($categories as $category) {
$params[$category->category_id] = $category->category;
}
$title = !empty($title) ? $title : _("Edit a category");
$this->setTitle($title);
$this->addHidden('', 'actionID', 'text', false, false, null, array('edit_category'));
if (!count($params)) {
$fieldtype = 'invalid';
$params = _("No categories are currently configured. Use the form below to add one.");
} else {
$fieldtype = 'enum';
}
$this->addVariable(_("Category"), 'category_id', $fieldtype, true, false, null, array($params));
}
}
|