* Fix bug.
This commit is contained in:
@@ -66,6 +66,7 @@ class webhookModel extends model
|
||||
|
||||
$this->loadModel('action');
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)->where('id')->in($actions)->fetchAll('id');
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($logs as $log)
|
||||
{
|
||||
@@ -80,7 +81,7 @@ class webhookModel extends model
|
||||
$object = $this->dao->select('*')->from($this->config->objectTables[$action->objectType])->where('id')->eq($action->objectID)->fetch();
|
||||
$field = zget($this->config->action->objectNameFields, $action->objectType, $action->objectType);
|
||||
|
||||
if(!is_object($object))
|
||||
if(!is_object($object))
|
||||
{
|
||||
$object = new stdclass;
|
||||
$object->$field = '';
|
||||
@@ -102,6 +103,8 @@ class webhookModel extends model
|
||||
|
||||
$log->action = $text;
|
||||
$log->actionURL = $this->getViewLink($action->objectType, $action->objectID);
|
||||
$log->module = $action->objectType;
|
||||
$log->dialog = $action->objectType == 'todo' ? 1 : 0;
|
||||
}
|
||||
return $logs;
|
||||
}
|
||||
|
||||
@@ -43,9 +43,11 @@
|
||||
<tr>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td><?php echo $log->date;?></td>
|
||||
<td class='text' title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
<td class='text' title='<?php echo $log->action;?>'><?php echo html::a($log->actionURL, $log->action);?></td>
|
||||
<td class='text-center'><?php echo $log->contentType;?></td>
|
||||
<td title='<?php echo $log->url;?>'><?php echo $log->url;?></td>
|
||||
<?php $iframe = $log->dialog == 1 ? 'data-toggle="modal" data-type="iframe"' : '';?>
|
||||
<?php if($log->dialog == 1) $log->actionURL = $this->createLink($log->module, 'view', "id=$log->objectID", '' , true)?>
|
||||
<td title='<?php echo $log->action;?>'><?php echo html::a($log->actionURL, $log->action, '', $iframe);?></td>
|
||||
<td title='<?php echo $log->contentType;?>'><?php echo $log->contentType;?></td>
|
||||
<td title='<?php echo $log->result;?>'><?php echo $log->result;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
Reference in New Issue
Block a user