From 901fc68f3c5c45a785100cd38dea36b589d9fb29 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 24 Apr 2023 17:00:52 +0800 Subject: [PATCH] * adjust for change bizVersion to edition. --- framework/control.class.php | 10 +++++----- framework/model.class.php | 18 +++++++++--------- framework/router.class.php | 2 +- module/doc/view/editothertype.html.php | 2 +- module/project/control.php | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/framework/control.class.php b/framework/control.class.php index 82549c6859..2dfca05829 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -35,7 +35,7 @@ class control extends baseControl $this->app->setOpenApp(); - if(!isset($this->config->bizVersion)) return false; + if($this->config->edition == 'open') return false; /* Code for task #9224. Set requiredFields for workflow. */ if($this->dbh and (defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE == 'api'))) @@ -424,7 +424,7 @@ class control extends baseControl */ public function buildOperateMenu($object, $type = 'view') { - if(!isset($this->config->bizVersion)) return false; + if($this->config->edition == 'open') return false; $moduleName = $this->moduleName; return $this->$moduleName->buildOperateMenu($object, $type); @@ -439,7 +439,7 @@ class control extends baseControl */ public function executeHooks($objectID) { - if(!isset($this->config->bizVersion)) return false; + if($this->config->edition == 'open') return false; $moduleName = $this->moduleName; return $this->$moduleName->executeHooks($objectID); @@ -454,7 +454,7 @@ class control extends baseControl */ public function getFlowExportFields() { - if(!isset($this->config->bizVersion)) return array(); + if($this->config->edition == 'open') return array(); $moduleName = $this->moduleName; return $this->$moduleName->getFlowExportFields(); @@ -478,7 +478,7 @@ class control extends baseControl */ public function printExtendFields($object, $type, $extras = '', $print = true, $moduleName = '', $methodName = '') { - if(!isset($this->config->bizVersion)) return false; + if($this->config->edition == 'open') return false; $moduleName = $moduleName ? $moduleName : $this->app->getModuleName(); $methodName = $methodName ? $methodName : $this->app->getMethodName(); diff --git a/framework/model.class.php b/framework/model.class.php index 2287fb1103..b94ced3241 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -99,7 +99,7 @@ class model extends baseModel if(empty($method)) $method = $methodName; static $actions = array(); - if(isset($this->config->bizVersion)) + if($this->config->edition != 'open') { if(empty($actions[$moduleName])) { @@ -155,7 +155,7 @@ class model extends baseModel */ public function buildFlowMenu($module, $data, $type = 'browse', $show = '') { - if(!isset($this->config->bizVersion)) return ''; + if($this->config->edition == 'open') return ''; $moduleName = $module; if(strpos($module, '.') !== false) list($appName, $moduleName) = explode('.', $module); @@ -233,7 +233,7 @@ class model extends baseModel */ public function processStatus($module, $record) { - if(!isset($this->config->bizVersion) or empty($record->subStatus)) return zget($this->lang->$module->statusList, $record->status); + if($this->config->edition == 'open' or empty($record->subStatus)) return zget($this->lang->$module->statusList, $record->status); return $this->loadModel('workflowfield')->processSubStatus($module, $record); } @@ -247,7 +247,7 @@ class model extends baseModel */ public function processExportData($data) { - if(!isset($this->config->bizVersion)) return $data; + if($this->config->edition == 'open') return $data; return $this->loadModel('workflowfield')->processExportData($data); } @@ -261,7 +261,7 @@ class model extends baseModel */ public function processExportOptions($data) { - if(!isset($this->config->bizVersion)) return $data; + if($this->config->edition == 'open') return $data; return $this->loadModel('workflowfield')->processExportOptions($data); } @@ -275,7 +275,7 @@ class model extends baseModel */ public function processImportData($data) { - if(!isset($this->config->bizVersion)) return $data; + if($this->config->edition == 'open') return $data; return $this->loadModel('workflowfield')->processImportData($data); } @@ -288,7 +288,7 @@ class model extends baseModel */ public function getFlowExtendFields() { - if(!isset($this->config->bizVersion)) return array(); + if($this->config->edition == 'open') return array(); return $this->loadModel('flow')->getExtendFields($this->app->getModuleName(), $this->app->getMethodName()); } @@ -301,7 +301,7 @@ class model extends baseModel */ public function getFlowExportFields() { - if(!isset($this->config->bizVersion)) return array(); + if($this->config->edition == 'open') return array(); return $this->loadModel('workflowfield')->getExportFields($this->app->getModuleName()); } @@ -315,7 +315,7 @@ class model extends baseModel */ public function executeHooks($objectID) { - if(!isset($this->config->bizVersion)) return false; + if($this->config->edition == 'open') return false; $moduleName = $this->app->getModuleName(); $methodName = $this->app->getMethodName(); diff --git a/framework/router.class.php b/framework/router.class.php index ac909cfb8b..41f2eaa016 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -478,7 +478,7 @@ class router extends baseRouter if(empty($this->rawMethod)) $this->rawMethod = $this->methodName; /* If is not a biz version or is in install mode or in in upgrade mode, call parent method. */ - if(!isset($this->config->bizVersion) or defined('IN_INSTALL') or defined('IN_UPGRADE')) return parent::setControlFile($exitIfNone); + if($this->config->edition == 'open' or defined('IN_INSTALL') or defined('IN_UPGRADE')) return parent::setControlFile($exitIfNone); /* Check if the requested module is defined in workflow. */ $flow = $this->dbh->query("SELECT * FROM " . TABLE_WORKFLOW . " WHERE `module` = '$this->moduleName'")->fetch(); diff --git a/module/doc/view/editothertype.html.php b/module/doc/view/editothertype.html.php index fe120dfb06..132dfa39a6 100644 --- a/module/doc/view/editothertype.html.php +++ b/module/doc/view/editothertype.html.php @@ -30,7 +30,7 @@ - + diff --git a/module/project/control.php b/module/project/control.php index 7d80027c0c..1ed9cfc8d4 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -904,7 +904,7 @@ class project extends control /* Check exist extend fields. */ $isExtended = false; - if(!empty($this->config->bizVersion)) + if($this->config->edition != 'open') { $extend = $this->loadModel('workflowaction')->getByModuleAndAction('project', 'view'); if(!empty($extend) and $extend->extensionType == 'extend') $isExtended = true;
doc->project;?>doc->{$type};?>