From aefff4673fa8d3e404e9c3731250a5b0ba20adc7 Mon Sep 17 00:00:00 2001 From: simonchow96 Date: Fri, 3 Jan 2020 03:30:45 +0800 Subject: [PATCH] Updated installation.php Update installation.php to solve "Enable SkinsRestorerDB in SkinsRestorer config!" issue. Regex not supported --- installation/installation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installation/installation.php b/installation/installation.php index c8396e4..d62acc8 100644 --- a/installation/installation.php +++ b/installation/installation.php @@ -78,7 +78,7 @@ function confupdater($config, $version){ /* Get Data from SkinsRestorer's config.yml */ if(empty($_FILES['sr-config']['tmp_name'])){ prntErrorAndDie(str_replace("%rsn%", L::instl_invreq_srfile, L::instl_invreq)); } - $is_srconfig = preg_match('/MySQL:((?:\n\s+.*)*)/', file_get_contents($_FILES['sr-config']['tmp_name']), $re); + $is_srconfig = preg_match('/MySQL:((\s+.*)*)/', file_get_contents($_FILES['sr-config']['tmp_name']), $re); if(!$is_srconfig){ prntErrorAndDie(L::instl_srivfl); } preg_match_all('/\n\s*(\w+):\s*[\'"]?([\'"]{2}|[^\s\'"]+)/', $re[0], $re); $kitms = ['enabled', 'host', 'port', 'database', 'skintable', 'playertable', 'username', 'password'];