DowntimeQuery: Add _name suffix to the query column `downtime_author'

...to indicate that it's a case-sensitive column.

refs #8613
This commit is contained in:
Johannes Meyer 2015-04-10 14:23:05 +02:00
parent fda261bf22
commit 1c32d8ebe5
6 changed files with 6 additions and 6 deletions

View File

@ -270,7 +270,7 @@ class Monitoring_ListController extends Controller
'id' => 'downtime_internal_id',
'objecttype' => 'downtime_objecttype',
'comment' => 'downtime_comment',
'author' => 'downtime_author',
'author_name' => 'downtime_author_name',
'start' => 'downtime_start',
'scheduled_start' => 'downtime_scheduled_start',
'scheduled_end' => 'downtime_scheduled_end',

View File

@ -64,7 +64,7 @@ use Icinga\Module\Monitoring\Object\Service;
<?= $this->link()->host($downtime->host_name, $downtime->host_display_name) ?>
<?php endif ?>
<br>
<?= $this->icon('comment', $this->translate('Comment')); ?> [<?= $this->escape($downtime->author) ?>] <?= $this->escape($downtime->comment) ?>
<?= $this->icon('comment', $this->translate('Comment')); ?> [<?= $this->escape($downtime->author_name) ?>] <?= $this->escape($downtime->comment) ?>
<br>
<small>
<?php if ($downtime->is_flexible): ?>

View File

@ -58,7 +58,7 @@ foreach ($object->downtimes as $downtime) {
?>
<tr>
<th><?= $this->escape($downtime->author); ?></th>
<th><?= $this->escape($downtime->author_name); ?></th>
<td data-base-target="_self">
<?php if (isset($delDowntimeForm)) { // Form is unset if the current user lacks the respective permission
$delDowntimeForm = clone $delDowntimeForm;

View File

@ -13,7 +13,7 @@ class DowntimeQuery extends IdoQuery
*/
protected $columnMap = array(
'downtime' => array(
'downtime_author' => 'sd.author_name',
'downtime_author_name' => 'sd.author_name',
'author' => 'sd.author_name',
'downtime_comment' => 'sd.comment_data',
'downtime_entry_time' => 'UNIX_TIMESTAMP(sd.entry_time)',

View File

@ -14,7 +14,7 @@ class Downtime extends DataView
{
return array(
'downtime_objecttype',
'downtime_author',
'downtime_author_name',
'author',
'downtime_comment',
'downtime_entry_time',

View File

@ -276,7 +276,7 @@ abstract class MonitoredObject implements Filterable
'id' => 'downtime_internal_id',
'objecttype' => 'downtime_objecttype',
'comment' => 'downtime_comment',
'author' => 'downtime_author',
'author_name' => 'downtime_author_name',
'start' => 'downtime_start',
'scheduled_start' => 'downtime_scheduled_start',
'end' => 'downtime_end',