diff --git a/module/bug/control.php b/module/bug/control.php index 4c434ef415..1a61f8425b 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -836,7 +836,9 @@ class bug extends control if($this->post->bugIDList) { $bugIDList = $this->post->bugIDList; - foreach($_POST as $postKey => $postValue) unset($_POST[$postKey]); + + /* Reset $_POST. Do not unset that because the function of close need that in model. */ + $_POST = array(); $bugs = $this->bug->getList($bugIDList); foreach($bugs as $bugID => $bug) diff --git a/module/bug/model.php b/module/bug/model.php index 100ff52e7f..994c7124f9 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -78,6 +78,7 @@ class bugModel extends model $data = fixer::input('post')->get(); $actions = array(); + /* Get pairs(moduleID => moduleOwner) for bug. */ $stmt = $this->dbh->query($this->loadModel('tree')->buildMenuQuery($productID, 'bug', $startModuleID = 0)); $moduleOwners = array(); while($module = $stmt->fetch()) $moduleOwners[$module->id] = $module->owner; diff --git a/module/bug/view/sendmail.html.php b/module/bug/view/sendmail.html.php index af791bb650..003295c46f 100644 --- a/module/bug/view/sendmail.html.php +++ b/module/bug/view/sendmail.html.php @@ -24,15 +24,7 @@ if($onlybody) $_GET['onlybody'] = 'no';
bug->legendSteps;?> -
- steps, 'src="data/upload')) - { - $bug->steps = preg_replace('/server->http_host . $this->config->webRoot, $bug->steps); - } - echo $bug->steps; - ?> -
+
steps;?>
diff --git a/module/mail/model.php b/module/mail/model.php index a757da09bf..77d6ce94ed 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -272,6 +272,9 @@ class mailModel extends model $this->clear(); + /* Replace full webPath image for mail. */ + if(strpos($body, 'src="data/upload')) $body = preg_replace('/server->http_host . $this->config->webRoot, $body); + try { $this->mta->setFrom($this->config->mail->fromAddress, $this->convertCharset($this->config->mail->fromName)); diff --git a/module/project/view/sendmail.html.php b/module/project/view/sendmail.html.php index 072da1f4c5..8085db722d 100644 --- a/module/project/view/sendmail.html.php +++ b/module/project/view/sendmail.html.php @@ -24,15 +24,7 @@ if($onlybody) $_GET['onlybody'] = 'no';
task->legendDesc;?> -
- desc, 'src="data/upload')) - { - $task->desc = preg_replace('/server->http_host . $this->config->webRoot, $task->desc); - } - echo $task->desc; - ?> -
+
desc;?>
diff --git a/module/story/view/sendmail.html.php b/module/story/view/sendmail.html.php index 8483264af6..60e1c9201f 100644 --- a/module/story/view/sendmail.html.php +++ b/module/story/view/sendmail.html.php @@ -24,15 +24,7 @@ if($onlybody) $_GET['onlybody'] = 'no';
story->legendSpec;?> -
- spec, 'src="data/upload')) - { - $story->spec = preg_replace('/server->http_host . $this->config->webRoot, $story->spec); - } - echo $story->spec; - ?> -
+
spec;?>
diff --git a/module/task/view/sendmail.html.php b/module/task/view/sendmail.html.php index 18778e2d4f..abdaa6d799 100644 --- a/module/task/view/sendmail.html.php +++ b/module/task/view/sendmail.html.php @@ -24,15 +24,7 @@ if($onlybody) $_GET['onlybody'] = 'no';
task->legendDesc;?> -
- desc, 'src="data/upload')) - { - $task->desc = preg_replace('/server->http_host . $this->config->webRoot, $task->desc); - } - echo $task->desc; - ?> -
+
desc;?>
diff --git a/module/testtask/view/sendmail.html.php b/module/testtask/view/sendmail.html.php index df51da4d74..ee938b2ac8 100644 --- a/module/testtask/view/sendmail.html.php +++ b/module/testtask/view/sendmail.html.php @@ -24,15 +24,7 @@ if($onlybody) $_GET['onlybody'] = 'no';
testtask->desc;?> -
- desc, 'src="data/upload')) - { - $testtask->desc = preg_replace('/server->http_host . $this->config->webRoot, $testtask->desc); - } - echo $testtask->desc; - ?> -
+
desc;?>