* fix bug #952.
This commit is contained in:
+14
-3
@@ -2181,9 +2181,20 @@ class bugModel extends model
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
/* Get action info. */
|
||||
$action = $this->loadModel('action')->getById($actionID);
|
||||
$history = $this->action->getHistory($actionID);
|
||||
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
|
||||
$action = $this->loadModel('action')->getById($actionID);
|
||||
$history = $this->action->getHistory($actionID);
|
||||
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
|
||||
$action->appendLink = '';
|
||||
if(strpos($action->extra, ':')!== false)
|
||||
{
|
||||
list($extra, $id) = explode(':', $action->extra);
|
||||
$action->extra = $extra;
|
||||
if($id)
|
||||
{
|
||||
$name = $this->dao->select('title')->from(TABLE_BUG)->where('id')->eq($id)->fetch('title');
|
||||
if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id"), "#$id " . $name);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get mail content. */
|
||||
$modulePath = $this->app->getModulePath();
|
||||
|
||||
@@ -298,7 +298,7 @@ class mailModel extends model
|
||||
$this->clear();
|
||||
|
||||
/* Replace full webPath image for mail. */
|
||||
if(strpos($body, 'src="data/upload')) $body = preg_replace('/<img (.*)src="data\/upload/', '<img $1 src="' . zget($this->config->mail, 'domain', common::getSysURL()) . $this->config->webRoot . 'data/upload', $body);
|
||||
if(preg_match('/src="\/?data\/upload/U', $body)) $body = preg_replace('/<img (.*)src="\/?data\/upload/', '<img $1 src="' . zget($this->config->mail, 'domain', common::getSysURL()) . $this->config->webRoot . 'data/upload', $body);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
+12
-1
@@ -2349,7 +2349,18 @@ class storyModel extends model
|
||||
/* Get actions. */
|
||||
$action = $this->loadModel('action')->getById($actionID);
|
||||
$history = $this->action->getHistory($actionID);
|
||||
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
|
||||
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
|
||||
$action->appendLink = '';
|
||||
if(strpos($action->extra, ':')!== false)
|
||||
{
|
||||
list($extra, $id) = explode(':', $action->extra);
|
||||
$action->extra = $extra;
|
||||
if($id)
|
||||
{
|
||||
$name = $this->dao->select('title')->from(TABLE_STORY)->where('id')->eq($id)->fetch('title');
|
||||
if($name) $action->appendLink = html::a(zget($this->config->mail, 'domain', common::getSysURL()) . helper::createLink($action->objectType, 'view', "id=$id"), "#$id " . $name);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get mail content. */
|
||||
$modulePath = $this->app->getModulePath();
|
||||
|
||||
Reference in New Issue
Block a user