* Fix error of 20 version.
This commit is contained in:
@@ -347,6 +347,14 @@ class baseRouter
|
||||
*/
|
||||
public $sessionID;
|
||||
|
||||
/**
|
||||
* 请求开始时间。
|
||||
* The start time of the request.
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
public $startTime;
|
||||
|
||||
/**
|
||||
* 网站代号。
|
||||
* The code of current site.
|
||||
@@ -444,6 +452,19 @@ class baseRouter
|
||||
return new $className($appName, $appRoot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置请求开始时间。
|
||||
* The start time of the request.
|
||||
*
|
||||
* @param float $startTime
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setStartTime(float $startTime)
|
||||
{
|
||||
$this->startTime = $startTime;
|
||||
}
|
||||
|
||||
//-------------------- 路径相关方法(Path related methods)--------------------//
|
||||
|
||||
/**
|
||||
|
||||
@@ -375,6 +375,9 @@ class router extends baseRouter
|
||||
/* 先获得模块的主配置文件。Get the main config file for current module first. */
|
||||
$mainConfigFile = $this->getModulePath($appName, $moduleName) . 'config.php';
|
||||
|
||||
/* 获取 config 目录的配置文件。Get config files from config directory. */
|
||||
$configDirFiles = helper::ls($this->getModulePath($appName, $moduleName) . DS . 'config', '.php');
|
||||
|
||||
/* 查找扩展配置文件。Get extension config files. */
|
||||
if($config->framework->extensionLevel > 0) $extConfigPath = $this->getModuleExtPath($appName, $moduleName, 'config');
|
||||
if($config->framework->extensionLevel >= 1)
|
||||
@@ -386,7 +389,7 @@ class router extends baseRouter
|
||||
if(!empty($extConfigPath['custom'])) $commonExtConfigFiles = array_merge($commonExtConfigFiles, helper::ls($extConfigPath['custom'], '.php'));
|
||||
}
|
||||
if($config->framework->extensionLevel == 2 and !empty($extConfigPath['site'])) $siteExtConfigFiles = helper::ls($extConfigPath['site'], '.php');
|
||||
$extConfigFiles = array_merge($commonExtConfigFiles, $siteExtConfigFiles);
|
||||
$extConfigFiles = array_merge($commonExtConfigFiles, $configDirFiles, $siteExtConfigFiles);
|
||||
|
||||
/* 将主配置文件和扩展配置文件合并在一起。Put the main config file and extension config files together. */
|
||||
$configFiles = array_merge(array($mainConfigFile), $extConfigFiles);
|
||||
|
||||
@@ -8,7 +8,7 @@ class tabPane extends wg
|
||||
'key: string',
|
||||
'title: string',
|
||||
'active?: bool=false',
|
||||
'param: string',
|
||||
'param?: string',
|
||||
);
|
||||
|
||||
protected static array $defineBlocks = array(
|
||||
|
||||
@@ -5,14 +5,15 @@ namespace zin;
|
||||
class tree extends wg
|
||||
{
|
||||
protected static array $defineProps = array(
|
||||
'type: string',
|
||||
'items: array',
|
||||
'type?: string',
|
||||
'id?: string',
|
||||
'icon?: string',
|
||||
'class?: string',
|
||||
'canUpdateOrder?: bool=false',
|
||||
'canEdit?: bool=false',
|
||||
'canDelete?: bool=false',
|
||||
'canSplit?: bool=true',
|
||||
);
|
||||
|
||||
public static function getPageJS(): string|false
|
||||
@@ -31,11 +32,15 @@ class tree extends wg
|
||||
$canUpdateOrder = $this->prop('canUpdateOrder');
|
||||
$canEdit = $this->prop('canEdit');
|
||||
$canDelete = $this->prop('canDelete');
|
||||
$canSplit = $this->prop('canSplit');
|
||||
$editType = $this->prop('type');
|
||||
|
||||
foreach($items as $key => $item)
|
||||
{
|
||||
$item = (array)$item;
|
||||
$item['url'] = isset($item['url']) ? $item['url'] : '';
|
||||
$item['type'] = isset($item['type']) ? $item['type'] : '';
|
||||
|
||||
$treeItem = array('text' => $item['name'], 'url' => $item['url'], 'id' => $item['id'], 'key' => $item['key']);
|
||||
if($item['type'] == 'product')
|
||||
{
|
||||
@@ -48,7 +53,7 @@ class tree extends wg
|
||||
|
||||
if($canEdit) $treeItem['actions']['items'][] = array('key' => 'edit', 'icon' => 'edit', 'id' => $item['id'], 'editType' => $editType, 'onClick' => jsRaw('(event, item) => window.editItem(item)'));
|
||||
if($canDelete) $treeItem['actions']['items'][] = array('key' => 'delete', 'icon' => 'trash', 'id' => $item['id'], 'class' => 'btn ghost toolbar-item square size-sm rounded ajax-submit','url' => helper::createLink('tree', 'delete', 'module=' . $item['id']));
|
||||
$treeItem['actions']['items'][] = array('key' => 'view', 'icon' => 'split', 'url' => $item['url']);
|
||||
if($canSplit) $treeItem['actions']['items'][] = array('key' => 'view', 'icon' => 'split', 'url' => $item['url']);
|
||||
}
|
||||
|
||||
if(isset($item['children'])) $treeItem['items'] = $this->buildTree($item['children']);
|
||||
|
||||
@@ -22,7 +22,7 @@ class pipelineModel extends model
|
||||
public function getByID($id)
|
||||
{
|
||||
$pipeline = $this->dao->select('*')->from(TABLE_PIPELINE)->where('id')->eq($id)->fetch();
|
||||
if($pipeline)
|
||||
if(!empty($pipeline->password))
|
||||
{
|
||||
$pipeline->password = base64_decode($pipeline->password);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ $config->installedVersion = $app->getInstalledVersion();
|
||||
if($config->version != $config->installedVersion) die(header('location: upgrade.php'));
|
||||
|
||||
/* Run the app. */
|
||||
$app->setStartTime($startTime);
|
||||
$common = $app->loadCommon();
|
||||
|
||||
/* Check the request is getconfig or not. */
|
||||
|
||||
Reference in New Issue
Block a user