This commit is contained in:
Gitea
2022-03-30 09:13:50 +08:00
parent 15dfc6576b
commit 557aa3c555
179 changed files with 6115 additions and 4092 deletions

View File

@@ -18,6 +18,10 @@ class ApiController extends Controller
{
// 自动缓存基础信息
cache_config();
// 从配置文件读取cmsname参数来设置系统名称
define("CMSNAME", $this->config("cmsname") ?: 'PbootCMS');
$this->checkAccess($this->config());
}

View File

@@ -19,6 +19,9 @@ class HomeController extends Controller
// 自动缓存基础信息
cache_config();
// 从配置文件读取cmsname参数来设置系统名称
define("CMSNAME", $this->config("cmsname") ?: 'PbootCMS');
// 站点关闭检测
if (! ! $close_site = Config::get('close_site')) {
$close_site_note = Config::get('close_site_note');
@@ -38,6 +41,7 @@ class HomeController extends Controller
} else {
header("Location: http://" . $main_domain . ':' . $_SERVER['SERVER_PORT'], true, 301);
}
exit();
}
}
@@ -92,7 +96,8 @@ class HomeController extends Controller
} else {
$pre = 'http://';
}
header('Location:' . $pre . $this->config('wap_domain') . URL, true, 301); // 手机访问并且绑定了域名,但是访问域名不一致则跳转
header('Location:' . $pre . $this->config('wap_domain') . URL, true, 302); // 手机访问并且绑定了域名,但是访问域名不一致则跳转
exit();
} elseif (is_mobile()) { // 其他情况手机访问则自动手机版本
$this->setTheme(get_theme() . '/wap');
} else { // 其他情况,电脑版本

View File

@@ -184,7 +184,10 @@ function cache_config($refresh = false)
$config_cache = RUN_PATH . '/config/' . md5('config') . '.php';
if (! file_exists($config_cache) || $refresh) {
$model = model('admin.system.Config');
Config::set(md5('config'), $model->getConfig(), false, true);
$config = $model->getConfig();
unset($config['sn']);
unset($config['sn_user']);
Config::set(md5('config'), $config, false, true);
}
// 多语言缓存

View File

@@ -37,8 +37,9 @@ return array(
// 前台及接口路径统一小写URL
// =======前台路由============
'home/sitemap.xml' => 'home/Sitemap/index', // 站点地图1
'home/sitemap' => 'home/Sitemap/index', // 站点地图2
'home/sitemap.xml' => 'home/Sitemap/index', // 站点地图XML格式
'home/sitemap.txt' => 'home/Sitemap/linkTxt', // 站点地图TXT格式
'home/sitemap' => 'home/Sitemap/index', // 站点地图默认XML
// =======接口路由============
'api/list' => 'api/list/index/scode',

View File

@@ -1,12 +1,12 @@
<?php
return array(
// 应用版本
'app_version' => '3.0.9',
'app_version' => '3.1.3',
// 发布时间
'release_time' => '20211013',
'release_time' => '20220103',
// 修订版本
'revise_version' => '1'
'revise_version' => '5'
);