Browse Source

1.1.0

pull/207/head
xiaoz 2 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

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

3
data/update.log

@ -1,3 +1,6 @@ @@ -1,3 +1,6 @@
2024.12.23
1. 优化禁止二级目录安装检测
2024.12.19
1. 修复default2主题编辑链接导致备用链接丢失问题
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 @@ @@ -3,8 +3,8 @@
"description": "OneNav目前功能最强大的默认主题,推荐使用。",
"homepage": "https:\/\/blog.xiaoz.org",
"help_url":"https://dwz.ovh/gnae4",
"version": "1.2.0",
"update": "2024\/12\/20",
"version": "1.2.4",
"update": "2024\/12\/23",
"author": "xiaoz<xiaoz93@outlook.com>",
"screenshot": "https://v.png.pub/imgs/2024/11/27/c01894e5d9e0d850.png",
"demo":"https://nav.rss.ink",

Loading…
Cancel
Save