升级到31版本、修改学生成绩筛选
This commit is contained in:
1 parent
a79e7bf237
commit
d8ec4fad39
34 files changed
+447
-114
No files matched your search
+2
-2
@@ -313,9 +313,9 @@ if (!function_exists('download')) {
|
||||
* @param integer $expire 有效期(秒)
|
||||
* @return \think\response\Download
|
||||
*/
|
||||
function download($filename, $name = '', $content = false, $expire = 180)
|
||||
function download($filename, $name = '', $content = false, $expire = 360, $openinBrower = false)
|
||||
{
|
||||
return Response::create($filename, 'download')->name($name)->isContent($content)->expire($expire);
|
||||
return Response::create($filename, 'download')->name($name)->isContent($content)->expire($expire)->openinBrower($openinBrower);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use think\route\Dispatch;
|
||||
*/
|
||||
class App extends Container
|
||||
{
|
||||
const VERSION = '5.1.29 LTS';
|
||||
const VERSION = '5.1.31 LTS';
|
||||
|
||||
/**
|
||||
* 当前模块路径
|
||||
|
||||
@@ -1314,6 +1314,21 @@ class Request
|
||||
return isset($this->header[$name]) ? $this->header[$name] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归重置数组指针
|
||||
* @access public
|
||||
* @param array $data 数据源
|
||||
* @return void
|
||||
*/
|
||||
public function arrayReset(array &$data) {
|
||||
foreach ($data as &$value) {
|
||||
if (is_array($value)) {
|
||||
$this->arrayReset($value);
|
||||
}
|
||||
}
|
||||
reset($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取变量 支持过滤和默认值
|
||||
* @access public
|
||||
@@ -1353,7 +1368,10 @@ class Request
|
||||
|
||||
if (is_array($data)) {
|
||||
array_walk_recursive($data, [$this, 'filterValue'], $filter);
|
||||
reset($data);
|
||||
if (version_compare(PHP_VERSION, '7.1.0', '<')) {
|
||||
// 恢复PHP版本低于 7.1 时 array_walk_recursive 中消耗的内部指针
|
||||
$this->arrayReset($data);
|
||||
}
|
||||
} else {
|
||||
$this->filterValue($data, $name, $filter);
|
||||
}
|
||||
|
||||
Loaded 3 of 34 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user