diff --git a/conf/app.php b/conf/app.php index e93570e..392c1d2 100644 --- a/conf/app.php +++ b/conf/app.php @@ -198,6 +198,10 @@ $configs = array( //Google Adwords目标跟踪ID 'GAD_MEASUREMENT_ID' => '', + //密码授权默认关闭 + "password_auth" => array( + "enable" => false, + ), ); //自定义配置支持 diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 34c215b..37b1fff 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -8,7 +8,7 @@ $audioExts = !empty(FSC::$app['config']['supportedAudioExts']) ? FSC::$app['conf $supportedExts = array_merge($imgExts, $videoExts, $audioExts); //需密码授权的目录显示lock图标 -$authConfig = FSC::$app['config']['password_auth']; +$authConfig = !empty(FSC::$app['config']['password_auth']) ? FSC::$app['config']['password_auth'] : array(); $dir_ext_status = !empty($_COOKIE['dir_ext_status']) ? $_COOKIE['dir_ext_status'] : 'opened'; $menu_ext_status = !empty($_COOKIE['menu_ext_status']) ? $_COOKIE['menu_ext_status'] : FSC::$app['config']['defaultMenuStatusInPC'];