Fixbug#21457

This commit is contained in:
renying
2022-04-21 09:27:36 +08:00
parent 6f8dfc3af3
commit b32081bab7
3 changed files with 12 additions and 7 deletions
+3 -2
View File
@@ -537,17 +537,18 @@ class tree extends control
* @param int $branchID
* @param int $number
* @param int $currentModuleID
* @param string $from showImport
* @access public
* @return string the html select string.
*/
public function ajaxGetModules($productID, $viewType = 'story', $branchID = 0, $number = 0, $currentModuleID = 0)
public function ajaxGetModules($productID, $viewType = 'story', $branchID = 0, $number = 0, $currentModuleID = 0, $from = '')
{
$currentModule = $this->tree->getById($currentModuleID);
$currentModuleID = (isset($currentModule->branch) and $currentModule->branch == 0) ? $currentModuleID : 0;
$modules = $this->tree->getOptionMenu($productID, $viewType, $startModuleID = 0, $branchID);
$moduleName = $viewType == 'bug' ? "modules[$number]" : "module[$number]";
$moduleName = $viewType == 'bug' && $from != 'showImport' ? "modules[$number]" : "module[$number]";
$modules = empty($modules) ? array('' => '') : $modules;
echo html::select($moduleName, $modules, $currentModuleID, 'class=form-control');
}