hook 함수명 수정
This commit is contained in:
@@ -446,7 +446,7 @@ delete_cache_latest($bo_table);
|
||||
if(function_exists('get_admin_captcha_by'))
|
||||
get_admin_captcha_by('remove');
|
||||
|
||||
start_event('admin_board_form_update', $bo_table, $w);
|
||||
run_event('admin_board_form_update', $bo_table, $w);
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
?>
|
||||
|
||||
@@ -192,7 +192,7 @@ if( isset($_POST['cf_bbs_rewrite']) ){
|
||||
g5_delete_all_cache();
|
||||
}
|
||||
|
||||
start_event('admin_config_form_update');
|
||||
run_event('admin_config_form_update');
|
||||
|
||||
update_rewrite_rules();
|
||||
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ if(!isset($member['mb_memo_cnt'])) {
|
||||
$is_check = true;
|
||||
}
|
||||
|
||||
$is_check = apply_replace('admin_dbupgrade', $is_check);
|
||||
$is_check = run_replace('admin_dbupgrade', $is_check);
|
||||
|
||||
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
|
||||
?>
|
||||
|
||||
@@ -233,7 +233,7 @@ else if ($w == 'u')
|
||||
else
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
|
||||
start_event('admin_member_form_update', $w, $mb_id);
|
||||
run_event('admin_member_form_update', $w, $mb_id);
|
||||
|
||||
goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
|
||||
?>
|
||||
@@ -76,7 +76,7 @@ if ($msg)
|
||||
//echo '<script> alert("'.$msg.'"); </script>';
|
||||
alert($msg);
|
||||
|
||||
start_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
||||
run_event('admin_member_list_update', $_POST['act_button'], $mb_datas);
|
||||
|
||||
goto_url('./member_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ if ($count_write > 0 || $count_comment > 0)
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
start_event('bbs_delete', $write, $board);
|
||||
run_event('bbs_delete', $write, $board);
|
||||
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
|
||||
?>
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ if ($count_write > 0 || $count_comment > 0)
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
start_event('bbs_delete_all', $tmp_array, $board);
|
||||
run_event('bbs_delete_all', $tmp_array, $board);
|
||||
|
||||
goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr));
|
||||
?>
|
||||
|
||||
@@ -86,7 +86,7 @@ sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}'
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
start_event('bbs_delete_comment', $comment_id, $board);
|
||||
run_event('bbs_delete_comment', $comment_id, $board);
|
||||
|
||||
goto_url(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr);
|
||||
?>
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ if (!file_exists($login_file))
|
||||
|
||||
include_once($member_skin_path.'/login.skin.php');
|
||||
|
||||
start_event('member_login_tail', $login_url, $login_action_url, $member_skin_path, $url);
|
||||
run_event('member_login_tail', $login_url, $login_action_url, $member_skin_path, $url);
|
||||
|
||||
include_once('./_tail.sub.php');
|
||||
?>
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ if(function_exists('social_is_login_check')){
|
||||
// 불법사용자의 경우 회원아이디가 틀린지, 비밀번호가 틀린지를 알기까지는 많은 시간이 소요되기 때문입니다.
|
||||
if (!$is_social_password_check && (!$mb['mb_id'] || !login_password_check($mb, $mb_password, $mb['mb_password'])) ) {
|
||||
|
||||
start_event('password_is_wrong', 'login', $mb);
|
||||
run_event('password_is_wrong', 'login', $mb);
|
||||
|
||||
alert('가입된 회원아이디가 아니거나 비밀번호가 틀립니다.\\n비밀번호는 대소문자를 구분합니다.');
|
||||
}
|
||||
@@ -121,7 +121,7 @@ if(function_exists('social_login_success_after')){
|
||||
social_login_session_clear(1);
|
||||
}
|
||||
|
||||
start_event('member_login_check', $mb, $link);
|
||||
run_event('member_login_check', $mb, $link);
|
||||
|
||||
goto_url($link);
|
||||
?>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ if ($url) {
|
||||
$link = G5_URL;
|
||||
}
|
||||
|
||||
start_event('member_logout', $link);
|
||||
run_event('member_logout', $link);
|
||||
|
||||
goto_url($link);
|
||||
?>
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ else
|
||||
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
|
||||
start_event('memo_list', $kind, $unkind, $page);
|
||||
run_event('memo_list', $kind, $unkind, $page);
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['memo_table']} where me_{$kind}_mb_id = '{$member['mb_id']}' and me_type = '$kind' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ if (!$row['me_read_datetime'][0]) // 메모 받기전이면
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
start_event('memo_delete', $me_id, $row);
|
||||
run_event('memo_delete', $me_id, $row);
|
||||
|
||||
goto_url('./memo.php?kind='.$kind);
|
||||
?>
|
||||
|
||||
@@ -15,7 +15,7 @@ $msg = '';
|
||||
$error_list = array();
|
||||
$member_list = array('id'=>array(), 'nick'=>array());
|
||||
|
||||
start_event('memo_form_update_before', $recv_list);
|
||||
run_event('memo_form_update_before', $recv_list);
|
||||
|
||||
for ($i=0; $i<count($recv_list); $i++) {
|
||||
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$recv_list[$i]}' ");
|
||||
@@ -93,14 +93,14 @@ if ($member_list) {
|
||||
$redirect_url = G5_HTTP_BBS_URL."/memo.php?kind=send";
|
||||
$str_nick_list = implode(',', $member_list['nick']);
|
||||
|
||||
start_event('memo_form_update_after', $member_list, $str_nick_list, $redirect_url);
|
||||
run_event('memo_form_update_after', $member_list, $str_nick_list, $redirect_url);
|
||||
|
||||
alert($str_nick_list." 님께 쪽지를 전달하였습니다.", $redirect_url, false);
|
||||
} else {
|
||||
|
||||
$redirect_url = G5_HTTP_BBS_URL."/memo_form.php";
|
||||
|
||||
start_event('memo_form_update_failed', $member_list, $redirect_url);
|
||||
run_event('memo_form_update_failed', $member_list, $redirect_url);
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
+1
-1
@@ -156,6 +156,6 @@ function fboardmoveall_submit(f)
|
||||
</script>
|
||||
|
||||
<?php
|
||||
start_event('move_html_footer');
|
||||
run_event('move_html_footer');
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ $msg = '해당 게시물을 선택한 게시판으로 '.$act.' 하였습니다.'
|
||||
$opener_href = get_pretty_url($bo_table,'','&page='.$page.'&'.$qstr);
|
||||
$opener_href1 = str_replace('&', '&', $opener_href);
|
||||
|
||||
start_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
|
||||
run_event('bbs_move_update', $bo_table, $chk_bo_table, $wr_id_list, $opener_href);
|
||||
|
||||
echo <<<HEREDOC
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ foreach ($save_bo_table as $key=>$value) {
|
||||
delete_cache_latest($value);
|
||||
}
|
||||
|
||||
start_event('bbs_new_delete', $chk_bn_id, $save_bo_table);
|
||||
run_event('bbs_new_delete', $chk_bn_id, $save_bo_table);
|
||||
|
||||
goto_url("new.php?sfl=$sfl&stx=$stx&page=$page");
|
||||
?>
|
||||
@@ -13,7 +13,7 @@ if ($w == 's') {
|
||||
}
|
||||
|
||||
if (!check_password($wr_password, $wr['wr_password'])) {
|
||||
start_event('password_is_wrong', 'bbs', $wr);
|
||||
run_event('password_is_wrong', 'bbs', $wr);
|
||||
alert('비밀번호가 틀립니다.');
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ if ($w == 's') {
|
||||
}
|
||||
|
||||
if (!check_password($wr_password, $wr['wr_password'])){
|
||||
start_event('password_is_wrong', 'bbs', $wr);
|
||||
run_event('password_is_wrong', 'bbs', $wr);
|
||||
alert('비밀번호가 틀립니다.');
|
||||
}
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ if($w == '' || $w == 'a' || $w == 'r') {
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
start_event('qawrite_update', $qa_id, $write, $w, $qaconfig);
|
||||
run_event('qawrite_update', $qa_id, $write, $w, $qaconfig);
|
||||
|
||||
// SMS 알림
|
||||
if($config['cf_sms_use'] == 'icode' && $qaconfig['qa_use_sms']) {
|
||||
|
||||
@@ -74,7 +74,7 @@ $mb_addr2 = clean_xss_tags($mb_addr2);
|
||||
$mb_addr3 = clean_xss_tags($mb_addr3);
|
||||
$mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : '';
|
||||
|
||||
start_event('register_form_update_before', $mb_id, $w);
|
||||
run_event('register_form_update_before', $mb_id, $w);
|
||||
|
||||
if ($w == '' || $w == 'u') {
|
||||
|
||||
@@ -148,7 +148,7 @@ if ($w == '' || $w == 'u') {
|
||||
$old_email = $member['mb_email'];
|
||||
}
|
||||
|
||||
start_event('register_form_update_valid', $w, $mb_id, $mb_nick, $mb_email);
|
||||
run_event('register_form_update_valid', $w, $mb_id, $mb_nick, $mb_email);
|
||||
|
||||
if ($msg = exist_mb_nick($mb_nick, $mb_id)) alert($msg, "", true, true);
|
||||
if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg, "", true, true);
|
||||
@@ -270,11 +270,11 @@ if ($w == '') {
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$content = apply_replace('register_form_update_mail_mb_content', $content, $mb_id);
|
||||
$content = run_replace('register_form_update_mail_mb_content', $content, $mb_id);
|
||||
|
||||
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
|
||||
|
||||
start_event('register_form_update_send_mb_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
|
||||
run_event('register_form_update_send_mb_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
|
||||
|
||||
// 메일인증을 사용하는 경우 가입메일에 인증 url이 있으므로 인증메일을 다시 발송되지 않도록 함
|
||||
if($config['cf_use_email_certify'])
|
||||
@@ -283,18 +283,18 @@ if ($w == '') {
|
||||
|
||||
// 최고관리자님께 메일 발송
|
||||
if ($config['cf_email_mb_super_admin']) {
|
||||
$subject = apply_replace('register_form_update_mail_admin_subject', '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.', $mb_id, $mb_nick);
|
||||
$subject = run_replace('register_form_update_mail_admin_subject', '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.', $mb_id, $mb_nick);
|
||||
|
||||
ob_start();
|
||||
include_once ('./register_form_update_mail2.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$content = apply_replace('register_form_update_mail_admin_content', $content, $mb_id);
|
||||
$content = run_replace('register_form_update_mail_admin_content', $content, $mb_id);
|
||||
|
||||
mailer($mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content, 1);
|
||||
|
||||
start_event('register_form_update_send_admin_mail', $mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content);
|
||||
run_event('register_form_update_send_admin_mail', $mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content);
|
||||
}
|
||||
|
||||
// 메일인증 사용하지 않는 경우에만 로그인
|
||||
@@ -497,11 +497,11 @@ if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$content = apply_replace('register_form_update_mail_certify_content', $content, $mb_id);
|
||||
$content = run_replace('register_form_update_mail_certify_content', $content, $mb_id);
|
||||
|
||||
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1);
|
||||
|
||||
start_event('register_form_update_send_certify_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
|
||||
run_event('register_form_update_send_certify_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content);
|
||||
}
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@ unset($_SESSION['ss_cert_adult']);
|
||||
if ($msg)
|
||||
echo '<script>alert(\''.$msg.'\');</script>';
|
||||
|
||||
start_event('register_form_update_after', $mb_id, $w);
|
||||
run_event('register_form_update_after', $mb_id, $w);
|
||||
|
||||
if ($w == '') {
|
||||
goto_url(G5_HTTP_BBS_URL.'/register_result.php');
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ if ($w == 'u' || $w == 'r') {
|
||||
}
|
||||
}
|
||||
|
||||
start_event('bbs_write', $board, $wr_id, $w);
|
||||
run_event('bbs_write', $board, $wr_id, $w);
|
||||
|
||||
if ($w == '') {
|
||||
if ($wr_id) {
|
||||
|
||||
@@ -341,7 +341,7 @@ delete_cache_latest($bo_table);
|
||||
|
||||
$redirect_url = short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr['wr_parent'].'&'.$qstr.'&#c_'.$comment_id);
|
||||
|
||||
start_event('comment_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
|
||||
run_event('comment_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
|
||||
|
||||
goto_url($redirect_url);
|
||||
?>
|
||||
|
||||
@@ -127,7 +127,7 @@ for ($i=1; $i<=10; $i++) {
|
||||
|
||||
@include_once($board_skin_path.'/write_update.head.skin.php');
|
||||
|
||||
start_event('write_update_before', $board, $wr_id, $w, $qstr);
|
||||
run_event('write_update_before', $board, $wr_id, $w, $qstr);
|
||||
|
||||
if ($w == '' || $w == 'u') {
|
||||
|
||||
@@ -553,7 +553,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
// 올라간 파일의 퍼미션을 변경합니다.
|
||||
chmod($dest_file, G5_FILE_PERMISSION);
|
||||
|
||||
$dest_file = apply_replace('write_update_upload_file', $dest_file, $board, $wr_id, $w);
|
||||
$dest_file = run_replace('write_update_upload_file', $dest_file, $board, $wr_id, $w);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ for ($i=0; $i<count($upload); $i++)
|
||||
bf_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
|
||||
start_event('write_update_file_insert', $bo_table, $wr_id, $upload[$i], $w);
|
||||
run_event('write_update_file_insert', $bo_table, $wr_id, $upload[$i], $w);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
||||
|
||||
// 중복된 메일 주소는 제거
|
||||
$unique_email = array_unique($array_email);
|
||||
$unique_email = apply_replace('write_update_mail_list', array_values($unique_email), $board, $wr_id);
|
||||
$unique_email = run_replace('write_update_mail_list', array_values($unique_email), $board, $wr_id);
|
||||
|
||||
for ($i=0; $i<count($unique_email); $i++) {
|
||||
mailer($wr_name, $wr_email, $unique_email[$i], $subject, $content, 1);
|
||||
@@ -709,9 +709,9 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
|
||||
|
||||
delete_cache_latest($bo_table);
|
||||
|
||||
$redirect_url = apply_replace('write_update_move_url', short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr), $board, $wr_id, $w, $qstr, $file_upload_msg);
|
||||
$redirect_url = run_replace('write_update_move_url', short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr), $board, $wr_id, $w, $qstr, $file_upload_msg);
|
||||
|
||||
start_event('write_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
|
||||
run_event('write_update_after', $board, $wr_id, $w, $qstr, $redirect_url);
|
||||
|
||||
if ($file_upload_msg)
|
||||
alert($file_upload_msg, $redirect_url);
|
||||
|
||||
+1
-1
@@ -653,7 +653,7 @@ header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
|
||||
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
|
||||
header('Pragma: no-cache'); // HTTP/1.0
|
||||
|
||||
start_event('common_header');
|
||||
run_event('common_header');
|
||||
|
||||
$html_process = new html_process();
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
put_event('tail_sub', 'show_debug_bar');
|
||||
add_event('tail_sub', 'show_debug_bar');
|
||||
|
||||
function show_debug_bar() {
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
put_event('member_login_check', 'g54_userlogin_after', 10, 2);
|
||||
put_event('memo_list', 'g54_user_memo_insert', 10, 3);
|
||||
add_event('member_login_check', 'g54_userlogin_after', 10, 2);
|
||||
add_event('memo_list', 'g54_user_memo_insert', 10, 3);
|
||||
|
||||
// 5.3 버전에서
|
||||
function g54_userlogin_after($mb, $link){
|
||||
|
||||
@@ -100,7 +100,7 @@ class G5_URI {
|
||||
$url=parse_url($string_url);
|
||||
$page_name = basename($url['path'],".php");
|
||||
|
||||
$array_page_names = apply_replace('url_clean_page_names', array('board', 'write'));
|
||||
$array_page_names = run_replace('url_clean_page_names', array('board', 'write'));
|
||||
|
||||
if( strpos($string_url, G5_BBS_URL) === false || ! in_array($page_name, $array_page_names) ){ //게시판이 아니면 리턴
|
||||
return $string_url;
|
||||
@@ -142,7 +142,7 @@ class G5_URI {
|
||||
|
||||
if( isset($url['host']) ){
|
||||
|
||||
$array_file_paths = apply_replace('url_clean_page_paths', array('/'.G5_BBS_DIR.'/board.php', '/'.G5_BBS_DIR.'/write.php'));
|
||||
$array_file_paths = run_replace('url_clean_page_paths', array('/'.G5_BBS_DIR.'/board.php', '/'.G5_BBS_DIR.'/write.php'));
|
||||
|
||||
$str_path = isset($url['path']) ? $url['path'] : '';
|
||||
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https://' : 'http://';
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ function g5_delete_all_cache(){
|
||||
delete_cache_latest($board_table);
|
||||
}
|
||||
|
||||
start_event('adm_cache_delete', $board_tables);
|
||||
run_event('adm_cache_delete', $board_tables);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -155,7 +155,7 @@ function alert($msg='', $url='', $error=true, $post=false)
|
||||
global $g5, $config, $member;
|
||||
global $is_admin;
|
||||
|
||||
start_event('alert', $msg, $url, $error, $post);
|
||||
run_event('alert', $msg, $url, $error, $post);
|
||||
|
||||
$msg = $msg ? strip_tags($msg, '<br>') : '올바른 방법으로 이용해 주십시오.';
|
||||
|
||||
@@ -173,7 +173,7 @@ function alert_close($msg, $error=true)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
start_event('alert_close', $msg, $error);
|
||||
run_event('alert_close', $msg, $error);
|
||||
|
||||
$msg = strip_tags($msg, '<br>');
|
||||
|
||||
@@ -251,7 +251,7 @@ function url_auto_link($str)
|
||||
$str = preg_replace("/\t_gt_\t/", ">", $str);
|
||||
*/
|
||||
|
||||
return apply_replace('url_auto_link', $str);
|
||||
return run_replace('url_auto_link', $str);
|
||||
}
|
||||
|
||||
|
||||
@@ -741,7 +741,7 @@ function get_group($gr_id, $is_cache=false)
|
||||
|
||||
$sql = " select * from {$g5['group_table']} where gr_id = '$gr_id' ";
|
||||
|
||||
$cache[$key] = apply_replace('get_group', sql_fetch($sql), $gr_id, $is_cache);
|
||||
$cache[$key] = run_replace('get_group', sql_fetch($sql), $gr_id, $is_cache);
|
||||
|
||||
return $cache[$key];
|
||||
}
|
||||
@@ -764,7 +764,7 @@ function get_member($mb_id, $fields='*', $is_cache=false)
|
||||
|
||||
$sql = " select $fields from {$g5['member_table']} where mb_id = TRIM('$mb_id') ";
|
||||
|
||||
$cache[$mb_id][$key] = apply_replace('get_member', sql_fetch($sql), $mb_id, $fields, $is_cache);
|
||||
$cache[$mb_id][$key] = run_replace('get_member', sql_fetch($sql), $mb_id, $fields, $is_cache);
|
||||
|
||||
return $cache[$mb_id][$key];
|
||||
}
|
||||
@@ -857,7 +857,7 @@ function is_admin($mb_id)
|
||||
$is_authority = 'board';
|
||||
}
|
||||
|
||||
return apply_replace('is_admin', $is_authority, $mb_id);
|
||||
return run_replace('is_admin', $is_authority, $mb_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -2543,7 +2543,7 @@ class html_process {
|
||||
|
||||
array_multisort($order, SORT_ASC, $index, SORT_ASC, $links);
|
||||
|
||||
$links = apply_replace('html_process_css_files', $links);
|
||||
$links = run_replace('html_process_css_files', $links);
|
||||
|
||||
foreach($links as $link) {
|
||||
if(!trim($link[1]))
|
||||
@@ -2571,7 +2571,7 @@ class html_process {
|
||||
|
||||
array_multisort($order, SORT_ASC, $index, SORT_ASC, $scripts);
|
||||
|
||||
$scripts = apply_replace('html_process_script_files', $scripts);
|
||||
$scripts = run_replace('html_process_script_files', $scripts);
|
||||
|
||||
foreach($scripts as $js) {
|
||||
if(!trim($js[1]))
|
||||
@@ -2789,7 +2789,7 @@ function get_qa_config($fld='*')
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['qa_config_table']} ";
|
||||
$cache = apply_replace('get_qa_config', sql_fetch($sql));
|
||||
$cache = run_replace('get_qa_config', sql_fetch($sql));
|
||||
|
||||
return $cache;
|
||||
}
|
||||
|
||||
+10
-10
@@ -6,14 +6,14 @@ function get_config($is_cache=false){
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$cache = apply_replace('get_config_cache', $cache, $is_cache);
|
||||
$cache = run_replace('get_config_cache', $cache, $is_cache);
|
||||
|
||||
if( $is_cache && !empty($cache) ){
|
||||
return $cache;
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['config_table']} ";
|
||||
$cache = apply_replace('get_config', sql_fetch($sql));
|
||||
$cache = run_replace('get_config', sql_fetch($sql));
|
||||
|
||||
return $cache;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ function get_board_db($bo_table, $is_cache=false){
|
||||
|
||||
static $cache = array();
|
||||
|
||||
$cache = apply_replace('get_board_db_cache', $cache, $bo_table, $is_cache);
|
||||
$cache = run_replace('get_board_db_cache', $cache, $bo_table, $is_cache);
|
||||
|
||||
$key = md5($bo_table);
|
||||
|
||||
@@ -77,7 +77,7 @@ function get_board_db($bo_table, $is_cache=false){
|
||||
return $cache[$key];
|
||||
}
|
||||
|
||||
if( !($cache[$key] = apply_replace('get_board_db', array(), $bo_table)) ){
|
||||
if( !($cache[$key] = run_replace('get_board_db', array(), $bo_table)) ){
|
||||
|
||||
$sql = " select * from {$g5['board_table']} where bo_table = '$bo_table' ";
|
||||
|
||||
@@ -259,7 +259,7 @@ function get_db_charset($charset){
|
||||
$add_charset .= ' COLLATE utf8mb4_unicode_ci';
|
||||
}
|
||||
|
||||
return apply_replace('get_db_charset', $add_charset, $charset);
|
||||
return run_replace('get_db_charset', $add_charset, $charset);
|
||||
}
|
||||
|
||||
function get_db_create_replace($sql_str){
|
||||
@@ -284,7 +284,7 @@ function get_class_encrypt(){
|
||||
return $cache;
|
||||
}
|
||||
|
||||
$cache = apply_replace('get_class_encrypt', new str_encrypt());
|
||||
$cache = run_replace('get_class_encrypt', new str_encrypt());
|
||||
|
||||
return $cache;
|
||||
}
|
||||
@@ -315,7 +315,7 @@ function get_permission_debug_show(){
|
||||
$bool = true;
|
||||
}
|
||||
|
||||
return apply_replace('get_permission_debug_show', $bool, $member);
|
||||
return run_replace('get_permission_debug_show', $bool, $member);
|
||||
}
|
||||
|
||||
function get_check_mod_rewrite(){
|
||||
@@ -332,7 +332,7 @@ function get_check_mod_rewrite(){
|
||||
|
||||
function get_mb_icon_name($mb_id){
|
||||
|
||||
if( $icon_name = apply_replace('get_mb_icon_name', '', $mb_id) ){
|
||||
if( $icon_name = run_replace('get_mb_icon_name', '', $mb_id) ){
|
||||
return $icon_name;
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ function get_bo_table_banned_word(){
|
||||
$folders[] = basename($dir);
|
||||
}
|
||||
|
||||
return apply_replace('get_bo_table_banned_word', $folders);
|
||||
return run_replace('get_bo_table_banned_word', $folders);
|
||||
}
|
||||
|
||||
function get_board_sfl_select_options($sfl){
|
||||
@@ -366,7 +366,7 @@ function get_board_sfl_select_options($sfl){
|
||||
$str .= '<option value="wr_name,1" '.get_selected($sfl, 'wr_name,1').'>글쓴이</option>';
|
||||
$str .= '<option value="wr_name,0" '.get_selected($sfl, 'wr_name,0').'>글쓴이(코)</option>';
|
||||
|
||||
return apply_replace('get_board_sfl_select_options', $str, $sfl);
|
||||
return run_replace('get_board_sfl_select_options', $str, $sfl);
|
||||
}
|
||||
|
||||
// 읽지 않은 메모 갯수 반환
|
||||
|
||||
+4
-4
@@ -28,14 +28,14 @@ function get_hook_class(){
|
||||
return null;
|
||||
}
|
||||
|
||||
function put_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
function add_event($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
$hook->addAction($tag, $func, $priority, $args);
|
||||
}
|
||||
}
|
||||
|
||||
function start_event($tag, $arg = ''){
|
||||
function run_event($tag, $arg = ''){
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
|
||||
@@ -65,7 +65,7 @@ function start_event($tag, $arg = ''){
|
||||
}
|
||||
}
|
||||
|
||||
function put_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
function add_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
return $hook->addFilter($tag, $func, $priority, $args);
|
||||
@@ -74,7 +74,7 @@ function put_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){
|
||||
return null;
|
||||
}
|
||||
|
||||
function apply_replace($tag, $arg = ''){
|
||||
function run_replace($tag, $arg = ''){
|
||||
|
||||
if( $hook = get_hook_class() ){
|
||||
|
||||
|
||||
+6
-6
@@ -13,7 +13,7 @@ function get_pretty_url($folder, $no='', $query_string='', $action='')
|
||||
$segments = array();
|
||||
$url = $add_query = '';
|
||||
|
||||
if( $url = apply_replace('get_pretty_url', $url, $folder, $no, $query_string, $action) ){
|
||||
if( $url = run_replace('get_pretty_url', $url, $folder, $no, $query_string, $action) ){
|
||||
return $url;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ function short_url_clean($string_url, $add_qry=''){
|
||||
$url=parse_url($string_url);
|
||||
$page_name = basename($url['path'],".php");
|
||||
|
||||
$array_page_names = apply_replace('url_clean_page_names', array('board', 'write'));
|
||||
$array_page_names = run_replace('url_clean_page_names', array('board', 'write'));
|
||||
|
||||
if( strpos($string_url, G5_BBS_URL) === false || ! in_array($page_name, $array_page_names) ){ //게시판이 아니면 리턴
|
||||
return $string_url;
|
||||
@@ -150,7 +150,7 @@ function short_url_clean($string_url, $add_qry=''){
|
||||
|
||||
if( isset($url['host']) ){
|
||||
|
||||
$array_file_paths = apply_replace('url_clean_page_paths', array('/'.G5_BBS_DIR.'/board.php', '/'.G5_BBS_DIR.'/write.php'));
|
||||
$array_file_paths = run_replace('url_clean_page_paths', array('/'.G5_BBS_DIR.'/board.php', '/'.G5_BBS_DIR.'/write.php'));
|
||||
|
||||
$str_path = isset($url['path']) ? $url['path'] : '';
|
||||
$http = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 'https://' : 'http://';
|
||||
@@ -231,7 +231,7 @@ function exist_seo_url($type, $seo_title, $write_table, $sql_id=0){
|
||||
$exists_title = $row['co_seo_title'];
|
||||
|
||||
} else {
|
||||
return apply_replace('exist_check_seo_title', $seo_title, $type, $write_table, $sql_id);
|
||||
return run_replace('exist_check_seo_title', $seo_title, $type, $write_table, $sql_id);
|
||||
}
|
||||
|
||||
if ($exists_title)
|
||||
@@ -296,7 +296,7 @@ function get_nginx_conf_rules($return_string=false){
|
||||
$rules[] = '#### '.G5_VERSION.' nginx rules BEGIN #####';
|
||||
$rules[] = 'if (!-e $request_filename){';
|
||||
|
||||
if( $add_rules = apply_replace('add_nginx_conf_rules', '', $get_path_url, $base_path, $return_string) ){
|
||||
if( $add_rules = run_replace('add_nginx_conf_rules', '', $get_path_url, $base_path, $return_string) ){
|
||||
$rules[] = $add_rules;
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ function get_mod_rewrite_rules($return_string=false){
|
||||
$rules[] = 'RewriteCond %{REQUEST_FILENAME} -d';
|
||||
$rules[] = 'RewriteRule ^ - [L]';
|
||||
|
||||
if( $add_rules = apply_replace('add_mod_rewrite_rules', '', $get_path_url, $base_path, $return_string) ){
|
||||
if( $add_rules = run_replace('add_mod_rewrite_rules', '', $get_path_url, $base_path, $return_string) ){
|
||||
$rules[] = $add_rules;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ $(function() {
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<?php start_event('tail_sub'); ?>
|
||||
<?php run_event('tail_sub'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -20,7 +20,7 @@ $(function() {
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<?php start_event('tail_sub'); ?>
|
||||
<?php run_event('tail_sub'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -20,7 +20,7 @@ $(function() {
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<?php start_event('tail_sub'); ?>
|
||||
<?php run_event('tail_sub'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user