/usr/share/php/Horde/Form/Type/tableset.php is in php-horde-form 2.0.12-1build1.
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 59 60 | <?php
/**
* @package Form
*/
class Horde_Form_Type_tableset extends Horde_Form_Type {
var $_values;
var $_header;
function init($values, $header)
{
$this->_values = $values;
$this->_header = $header;
}
function isValid(&$var, &$vars, $value, &$message)
{
if (count($this->_values) == 0 || count($value) == 0) {
return true;
}
foreach ($value as $item) {
if (!isset($this->_values[$item])) {
$error = true;
break;
}
}
if (!isset($error)) {
return true;
}
$message = Horde_Form_Translation::t("Invalid data submitted.");
return false;
}
function getHeader()
{
return $this->_header;
}
function getValues()
{
return $this->_values;
}
/**
* Return info about field type.
*/
function about()
{
return array(
'name' => Horde_Form_Translation::t("Table Set"),
'params' => array(
'values' => array('label' => Horde_Form_Translation::t("Values"),
'type' => 'stringlist'),
'header' => array('label' => Horde_Form_Translation::t("Headers"),
'type' => 'stringlist')),
);
}
}
|