Merge branch 'g5'

This commit is contained in:
chicpro
2014-11-12 17:36:56 +09:00
6 changed files with 29 additions and 12 deletions

View File

@ -50,6 +50,13 @@ if($config['cf_leave_day'] > 0) {
}
}
// 음성 캡챠 파일 삭제
foreach (glob(G5_PATH.'/data/cache/kcaptcha-*.mp3') as $file) {
if (filemtime($file) + 86400 < G5_SERVER_TIME) {
@unlink($file);
}
}
// 실행일 기록
if(isset($config['cf_optimize_date'])) {
sql_query(" update {$g5['config_table']} set cf_optimize_date = '".G5_TIME_YMD."' ");

View File

@ -214,11 +214,12 @@ function url_auto_link($str)
// 140326 유창화님 제안코드로 수정
// http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=461
// http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=463
$str = str_replace(array("&lt;", "&gt;", "&amp;", "&quot;", "&nbsp;"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t"), $str);
$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET='{$config['cf_link_target']}'>\\2</A>", $str);
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href='mailto:\\0'>\\0</a>", $str);
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t"), array("&nbsp;", "&lt;", "&gt;"), $str);
$str = str_replace(array("&lt;", "&gt;", "&amp;", "&quot;", "&nbsp;", "&#039;"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t", "'"), $str);
//$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
$str = preg_replace("/([^(href=\"?'?)|(src=\"?'?)]|\(|^)((http|https|ftp|telnet|news|mms):\/\/[a-zA-Z0-9\.-]+\.[가-힣\xA1-\xFEa-zA-Z0-9\.:&#=_\?\/~\+%@;\-\|\,\(\)]+)/i", "\\1<A HREF=\"\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET=\"{$config['cf_link_target']}\">\\2</A>", $str);
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href=\"mailto:\\0\">\\0</a>", $str);
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t", "'"), array("&nbsp;", "&lt;", "&gt;", "&#039;"), $str);
/*
// 속도 향상 031011
@ -528,7 +529,6 @@ function conv_content($content, $html, $filter=true)
$content = str_replace("\n ", "\n&nbsp;", $content);
$content = get_text($content, 1);
$content = url_auto_link($content);
}

View File

@ -15,7 +15,7 @@
<script type="text/javascript" src="./js/SE2B_Configuration_General.js" charset="utf-8"></script> <!-- 설정 파일 -->
<script type="text/javascript" src="./js/SE2BasicCreator.js?v3" charset="utf-8"></script>
<script src='js/smarteditor2.min.js' charset='utf-8'></script>
<script src='js/smarteditor2.min.js?v2' charset='utf-8'></script>
<script src='photo_uploader/plugin/hp_SE2M_AttachQuickPhoto.js' charset='utf-8'></script>
</head>
<body>

View File

@ -12138,9 +12138,19 @@ nhn.husky.SE2M_Hyperlink = jindo.$Class({
var sResult;
if (sWWWURL){
sResult = '<a href="http://'+sWWWURL+'">'+sURL+'</a>';
var exp = /([-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?)/gi;
if( sWWWURL.match(exp) ){
sResult = sWWWURL.replace(exp, '<a href="http://$1" >$1</a>');
} else {
sResult = '<a href="http://'+sWWWURL+'">'+sURL+'</a>';
}
} else {
sResult = '<a href="'+sHTTPURL+'">'+sURL+'</a>';
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
if( sHTTPURL.match(exp) ){
sResult = sHTTPURL.replace(exp,"<a href='$1'>$1</a>");
} else {
sResult = '<a href="'+sHTTPURL+'">'+sURL+'</a>';
}
}
return sBreaker+sResult;

File diff suppressed because one or more lines are too long

View File

@ -26,11 +26,11 @@ function make_mp3()
file_put_contents(G5_PATH.'/'.$mp3_file, $contents);
// 지난 캡챠 파일 삭제 (100번중에 한번만 실행)
// 지난 캡챠 파일 삭제
if (rand(0,99) == 0) {
foreach (glob(G5_PATH.'/data/cache/kcaptcha-*.mp3') as $file) {
if (filemtime($file) + 86400 < G5_SERVER_TIME) {
unset($file);
@unlink($file);
}
}
}