Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

use Horde\Cache\Cache as HordeCache;
use Horde\Cache\FileStorage;
use Horde\Core\LanguageContext;
use Horde\Date\Format as DateFormat;
use Horde\Util\Variables;
use Horde\Whups\Domain\AttributeRepositoryInterface;
Expand Down Expand Up @@ -431,6 +432,7 @@ protected function _downloadTicket(Variables|Horde_Variables $vars)
$ticket->setDetails($vars);
$title = '[#' . $ticket->getId() . '] ' . $ticket->get('summary');
$filter = $injector->getInstance('Horde_Core_Factory_TextFilter');
$locale = $injector->getInstance(LanguageContext::class)->getLocale();
$obfuscate = $conf['prefs']['obfuscate_email'];
$conf['prefs']['obfuscate_email'] = false;

Expand Down Expand Up @@ -517,10 +519,12 @@ protected function _downloadTicket(Variables|Horde_Variables $vars)
);
$time = DateFormat::formatDate(
$transaction['timestamp'],
$prefs->getValue('date_format')
$prefs->getValue('date_format'),
$locale
) . ' ' . DateFormat::formatDate(
$transaction['timestamp'],
$prefs->getValue('time_format')
$prefs->getValue('time_format'),
$locale
);
echo <<<COMMENT
<table width="100%">
Expand Down
6 changes: 4 additions & 2 deletions lib/Form/Renderer/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* @package Whups
*/
use Horde\Core\LanguageContext;
use Horde\Date\Format as DateFormat;

class Whups_Form_Renderer_Comment extends Horde_Form_Renderer
Expand All @@ -27,7 +28,7 @@ public function begin($title)

public function render($transaction, $vars)
{
global $prefs, $conf, $registry;
global $prefs, $conf, $registry, $injector;
static $canUpdate, $comment_count = 0;

if (!isset($canUpdate)) {
Expand All @@ -38,6 +39,7 @@ public function render($transaction, $vars)
$comment = '';
$private = false;
$changes = [];
$locale = $injector->getInstance(LanguageContext::class)->getLocale();

$changelist = $vars->get('changes');
if (!$changelist) {
Expand Down Expand Up @@ -258,7 +260,7 @@ public function render($transaction, $vars)
<div id="t<?php echo (int) $transaction ?>">
<table cellspacing="0" width="100%">
<tr>
<td width="20%" class="<?php echo $class ?>_l nowrap" valign="top"><?php echo DateFormat::formatDate($vars->get('timestamp'), $prefs->getValue('date_format')) . ' ' . DateFormat::formatDate($vars->get('timestamp'), $prefs->getValue('time_format')) ?></td>
<td width="20%" class="<?php echo $class ?>_l nowrap" valign="top"><?php echo DateFormat::formatDate($vars->get('timestamp'), $prefs->getValue('date_format'), $locale) . ' ' . DateFormat::formatDate($vars->get('timestamp'), $prefs->getValue('time_format'), $locale) ?></td>
<td width="20%" class="<?php echo $class ?>_m" valign="top"><?php echo $vars->get('user_id') ? Whups::formatUser($vars->get('user_id'), false, true, true) : '&nbsp;' ?></td>
<td width="30%" class="<?php echo $class ?>_m" valign="top"><?php echo implode('<br />', $changes) ?></td>
<td width="30%" class="<?php echo $class ?>_r rightAlign" valign="top"><?php if ($comment && !$private) {
Expand Down
Loading