公共文件
application/common.php
-
parseNodeStr
函数未使用,由AuthService::parseNodeStr代替 -
__buildData
函数未使用 -
get_location
函数未使用,通过淘宝提供的服务获取IP信息 -
install_substring
函数在install模块index/step3中使用,但其生成的数据并未被下一个动作使用。该函数的作用是对包含中文编码的字符串进行截取,可避免原生函数substr的乱码现象。
代码中有一处$a = substr('00000000 ' . $a, -8);
,连续的8个0字符后面多了一个空格,这个空格会被取出来做以下判断if (substr($a, 0, 1) == 0)
,由于空格会被转换成数值再比较,所以等式是成立的。
该函数应该可以用mb_substr代替。
application/tags.php
在app_begin
行为中,如果不存在config/lock/install.lock
文件则跳转到安装界面。运行非安装模块时,自动缓存system_config表中的basic组name/value
到’SysInfo’模板变量中。
以下代码引用该变量:
admin/Login.php控制器;
admin/login/index.html模板;
admin/public/footer.html模板;
admin/public/header.html模板;
模块
install模块
index控制器
- step3()
为模板分配的’install_dir’变量并未使用。整理后的代码为:
private function step3() {
return $this->fetch('install@index/step3');
}
另外需要删除模板中对此变量的引用。删除view/step3.html中以下内容:
<input type="hidden" name="install_dir" value="{$install_dir}">
。
前端
js插件说明
static/plugs/layui
layui组件。官方网站:https://www.layui.com/。
static/plugs/layui-layer
第三方layui组件,依赖layui。目前仅用在application/common.php的alert函数中。官方网站:http://layer.layui.com/。
static/plugs/layui-xtree2.0
第三方layui组件,依赖layui。与layui.tree模块功能相似。目前未使用。官方网站:http://acmeworker.com/layuiXtree/XtreeDemo。