From f161d4133b3a7b2b97a4a72cd3ccb64b51847a20 Mon Sep 17 00:00:00 2001 From: z Date: Wed, 25 Nov 2020 16:14:22 +0800 Subject: [PATCH] * code for task #8496. --- module/block/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/block/model.php b/module/block/model.php index 42d017df79..821b8e0c02 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -768,6 +768,7 @@ class blockModel extends model list($moduleName, $blockKey) = explode('|', $block); if(empty($moduleName)) { + if(isset($this->lang->block->$blockKey)) $blockPairs[$block] = $this->lang->block->$blockKey; if($blockKey == 'html') $blockPairs[$block] = 'HTML'; if($blockKey == 'flowchart') $blockPairs[$block] = $this->lang->block->lblFlowchart; if($blockKey == 'dynamic') $blockPairs[$block] = $this->lang->block->dynamic; @@ -778,7 +779,11 @@ class blockModel extends model $blockName = $blockKey; if(isset($this->lang->block->modules[$moduleName]->availableBlocks->$blockKey)) $blockName = $this->lang->block->modules[$moduleName]->availableBlocks->$blockKey; if(isset($this->lang->block->availableBlocks->$blockKey)) $blockName = $this->lang->block->availableBlocks->$blockKey; - $blockPairs[$block] = "{$this->lang->block->moduleList[$moduleName]}|{$blockName}"; + if(isset($this->lang->block->modules['scrum']['index']->availableBlocks->$blockKey)) $blockName = $this->lang->block->modules['scrum']['index']->availableBlocks->$blockKey; + if(isset($this->lang->block->modules['waterfall']['index']->availableBlocks->$blockKey)) $blockName = $this->lang->block->modules['waterfall']['index']->availableBlocks->$blockKey; + + $blockPairs[$block] = isset($this->lang->block->moduleList[$moduleName]) ? "{$this->lang->block->moduleList[$moduleName]}|" : ''; + $blockPairs[$block] .= $blockName; } }