From 323f7366bae38c85f1f1589889d6a2fcddd169a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Mon, 18 Apr 2022 13:26:25 +0800 Subject: [PATCH] * code for bug #21020. --- module/block/control.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/block/control.php b/module/block/control.php index a1b2a7e7a6..2ed074a095 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -228,16 +228,17 @@ class block extends control $blocks = $this->block->getBlockList($module, $type); $vision = $this->config->vision; - $commonField = 'common'; + $section = 'common'; if($module == 'project' and $projectID) { - $project = $this->loadModel('project')->getByID($projectID); - $commonField = $project->model . 'common'; + $project = $this->loadModel('project')->getByID($projectID); + $section = $project->model . 'common'; } $inited = $this->dao->select('*')->from(TABLE_CONFIG) ->where('module')->eq($module) ->andWhere('owner')->eq($this->app->user->account) + ->andWhere('`section`')->eq($section)->fi() ->andWhere('`key`')->eq('blockInited') ->andWhere('vision')->eq($vision) ->fetch('value');