diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index d8ce6d28269109f7daf19aa4793d135ba8a4cbb1..2aeacc7ac46bdbc73f151fecb4bd11ce3dc57823 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -1097,6 +1097,10 @@ class DynamicFormEntryAnswer extends VerySimpleModel { return $this->_value; } + function getLocal($tag) { + return $this->field->getLocal($tag); + } + function getIdValue() { return $this->get('value_id'); } diff --git a/include/class.list.php b/include/class.list.php index a95429a6f2c5e2425f2c85612c75d2ae29bae964..f5746f0ba67d08d4df004fc53e15caabc2f5460d 100644 --- a/include/class.list.php +++ b/include/class.list.php @@ -806,10 +806,6 @@ class TicketStatus extends VerySimpleModel implements CustomListItem { const ENABLED = 0x0001; const INTERNAL = 0x0002; // Forbid deletion or name and status change. - function __construct() { - call_user_func_array(array('parent', '__construct'), func_get_args()); - } - protected function hasFlag($field, $flag) { return 0 !== ($this->get($field) & $flag); } @@ -1006,6 +1002,9 @@ class TicketStatus extends VerySimpleModel implements CustomListItem { function getValue() { return $this->getName(); } + function getLocalName() { + return $this->getLocal('value'); + } function getAbbrev() { return ''; @@ -1138,7 +1137,7 @@ class TicketStatus extends VerySimpleModel implements CustomListItem { } function __toString() { - return __($this->getName()); + return $this->getName(); } static function create($ht) { diff --git a/include/class.sla.php b/include/class.sla.php index 083663695f4d245710bc6742b4650bc8fedad9b0..8edb7a4360099b32506af1e563850e44887294a8 100644 --- a/include/class.sla.php +++ b/include/class.sla.php @@ -29,7 +29,7 @@ class SLA extends VerySimpleModel { } function getName() { - return $this->name; + return $this->getLocal('name'); } function getGracePeriod() { diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 4a2f57efafaa622b948833c7bc78886d0ae74765..abdb74ed1a71040920afeb5f46cea4c3fc8da4d3 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -169,7 +169,7 @@ if($ticket->isOverdue()) <table border="0" cellspacing="" cellpadding="4" width="100%"> <tr> <th width="100"><?php echo __('Status');?>:</th> - <td><?php echo $ticket->getStatus(); ?></td> + <td><?php echo ($S = $ticket->getStatus()) ? $S->getLocalName() : ''; ?></td> </tr> <tr> <th><?php echo __('Priority');?>:</th> @@ -356,7 +356,7 @@ foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) { if (!($v = $a->display())) continue; ?> <tr> <th width="100"><?php - echo $a->getField()->get('label'); + echo $a->getLocal('label'); ?>:</th> <td><?php echo $v;