소셜 로그인 디버그 기능 추가
This commit is contained in:
@ -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');
|
||||
?>
|
||||
|
||||
@ -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
17
adm/safe_check.php
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -39,7 +39,10 @@ define('G5_SOCIAL_USE_POPUP', ! is_mobile() ); // 모바일에서는 팝업사
|
||||
define('G5_SOCIAL_DELETE_DAY', 0);
|
||||
|
||||
// 메일 인증관련, false 이면 메일인증을 받지 않고 로그인됩니다. true 이고 기본환경설정에서 메일인증설정이 활성화 되어 있는 경우 메일인증을 받아야만 로그인 됩니다.
|
||||
define('G5_SOCIAL_CERTIFY_MAIL', false );
|
||||
define('G5_SOCIAL_CERTIFY_MAIL', false);
|
||||
|
||||
// 소셜 DEBUG 관련 설정, 기본값은 false, true 로 설정시 data/tmp/social_anystring.log 파일이 생성됩니다.
|
||||
define('G5_SOCIAL_IS_DEBUG', false);
|
||||
|
||||
include_once(G5_SOCIAL_LOGIN_PATH.'/includes/functions.php');
|
||||
?>
|
||||
@ -278,7 +278,12 @@ function social_build_provider_config($provider){
|
||||
);
|
||||
|
||||
if( function_exists('social_extends_get_keys') ){
|
||||
$setting["providers"][$provider] = social_extends_get_keys($provider);
|
||||
$setting['providers'][$provider] = social_extends_get_keys($provider);
|
||||
}
|
||||
|
||||
if(defined('G5_SOCIAL_IS_DEBUG') && G5_SOCIAL_IS_DEBUG){
|
||||
$setting['debug_mode'] = true;
|
||||
$setting['debug_file'] = G5_DATA_PATH.'/tmp/social_'.md5($_SERVER['SERVER_SOFTWARE'].$_SERVER['SERVER_ADDR']).'_'.date('ymd').'.log';
|
||||
}
|
||||
|
||||
return $setting;
|
||||
|
||||
Reference in New Issue
Block a user