* [task#123519,doing,0.5h] move sendmail to mail.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user