NPC 생성시 버그 수정
서버 리셋되었을 때 세션 값 안정을 위해 serverID 개념을 추가.
This commit is contained in:
+18
-4
@@ -80,12 +80,19 @@ if(!is_writable(__dir__.'/data')){
|
||||
]);
|
||||
}
|
||||
|
||||
if(!file_exists(ROOT.'/logs/.htaccess')){
|
||||
@file_put_contents(ROOT.'/logs/.htaccess', 'Deny from all');
|
||||
if(!is_writable(__dir__.'/d_setting')){
|
||||
Json::die([
|
||||
'result'=>false,
|
||||
'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다'
|
||||
]);
|
||||
}
|
||||
|
||||
if(!file_exists(ROOT.'/data/.htaccess')){
|
||||
@file_put_contents(ROOT.'/data/.htaccess', 'Deny from all');
|
||||
if(!file_exists(__dir__.'/logs/.htaccess')){
|
||||
@file_put_contents(__dir__.'/logs/.htaccess', 'Deny from all');
|
||||
}
|
||||
|
||||
if(!file_exists(__dir__.'/data/.htaccess')){
|
||||
@file_put_contents(__dir__.'/data/.htaccess', 'Deny from all');
|
||||
}
|
||||
|
||||
|
||||
@@ -99,6 +106,13 @@ $startyear = $scenarioObj->getYear();
|
||||
FileUtil::delInDir("logs");
|
||||
FileUtil::delInDir("data");
|
||||
|
||||
$result = Util::generateFileUsingSimpleTemplate(
|
||||
__DIR__.'/d_setting/UniqueConst.orig.php',
|
||||
__DIR__.'/d_setting/UniqueConst.php',[
|
||||
'serverID'=>DB::prefix().'_'.Util::randomStr(8)
|
||||
], true
|
||||
);
|
||||
|
||||
if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/reset.sql'))){
|
||||
while(true){
|
||||
if (!$mysqli_obj->more_results()) {
|
||||
|
||||
Reference in New Issue
Block a user