* [task#123519,doing,0.5h] move sendmail to mail.

This commit is contained in:
sunguangming
2024-07-29 08:54:35 +08:00
committed by 王怡栋
parent 457ada1738
commit dd90f73bb9
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -570,7 +570,7 @@ class release extends control
$this->release->changeStatus($releaseID, $this->post->status, $this->post->releasedDate);
if(dao::isError()) return $this->sendError(dao::getError());
$this->loadModel('action')->create('release', $releaseID, 'published', $this->post->comment);
$this->loadModel('action')->create('release', $releaseID, 'published', $this->post->comment, $this->post->status);
return $this->sendSuccess(array('load' => true, 'closeModal' => true));
}
+4 -4
View File
@@ -708,16 +708,16 @@ class releaseModel extends model
/* Get mail content. */
$modulePath = $this->app->getModulePath('', 'release');
$oldcwd = getcwd();
$viewFile = $modulePath . 'view/sendmail.html.php';
$viewFile = $modulePath . 'view/mail.html.php';
chdir($modulePath . 'view');
if(file_exists($modulePath . 'ext/view/sendmail.html.php'))
if(file_exists($modulePath . 'ext/view/mail.html.php'))
{
$viewFile = $modulePath . 'ext/view/sendmail.html.php';
$viewFile = $modulePath . 'ext/view/mail.html.php';
chdir($modulePath . 'ext/view');
}
ob_start();
include $viewFile;
foreach(glob($modulePath . 'ext/view/sendmail.*.html.hook.php') as $hookFile) include $hookFile;
foreach(glob($modulePath . 'ext/view/mail.*.html.hook.php') as $hookFile) include $hookFile;
$mailContent = ob_get_contents();
ob_end_clean();
chdir($oldcwd);