From c7ef3803996cbd6a66170ba62e2ca7478e87f4c7 Mon Sep 17 00:00:00 2001 From: songchenxuan Date: Mon, 27 Nov 2023 13:55:30 +0800 Subject: [PATCH] * Use oldPages in framework control display function. --- framework/base/control.class.php | 4 +++- module/index/config.php | 1 + module/screen/model.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/base/control.class.php b/framework/base/control.class.php index dfff7dbefc..7d0305fc21 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -941,7 +941,9 @@ class baseControl $modulePath = $this->app->getModulePath($this->appName, $moduleName); $viewType = $this->viewType == 'mhtml' ? 'html' : $this->viewType; $mainViewFile = $modulePath . 'ui' . DS . $this->devicePrefix . strtolower($methodName) . '.' . $viewType . '.php'; - if($moduleName != 'screen' || $methodName != 'view') return $this->render($moduleName, $methodName); + + if($moduleName != 'index') $this->app->loadModuleConfig('index'); + if(!in_array("{$moduleName}-{$methodName}", $this->config->index->oldPages)) return $this->render($moduleName, $methodName); } if(empty($this->output)) $this->parse($moduleName, $methodName); diff --git a/module/index/config.php b/module/index/config.php index 0430f23e18..b3a95c863b 100644 --- a/module/index/config.php +++ b/module/index/config.php @@ -24,3 +24,4 @@ $config->index->appGroup['user'] = 'admin'; $config->index->oldPages = array(); $config->index->oldPages[] = 'screen-view'; +$config->index->oldPages[] = 'screen-burn'; diff --git a/module/screen/model.php b/module/screen/model.php index c96808bb5f..fabe183996 100755 --- a/module/screen/model.php +++ b/module/screen/model.php @@ -67,6 +67,7 @@ class screenModel extends model public function getByID(int $screenID, int $year = 0, int $dept = 0, string $account = ''): object|bool { $screen = $this->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq($screenID)->fetch(); + if($screen->id == 5) return $screen; if(!$screen) return false; if(empty($screen->scheme)) $screen->scheme = file_get_contents(__DIR__ . '/json/screen.json');