* adjust for sendmail.

This commit is contained in:
wangyidong
2019-07-26 17:48:52 +08:00
parent e258415f5a
commit 5ace83db9a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -894,7 +894,7 @@ class actionModel extends model
* @access public
* @return void
*/
public function printChanges($objectType, $histories)
public function printChanges($objectType, $histories, $canChangeTag = true)
{
if(empty($histories)) return;
@@ -921,7 +921,7 @@ class actionModel extends model
$history->diff = ($history->field != 'subversion' and $history->field != 'git') ? htmlspecialchars($history->diff) : $history->diff; // Keep the diff link.
$history->diff = str_replace(array('[ins]', '[/ins]', '[del]', '[/del]'), array('<ins>', '</ins>', '<del>', '</del>'), $history->diff);
$history->diff = nl2br($history->diff);
$history->noTagDiff = preg_replace('/&lt;\/?([a-z][a-z0-9]*)[^\/]*\/?&gt;/Ui', '', $history->diff);
$history->noTagDiff = $canChangeTag ? preg_replace('/&lt;\/?([a-z][a-z0-9]*)[^\/]*\/?&gt;/Ui', '', $history->diff) : '';
printf($this->lang->action->desc->diff2, $history->fieldLabel, $history->noTagDiff, $history->diff);
}
else
+1 -1
View File
@@ -27,7 +27,7 @@ if(file_exists($extViewFile))
<?php if(!empty($action->history)):?>
<tr>
<td style='padding: 10px;'>
<div><?php echo $this->action->printChanges($action->objectType, $action->history);?></div>
<div><?php $this->action->printChanges($action->objectType, $action->history, false);?></div>
</td>
</tr>
<?php endif;?>