* Fix bug #17944.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
|
||||
<?php $color = empty($object->color) ? '#333' : $object->color;?>
|
||||
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink('bug', 'view', "bugID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
<?php echo html::a($domain . helper::createLink('bug', 'view', "bugID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
|
||||
<?php $color = empty($object->color) ? '#333' : $object->color;?>
|
||||
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink('doc', 'view', "docID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
<?php echo html::a($domain . helper::createLink('doc', 'view', "docID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -691,6 +691,7 @@ class mailModel extends model
|
||||
$nameFields = $this->config->action->objectNameFields[$objectType];
|
||||
$title = zget($object, $nameFields, '');
|
||||
$subject = $this->getSubject($objectType, $object, $title, $action->action);
|
||||
$domain = defined('RUN_MODE') && RUN_MODE == 'api' ? '' : zget($this->config->mail, 'domain', common::getSysURL());
|
||||
|
||||
if($objectType == 'review' and empty($object->auditedBy)) return;
|
||||
|
||||
|
||||
@@ -72,8 +72,15 @@ class messageModel extends model
|
||||
$actions = $messageSetting['mail']['setting'];
|
||||
if(isset($actions[$objectType]) and in_array($actionType, $actions[$objectType]))
|
||||
{
|
||||
/* If it is an api call, get the request method set by the user. */
|
||||
global $config;
|
||||
$requestType = $this->config->requestType;
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') include $this->app->getConfigRoot() . 'my.php';
|
||||
|
||||
$moduleName = $objectType == 'case' ? 'testcase' : $objectType;
|
||||
$this->loadModel('mail')->sendmail($objectID, $actionID);
|
||||
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') $this->config->requestType = $requestType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
|
||||
<?php $color = empty($object->color) ? '#333' : $object->color;?>
|
||||
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink('story', 'view', "storyID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
<?php echo html::a($domain . helper::createLink('story', 'view', "storyID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
|
||||
<?php $color = empty($object->color) ? '#333' : $object->color;?>
|
||||
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink('task', 'view', "taskID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
<?php echo html::a($domain . helper::createLink('task', 'view', "taskID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'>
|
||||
<?php $color = empty($object->color) ? '#333' : $object->color;?>
|
||||
<?php echo html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink('testtask', 'view', "testtaskID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
<?php echo html::a($domain . helper::createLink('testtask', 'view', "testtaskID=$object->id", 'html'), $mailTitle, '', "style='color: {$color}; text-decoration: underline;'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user