충돌수정

This commit is contained in:
thisgun
2018-04-20 14:15:15 +09:00
46 changed files with 167 additions and 140 deletions

View File

@ -5,6 +5,11 @@ include_once('./_common.php');
if ($is_admin != 'super')
alert('최고관리자만 접근 가능합니다.', G5_URL);
@include_once('./safe_check.php');
if(function_exists('social_log_file_delete')){
social_log_file_delete();
}
$g5['title'] = '캐시파일 일괄삭제';
include_once('./admin.head.php');
?>

View File

@ -2,6 +2,11 @@
$sub_menu = '100000';
include_once('./_common.php');
@include_once('./safe_check.php');
if(function_exists('social_log_file_delete')){
social_log_file_delete(86400); //소셜로그인 디버그 파일 24시간 지난것은 삭제
}
$g5['title'] = '관리자메인';
include_once ('./admin.head.php');

17
adm/safe_check.php Normal file
View File

@ -0,0 +1,17 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function social_log_file_delete($second=0){
$files = glob(G5_DATA_PATH.'/tmp/social_*');
if (is_array($files)) {
$before_time = $second ? G5_SERVER_TIME - $second : 0;
foreach ($files as $social_log_file) {
$modification_time = filemtime($log_file); // 파일접근시간
if ($before_time && $modification_time > $before_time) continue;
unlink($social_log_file);
}
}
}
?>