From dafd3624c15c7455234719ded684952137ee4743 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 3 Jan 2020 18:10:22 +0800 Subject: [PATCH] Update index.php --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 5f3fee0..2a7e7a1 100644 --- a/index.php +++ b/index.php @@ -28,6 +28,7 @@ function main($path) global $exts; global $constStr; config_oauth(); + if (!isset($_SERVER['base_path'])) $_SERVER['base_path'] = '/'; if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/'; $_SERVER['list_path'] = getListpath($_SERVER['HTTP_HOST']); if ($_SERVER['list_path']=='') $_SERVER['list_path'] = '/'; @@ -59,7 +60,7 @@ function main($path) } } if (getConfig('admin')!='') - if ($_COOKIE['admin']==md5(getConfig('admin')) || $_POST['password1']==getConfig('admin') ) { + if ( $_COOKIE['admin']==md5(getConfig('admin')) || $_POST['password1']==getConfig('admin') ) { $_SERVER['admin']=1; $_SERVER['needUpdate'] = needUpdate(); } else {