* adjust for change bizVersion to edition.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<table class='table table-form'>
|
||||
<?php if(strpos('product|project|execution', $type) !== false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->project;?></th>
|
||||
<th><?php echo $lang->doc->{$type};?></th>
|
||||
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"{$type}\", this.value)'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user