Browse Source

1.1.0

pull/207/head
xiaoz 3 days ago
parent
commit
cb066da58e
  1. 12
      controller/init.php
  2. 3
      data/update.log
  3. 2
      templates/default2/assets/index.css
  4. 2
      templates/default2/assets/index.js
  5. 4
      templates/default2/info.json

12
controller/init.php

@ -14,6 +14,8 @@ function check_env() {
$php_version = floatval(PHP_VERSION); $php_version = floatval(PHP_VERSION);
$uri = $_SERVER["REQUEST_URI"]; $uri = $_SERVER["REQUEST_URI"];
// var_dump($uri);
if( ( $php_version < 7 ) || ( $php_version > 8 ) ) { if( ( $php_version < 7 ) || ( $php_version > 8 ) ) {
exit("当前PHP版本{$php_version}不满足要求,需要7.0 <= PHP <= 7.4"); exit("当前PHP版本{$php_version}不满足要求,需要7.0 <= PHP <= 7.4");
} }
@ -41,11 +43,15 @@ function check_env() {
if( file_exists("data/config.php") ) { if( file_exists("data/config.php") ) {
exit("配置文件已存在,无需再次初始化!"); exit("配置文件已存在,无需再次初始化!");
} }
//检查是否是二级目录 // 路径必须以/或者/index.php开头
$pattern = '/\/[a-z0-9\/]+$/'; if( !preg_match('/^\/|\/index.php/',$uri) ) {
if( preg_match_all($pattern,$uri) ) {
exit("暂不支持二级目录安装!"); exit("暂不支持二级目录安装!");
} }
//检查是否是二级目录
// $pattern = '/\/[a-z0-9\/]+$/';
// if( preg_match_all($pattern,$uri) ) {
// exit("暂不支持二级目录安装!");
// }
return TRUE; return TRUE;
} }

3
data/update.log

@ -1,3 +1,6 @@
2024.12.23
1. 优化禁止二级目录安装检测
2024.12.19 2024.12.19
1. 修复default2主题编辑链接导致备用链接丢失问题 1. 修复default2主题编辑链接导致备用链接丢失问题
2. 新增AI功能及相关API接口:ai_search 2. 新增AI功能及相关API接口:ai_search

2
templates/default2/assets/index.css

File diff suppressed because one or more lines are too long

2
templates/default2/assets/index.js

File diff suppressed because one or more lines are too long

4
templates/default2/info.json

@ -3,8 +3,8 @@
"description": "OneNav目前功能最强大的默认主题,推荐使用。", "description": "OneNav目前功能最强大的默认主题,推荐使用。",
"homepage": "https:\/\/blog.xiaoz.org", "homepage": "https:\/\/blog.xiaoz.org",
"help_url":"https://dwz.ovh/gnae4", "help_url":"https://dwz.ovh/gnae4",
"version": "1.2.0", "version": "1.2.4",
"update": "2024\/12\/20", "update": "2024\/12\/23",
"author": "xiaoz<xiaoz93@outlook.com>", "author": "xiaoz<xiaoz93@outlook.com>",
"screenshot": "https://v.png.pub/imgs/2024/11/27/c01894e5d9e0d850.png", "screenshot": "https://v.png.pub/imgs/2024/11/27/c01894e5d9e0d850.png",
"demo":"https://nav.rss.ink", "demo":"https://nav.rss.ink",

Loading…
Cancel
Save