From e5d0843e075ecd87b855cf6cfd4e3d35d82f49a6 Mon Sep 17 00:00:00 2001 From: popcorner <351633+popcorner@user.noreply.gitee.com> Date: Wed, 10 Feb 2021 06:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=89=88=E6=97=B6=E6=97=A0=E6=B3=95=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E8=81=94=E5=8A=A8=E5=BA=95=E9=83=A8=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/install/data/install_data.sql | 2 +- upload/source/admincp/admincp_setting.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/upload/install/data/install_data.sql b/upload/install/data/install_data.sql index f792fe86c..eea10e127 100644 --- a/upload/install/data/install_data.sql +++ b/upload/install/data/install_data.sql @@ -157,7 +157,7 @@ INSERT INTO pre_common_nav VALUES ('','0','记录','Doing','home.php?mod=space&d INSERT INTO pre_common_nav VALUES ('', '0', '站点统计', '', 'misc.php?mod=stat', 'stat', 0, 0, 1, 1, 0, 0, 0, 0, '', '', '', 1, ''); INSERT INTO pre_common_nav VALUES ('', '0', '举报', '', '#', 'report', 0, 0, 1, 2, 0, 0, 0, 0, '', '', '', 1, ''); INSERT INTO pre_common_nav VALUES ('', '0', 'Archiver', '', 'archiver/', 'archiver', 0, 0, 1, 3, 0, 0, 0, 0, '', '', '', 1, ''); -INSERT INTO pre_common_nav VALUES ('', '0', '手机版', '', 'forum.php?mobile=yes', 'mobile', 0, 0, 1, 3, 0, 0, 0, 0, '', '', '', 1, ''); +INSERT INTO pre_common_nav VALUES ('', '0', '手机版', '', 'forum.php?mobile=yes', 'mobile', 0, 0, 0, 3, 0, 0, 0, 0, '', '', '', 1, ''); INSERT INTO pre_common_nav VALUES ('', '0', '小黑屋', '', 'forum.php?mod=misc&action=showdarkroom', 'darkroom', 0, 0, 1, 3, 0, 0, 0, 0, '', '', '', 1, ''); INSERT INTO pre_common_nav VALUES ('', '0', '日志', '', 'home.php?mod=space&do=blog', 'blog', 0, 0, -1, 2, 0, 0, 0, 0, '{STATICURL}image/feed/blog.gif', '发布', 'home.php?mod=spacecp&ac=blog', 2, ''); diff --git a/upload/source/admincp/admincp_setting.php b/upload/source/admincp/admincp_setting.php index 3c3aed822..b0cafc31c 100644 --- a/upload/source/admincp/admincp_setting.php +++ b/upload/source/admincp/admincp_setting.php @@ -3343,6 +3343,11 @@ EOT; if($operation == 'mobile') { $settingnew['mobile_arr']['allowmobile'] = intval($settingnew['mobile']['allowmobile']); + if(!$settingnew['mobile_arr']['allowmobile']) { + C::t('common_nav')->update_by_navtype_type_identifier(1, 0, 'mobile', array('available' => 0)); + } else { + C::t('common_nav')->update_by_navtype_type_identifier(1, 0, 'mobile', array('available' => 1)); + } $settingnew['mobile_arr']['allowmnew'] = intval($settingnew['mobile']['allowmnew']); $settingnew['mobile_arr']['mobileforward'] = intval($settingnew['mobile']['mobileforward']); $settingnew['mobile_arr']['otherindex'] = intval($settingnew['mobile']['otherindex']); -- Gitee