*fix api.

This commit is contained in:
zhengrunyu
2022-03-08 13:56:26 +08:00
parent d62013b39f
commit 2a6f7cbc4b
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ class bugEntry extends entry
$oldBug = $this->loadModel('bug')->getByID($bugID);
/* Set $_POST variables. */
$fields = 'title,project,execution,openedBuild,assignedTo,pri,severity,type,story,resolvedBy,closedBy,resolution,product,plan,task,module,steps';
$fields = 'title,project,execution,openedBuild,assignedTo,pri,severity,type,story,resolvedBy,closedBy,resolution,product,plan,task,module,steps,mailto';
$this->batchSetPost($fields, $oldBug);
$this->setPost('notifyEmail', implode(',', $this->request('notifyEmail', array())));
+13
View File
@@ -286,7 +286,20 @@ class baseEntry
* 引入该模块的control文件。
* Include the control file of the module.
**/
$file2Included = $app->setActionExtFile() ? $app->extActionFile : $app->controlFile;
$isExt = $app->setActionExtFile();
if($isExt)
{
$controlFile = $app->controlFile;
spl_autoload_register(function($class) use ($moduleName, $controlFile)
{
if($class == $moduleName) include $controlFile;
});
}
$file2Included = $isExt ? $app->extActionFile : $app->controlFile;
chdir(dirname($file2Included));
helper::import($file2Included);
}