Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
Updated installation.php
Browse files Browse the repository at this point in the history
Update installation.php to solve "Enable SkinsRestorerDB in SkinsRestorer config!" issue.
Regex not supported
  • Loading branch information
simonchow96 authored Jan 2, 2020
1 parent 775c50a commit aefff46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion installation/installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit aefff46

Please sign in to comment.