diff --git a/.htaccess b/.htaccess
index 1915f7476..c14fdb5a8 100644
--- a/.htaccess
+++ b/.htaccess
@@ -25,6 +25,9 @@ RewriteRule ^([a-zA-Z0-9_]+)/([[:digit:]]+)page$ ./index.php?mid=$1&page=$2 [L]
RewriteRule ^rss/([[:digit:]]+){0,14}/([[:digit:]]+){0,14}/([[:digit:]]+)$ ./index.php?module=rss&act=rss&start_date=$1&end_date=$2&page=$3 [L]
RewriteRule ^rss/([[:digit:]]+)$ ./index.php?module=rss&act=rss&page=$1 [L]
RewriteRule ^rss$ ./index.php?module=rss&act=rss [L]
+RewriteRule ^atom/([[:digit:]]+){0,14}/([[:digit:]]+){0,14}/([[:digit:]]+)$ ./index.php?module=rss&act=atom&start_date=$1&end_date=$2&page=$3 [L]
+RewriteRule ^atom/([[:digit:]]+)$ ./index.php?module=rss&act=atom&page=$1 [L]
+RewriteRule ^atom$ ./index.php?module=rss&act=atom [L]
# administrator page
RewriteRule ^admin$ ./index.php?module=admin [L]
diff --git a/addons/member_extra_info/member_extra_info.lib.php b/addons/member_extra_info/member_extra_info.lib.php
index f08ae0a05..88ba3cce3 100644
--- a/addons/member_extra_info/member_extra_info.lib.php
+++ b/addons/member_extra_info/member_extra_info.lib.php
@@ -14,8 +14,8 @@
// 전역변수에 미리 설정한 데이터가 있다면 그걸 return
if(!$GLOBALS['_transImageNameList'][$member_srl]->cached) {
$GLOBALS['_transImageNameList'][$member_srl]->cached = true;
- $image_name_file = sprintf('./files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
- $image_mark_file = sprintf('./files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
+ $image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
+ $image_mark_file = sprintf('files/member_extra_info/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
if(file_exists($image_name_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_name_file = $image_name_file;
else $image_name_file = '';
if(file_exists($image_mark_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file = $image_mark_file;
@@ -28,8 +28,8 @@
// 이미지이름이나 마크가 없으면 원본 정보를 세팅
if(!$image_name_file && !$image_mark_file) return $matches[0];
- if($image_name_file) $nick_name = sprintf('
', $image_name_file, strip_tags($nick_name), strip_tags($nick_name));
- if($image_mark_file) $nick_name = sprintf('
%s', $image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name);
+ if($image_name_file) $nick_name = sprintf('
', Context::getRequestUri(),$image_name_file, strip_tags($nick_name), strip_tags($nick_name));
+ if($image_mark_file) $nick_name = sprintf('
%s', Context::getRequestUri(),$image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name);
$orig_text = preg_replace('/'.preg_quote($matches[5],'/').'<\/'.$matches[6].'>$/', '', $matches[0]);
return $orig_text.$nick_name.''.$matches[6].'>';
diff --git a/addons/point_level_icon/point_level_icon.lib.php b/addons/point_level_icon/point_level_icon.lib.php
index 1bc1c741b..471025c80 100644
--- a/addons/point_level_icon/point_level_icon.lib.php
+++ b/addons/point_level_icon/point_level_icon.lib.php
@@ -26,7 +26,7 @@
$text = $matches[5];
// 레벨 아이콘의 위치를 구함
- $level_icon = sprintf('./modules/point/icons/%s/%d.gif', $config->level_icon, $level);
+ $level_icon = sprintf('%smodules/point/icons/%s/%d.gif', Context::getRequestUri(), $config->level_icon, $level);
// 최고 레벨이 아니면 다음 레벨로 가기 위한 per을 구함 :: 주석과 실제 내용이 맞지 않아 실제 내용을 수정
if($level < $config->max_level) {
diff --git a/addons/resize_image/js/resize_image.js b/addons/resize_image/js/resize_image.js
index 091f1f828..dd3ecd111 100644
--- a/addons/resize_image/js/resize_image.js
+++ b/addons/resize_image/js/resize_image.js
@@ -132,6 +132,7 @@ function getScreen() {
$(document).scroll(xScreen.xeHide);
$(document).keydown(xScreen.xeHide);
$(window).resize(xScreen.xeHide);
+ $(window).scroll(xScreen.xeHide);
} else {
controls = $("#xe_gallery_controls");
imgframe = $("#xe_gallery_holder");
@@ -156,43 +157,19 @@ function slideshow(event) {
xScreen.xeShow();
}
-// 이미지를 리사이즈 하는 함수
-function resize(event) {
- var img = event.data[0];
- var img_width = parseInt(event.data[1]);
- var img_height = parseInt(event.data[2]);
- var img_src = event.data[3];
- var dummy = $("
").css({height:"1px",overflow:"hidden",opacity:0,display:"block"});
- var newWidth = -1;
-
- // 더미 객체를 넣어서 너비 구하기
- img.before(dummy);
- newWidth = dummy.innerWidth();
- dummy.remove();
-
- // 리사이즈 및 경로 지정
- if (img_width <= 0) img_width = $(this).attr("width");
- if (img_height <= 0) img_height = $(this).attr("height");
- if (img_width > newWidth) {
- img_height = newWidth * img_height/img_width;
- img_width = newWidth;
- }
- img.attr({width:img_width,height:img_height,src:img_src});
-
- // 링크가 설정되어 있거나 onclick 이벤트가 부여되어 있으면 원본 보기를 하지 않음
- if ( img.parent("a").size() || img.attr("onclick") ) return;
-
- // 스타일 설정
- img.css("cursor", "pointer");
-
- // 클릭하면 슬라이드쇼 시작
- img.click(slideshow);
-}
-
-$(document).ready(function(){
+$(window).load(function(){
var regx_skip = /(?:modules|addons|classes|common|layouts|libs|widgets)/i;
var regx_parent = /(?:document|comment)_[0-9]+_[0-9]+/i;
+ var xe_content = $(".xe_content");
+ var overflow = xe_content.css("overflow");
+ var width = xe_content.css("width");
+ xe_content.css("overflow","hidden");
+ xe_content.css("width","100%");
+ var offsetWidth = xe_content.attr("offsetWidth");
+ xe_content.css("overflow",overflow);
+ xe_content.css("width",width);
+
// 이미지 목록을 가져와서 리사이즈
$(".xe_content img").each(function(){
var img = $(this);
@@ -205,13 +182,23 @@ $(document).ready(function(){
// 커스텀 속성 추가
img.attr("rel", "xe_gallery");
-
- // 크기를 줄인다.
- img.attr({src:"about:blank", width:16,height:16});
-
- // 이미지를 다 읽어들이면 리사이즈
- $("
![]()
").bind("load", [img, width, height, src], resize).attr("src", src);
+
+ // 크기를 계산한다
+ if(width>offsetWidth) {
+ img.attr("width",offsetWidth-1);
+ img.attr("height",parseInt(offsetWidth/width*height,10));
+ }
+
+ // 링크가 설정되어 있거나 onclick 이벤트가 부여되어 있으면 원본 보기를 하지 않음
+ if ( !img.parent("a").size() && !img.attr("onclick") ) {
+ // 스타일 설정
+ img.css("cursor", "pointer");
+
+ // 클릭하면 슬라이드쇼 시작
+ img.click(slideshow);
+ }
+
});
});
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/addons/resize_image/resize_image.addon.php b/addons/resize_image/resize_image.addon.php
index cb906ddad..dab03da71 100644
--- a/addons/resize_image/resize_image.addon.php
+++ b/addons/resize_image/resize_image.addon.php
@@ -7,7 +7,8 @@
* @brief 본문내 이미지 조절 애드온
**/
- if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
+ if($called_position == 'after_module_proc' && Context::getResponseMethod()=="HTML") {
+ Context::loadJavascriptPlugin('ui');
Context::addJsFile('./addons/resize_image/js/resize_image.js',false);
}
?>
diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php
index 401f09575..5469475d6 100644
--- a/classes/context/Context.class.php
+++ b/classes/context/Context.class.php
@@ -1203,8 +1203,8 @@
//
![]()
코드 변환
$content = preg_replace('/<(img|br)([^>\/]*)(\/>|>)/i','<$1$2 />', $content);
- // 주소/?mid등과 같은 index.php가 명시되지 않은 파일의 target 변경
- //$content = str_replace(Context::getRequestUri().'?',Context::getRequestUri().'index.php?',$content);
+ // templateHandler의 이미지 경로로 인하여 생기는 절대경로 이미지등의 경로 중복 처리
+ $content = preg_replace('/src=(["|\']?)http:\/\/([^ ]+)http:\/\//is','src=$1http://', $content);
return $content;
}
diff --git a/classes/db/DBFirebird.class.php b/classes/db/DBFirebird.class.php
index e6859b2eb..71283b9af 100644
--- a/classes/db/DBFirebird.class.php
+++ b/classes/db/DBFirebird.class.php
@@ -625,6 +625,10 @@
$value = $this->getConditionValue('"'.$name.'"', $value, $operation, $type, $column_type);
if(!$value) $value = $v['value'];
+
+ $name = $this->autoQuotes($name);
+ $value = $this->autoValueQuotes($value, $output);
+
$str = $this->getConditionPart($name, $value, $operation);
if($sub_condition) $sub_condition .= ' '.$pipe.' ';
$sub_condition .= $str;
diff --git a/classes/display/DisplayHandler.class.php b/classes/display/DisplayHandler.class.php
index 0d12fca41..ea8e7fdcb 100644
--- a/classes/display/DisplayHandler.class.php
+++ b/classes/display/DisplayHandler.class.php
@@ -161,97 +161,44 @@
}
/**
- * @brief 디버그 모드일 경우 디버기 메세지 출력
+ * @brief 디버그 모드일 경우 디버깅 메시지 출력
*
- * __DEBUG__가 1이상일 경우 각 부분의 실행시간등을 debugPrint 함수를 이용해서 출력\n
- * 개발시나 테스트시에 config/config.inc.php의 __DEBUG__를 세팅하고\n
- * tail -f ./files/_debug_message.php로 하여 console로 확인하면 편리함\n
+ * __DEBUG__ 값이 1 이상이면 __DEBUG_OUTPUT__ 값에 따라 메시지 출력.
+ * __DEBUG__를 세팅하고, __DEBUG_OUTPUT__ == 0 이면
+ * tail -f ./files/_debug_message.php로 하여 console로 확인하면 편리함
**/
function _debugOutput() {
if(!__DEBUG__) return;
$end = getMicroTime();
- if(__DEBUG_OUTPUT__ != 2 || (__DEBUG_OUTPUT__ == 2 && !version_compare(PHP_VERSION, '5.2.0', '>'))) {
- // debug string 작성 시작
- $buff = "\n\n** Debug at ".date('Y-m-d H:i:s')." ************************************************************\n";
-
- // Request/Response 정보 작성
- $buff .= "\n- Request/ Response info\n";
- $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']);
- $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']);
- $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod());
- $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize());
-
- // DB 로그 작성
- if(__DEBUG__ > 1) {
- if($GLOBALS['__db_queries__']) {
- $buff .= "\n- DB Queries\n";
- $num = 0;
- foreach($GLOBALS['__db_queries__'] as $query) {
- $buff .= sprintf("\t%02d. %s (%0.6f sec)\n", ++$num, $query['query'], $query['elapsed_time']);
- if($query['result'] == 'Success') {
- $buff .= "\t Query Success\n";
- } else {
- $buff .= sprintf("\t Query $s : %d\n\t\t\t %s\n", $query['result'], $query['errno'], $query['errstr']);
- }
- }
- }
- $buff .= "\n- Elapsed time\n";
-
- if($GLOBALS['__db_elapsed_time__']) $buff .= sprintf("\tDB queries elapsed time\t\t: %0.5f sec\n", $GLOBALS['__db_elapsed_time__']);
- }
-
- // 기타 로그 작성
- if(__DEBUG__==3) {
- $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']);
- $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']);
- $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']);
- $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']);
-
- // 위젯 실행 시간 작성
- $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']);
-
- // 레이아웃 실행 시간
- $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']);
-
- // 위젯, 에디터 컴포넌트 치환 시간
- $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n\n", $GLOBALS['__trans_widget_editor_elapsed__']);
- }
-
- // 전체 실행 시간 작성
- $buff .= sprintf("\tTotal elapsed time \t\t: %0.5f sec", $end-__StartTime__);
- }
-
- if(__DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML') {
- if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
- $buff = '허용되지 않은 IP 입니다. config/config.inc.php 파일의 __DEBUG_PROTECT_IP__ 상수 값을 자신의 IP로 변경하세요.';
- }
- return "";
- }
-
- if(__DEBUG_OUTPUT__==0) debugPrint($buff, false);
-
// Firebug 콘솔 출력
- if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '5.2.0', '>')) {
- debugPrint(
- array('Request / Response info >>> '.Context::getResponseMethod().' / '.$_SERVER['REQUEST_METHOD'],
- array(
- array('Request URI', 'Request method', 'Response method', 'Response contents size'),
- array(
- sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']),
- $_SERVER['REQUEST_METHOD'],
- Context::getResponseMethod(),
- $this->getContentSize().' byte'
- )
- )
- ),
- 'TABLE'
- );
+ if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '5.2.0', '>=')) {
+ static $firephp;
+ if(!isset($firephp)) $firephp = FirePHP::getInstance(true);
- // 기타 로그 작성
- if(__DEBUG__ == 3 || __DEBUG__ == 1) {
- debugPrint(
+ if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
+ $firephp->fb('Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php', 'The IP address is not allowed.');
+ return;
+ }
+
+ // 전체 실행 시간 출력, Request/Response info 출력
+ if(__DEBUG__ & 2) {
+ $firephp->fb(
+ array('Request / Response info >>> '.$_SERVER['REQUEST_METHOD'].' / '.Context::getResponseMethod(),
+ array(
+ array('Request URI', 'Request method', 'Response method', 'Response contents size'),
+ array(
+ sprintf("%s:%s%s%s%s", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']),
+ $_SERVER['REQUEST_METHOD'],
+ Context::getResponseMethod(),
+ $this->getContentSize().' byte'
+ )
+ )
+ ),
+ 'TABLE'
+ );
+ $firephp->fb(
array('Elapsed time >>> Total : '.sprintf('%0.5f sec', $end - __StartTime__),
array(array('DB queries', 'class file load', 'Template compile', 'XmlParse compile', 'PHP', 'Widgets', 'Trans widget&editor'),
array(
@@ -269,21 +216,95 @@
);
}
- // DB 쿼리 로그
- if(__DEBUG__ > 1) {
+ // DB 쿼리 내역 출력
+ if((__DEBUG__ & 4) && $GLOBALS['__db_queries__']) {
$queries_output = array(array('Query', 'Elapsed time', 'Result'));
foreach($GLOBALS['__db_queries__'] as $query) {
array_push($queries_output, array($query['query'], sprintf('%0.5f', $query['elapsed_time']), $query['result']));
}
- debugPrint(
- array('DB Queries >>> '.count($GLOBALS['__db_queries__']).' Queries, '.sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']), $queries_output),
+ $firephp->fb(
+ array(
+ 'DB Queries >>> '.count($GLOBALS['__db_queries__']).' Queries, '.sprintf('%0.5f sec', $GLOBALS['__db_elapsed_time__']),
+ $queries_output
+ ),
'TABLE'
);
}
+
+ // 파일 및 HTML 주석으로 출력
+ } else {
+ // debug string 작성 시작
+ $buff = "** Debug at ".date('Y-m-d H:i:s').str_repeat('*', 60)."\n";
+
+ // 전체 실행 시간 출력, Request/Response info 출력
+ if(__DEBUG__ & 2) {
+ // Request/Response 정보 작성
+ $buff .= "\n- Request/ Response info\n";
+ $buff .= sprintf("\tRequest URI \t\t\t: %s:%s%s%s%s\n", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']?'?':'', $_SERVER['QUERY_STRING']);
+ $buff .= sprintf("\tRequest method \t\t\t: %s\n", $_SERVER['REQUEST_METHOD']);
+ $buff .= sprintf("\tResponse method \t\t: %s\n", Context::getResponseMethod());
+ $buff .= sprintf("\tResponse contents size\t\t: %d byte\n", $this->getContentSize());
+
+ // 전체 실행 시간
+ $buff .= sprintf("\n- Total elapsed time : %0.5f sec\n", $end-__StartTime__);
+
+ $buff .= sprintf("\tclass file load elapsed time \t: %0.5f sec\n", $GLOBALS['__elapsed_class_load__']);
+ $buff .= sprintf("\tTemplate compile elapsed time\t: %0.5f sec (%d called)\n", $GLOBALS['__template_elapsed__'], $GLOBALS['__TemplateHandlerCalled__']);
+ $buff .= sprintf("\tXmlParse compile elapsed time\t: %0.5f sec\n", $GLOBALS['__xmlparse_elapsed__']);
+ $buff .= sprintf("\tPHP elapsed time \t\t: %0.5f sec\n", $end-__StartTime__-$GLOBALS['__template_elapsed__']-$GLOBALS['__xmlparse_elapsed__']-$GLOBALS['__db_elapsed_time__']-$GLOBALS['__elapsed_class_load__']);
+
+ // 위젯 실행 시간 작성
+ $buff .= sprintf("\n\tWidgets elapsed time \t\t: %0.5f sec", $GLOBALS['__widget_excute_elapsed__']);
+
+ // 레이아웃 실행 시간
+ $buff .= sprintf("\n\tLayout compile elapsed time \t: %0.5f sec", $GLOBALS['__layout_compile_elapsed__']);
+
+ // 위젯, 에디터 컴포넌트 치환 시간
+ $buff .= sprintf("\n\tTrans widget&editor elapsed time: %0.5f sec\n", $GLOBALS['__trans_widget_editor_elapsed__']);
+ }
+
+ // DB 로그 작성
+ if(__DEBUG__ & 4) {
+ if($GLOBALS['__db_queries__']) {
+ $buff .= sprintf("\n- DB Queries : %d Queries. %0.5f sec\n", count($GLOBALS['__db_queries__']), $GLOBALS['__db_elapsed_time__']);
+ $num = 0;
+
+ foreach($GLOBALS['__db_queries__'] as $query) {
+ $buff .= sprintf("\t%02d. %s\n\t\t%0.6f sec. ", ++$num, $query['query'], $query['elapsed_time']);
+ if($query['result'] == 'Success') {
+ $buff .= "Query Success\n";
+ } else {
+ $buff .= sprintf("Query $s : %d\n\t\t\t %s\n", $query['result'], $query['errno'], $query['errstr']);
+ }
+ }
+ }
+ }
+
+ // HTML 주석으로 출력
+ if(__DEBUG_OUTPUT__ == 1 && Context::getResponseMethod() == 'HTML') {
+ if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
+ $buff = 'The IP address is not allowed. Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php';
+ }
+ return "";
+ }
+
+ // 파일에 출력
+ if(__DEBUG_OUTPUT__ == 0) {
+ $debug_file = _XE_PATH_.'files/_debug_message.php';
+ $debug_output = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($debug_output, true));
+
+ if($display_option === true) $debug_output = str_repeat('=', 40)."\n".$debug_output.str_repeat('-', 40);
+ $debug_output = "\n\n";
+
+ if(@!$fp = fopen($debug_file, 'a')) return;
+ fwrite($fp, $debug_output);
+ fclose($fp);
+ }
}
}
+
/**
* @brief RequestMethod에 맞춰 헤더 출력
***/
diff --git a/classes/optimizer/Optimizer.class.php b/classes/optimizer/Optimizer.class.php
index 376279249..ba6d603eb 100644
--- a/classes/optimizer/Optimizer.class.php
+++ b/classes/optimizer/Optimizer.class.php
@@ -66,7 +66,13 @@
array_unshift($files, array('file' => $path.'/'.$filename, 'media' => 'all'));
- return $this->_getOptimizedRemoved($files);
+ $files = $this->_getOptimizedRemoved($files);
+ if(!count($files)) return $files;
+
+ foreach($files as $key => $val) {
+ if(substr($val['file'],0,2)=='./') $files[$key]['file'] = Context::getRequestUri().substr($val['file'],2);
+ }
+ return $files;
}
/**
@@ -208,10 +214,15 @@ if(!$cached) {
}
function _replaceCssPath($matches) {
+ static $abpath = null;
+ if(is_null($abpath)) {
+ $url_info = parse_url(Context::getRequestUri());
+ $abpath = $url_info['path'];
+ }
$path = str_replace(array('"',"'"),'',$matches[1]);
if(preg_match('/^http|^\//i', $path) || preg_match('/\.htc$/i',$path) ) return $matches[0];
- return 'url("../../../../'.$this->tmp_css_path.$path.'")';
+ return 'url("'.$abpath.$this->tmp_css_path.$path.'")';
}
}
diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php
index dd7f2e1a5..b00d16a0d 100644
--- a/classes/template/TemplateHandler.class.php
+++ b/classes/template/TemplateHandler.class.php
@@ -47,7 +47,7 @@
// tpl_file이 비어 있거나 해당 파일이 없으면 return
if(!$tpl_file || !file_exists(FileHandler::getRealPath($tpl_file))) return;
- $this->tpl_path = $tpl_path;
+ $this->tpl_path = preg_replace('/^\.\//','',$tpl_path);
$this->tpl_file = $tpl_file;
// compiled된(or 될) 파일이름을 구함
@@ -155,12 +155,11 @@
$str1 = $matches[0];
$str2 = $path = $matches[3];
- if(!preg_match('/^([a-z0-9\_\.])/i',$path)) return $str1;
+ if(substr($path,0,1)=='/') return $str1;
- $path = preg_replace('/^(\.\/|\/)/','',$path);
- $path = 'tpl_path?>'.$path;
- $output = str_replace($str2, $path, $str1);
- return $output;
+ if(substr($path,0,2)=='./') $path = substr($path,2);
+ $path = 'tpl_path; ?>'.$path;
+ return str_replace($str2, $path, $str1);
}
/**
diff --git a/classes/widget/WidgetHandler.class.php b/classes/widget/WidgetHandler.class.php
index 4bd1aa7df..d5afaab30 100644
--- a/classes/widget/WidgetHandler.class.php
+++ b/classes/widget/WidgetHandler.class.php
@@ -112,7 +112,7 @@
* 관리자가 지정한 위젯의 style을 구함
**/
// 가끔 잘못된 코드인 background-image:url(none)이 들어 있을 수가 있는데 이럴 경우 none에 대한 url을 요청하므로 무조건 제거함
- $style = preg_replace('/background\-image: url\(none\)/is','', $args->style);
+ $style = preg_replace('/background\-image: url\((.+)(\/?)none\)/is','', $args->style);
// 내부 여백을 둔 것을 구해서 style문으로 미리 변경해 놓음
$widget_padding_left = $args->widget_padding_left;
@@ -132,7 +132,7 @@
case 'widgetContent' :
if($args->document_srl) {
$oDocument = $oDocumentModel->getDocument($args->document_srl);
- $body = $oDocument->getContent(false,false,false);
+ $body = $oDocument->getContent(false,false,false, false);
} else {
$body = base64_decode($args->body);
}
diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html
index 96453daae..b6336a034 100644
--- a/common/tpl/common_layout.html
+++ b/common/tpl/common_layout.html
@@ -42,6 +42,10 @@
+
+
+
+
{@ $ssl_actions = Context::getSSLActions() }
diff --git a/config/config.inc.php b/config/config.inc.php
index 2cdc0b252..39d6475e1 100644
--- a/config/config.inc.php
+++ b/config/config.inc.php
@@ -1,93 +1,100 @@
= 5.2.0. Firebug/FirePHP 플러그인 필요)
+ **/
+ if(!defined('__DEBUG_OUTPUT__')) define('__DEBUG_OUTPUT__', 0);
+
+ /**
+ * @brief FirePHP 콘솔 및 브라우저 주석 출력 보안
+ * 0 : 제한 없음 (권장하지 않음)
+ * 1 : 지정한 IP 주소에만 허용
+ **/
+ if(!defined('__DEBUG_PROTECT__')) define('__DEBUG_PROTECT__', 1);
+ if(!defined('__DEBUG_PROTECT_IP__')) define('__DEBUG_PROTECT_IP__', '127.0.0.1');
+
+ /**
+ * @brief DB 오류 메세지 출력 정의
+ * 0 : 출력하지 않음
+ * 1 : files/_debug_db_query.php 에 연결하여 출력
+ **/
+ if(!defined('__DEBUG_DB_OUTPUT__')) define('__DEBUG_DB_OUTPUT__', 0);
+
+ /**
+ * @brief DB 쿼리중 정해진 시간을 넘기는 쿼리의 로그 남김
+ * 0 : 로그를 남기지 않음
+ * 0 이상 : 단위를 초로 하여 지정된 초 이상의 실행시간이 걸린 쿼리를 로그로 남김
+ * 로그파일은 ./files/_db_slow_query.php 파일로 저장됨
+ **/
+ if(!defined('__LOG_SLOW_QUERY__')) define('__LOG_SLOW_QUERY__', 0);
+
+ /**
+ * @brief ob_gzhandler를 이용한 압축 기능을 강제로 사용하거나 끄는 옵션
+ * 0 : 사용하지 않음
+ * 1 : 사용함
+ * 대부분의 서버에서는 문제가 없는데 특정 서버군에서 압축전송시 IE에서 오동작을 일으키는경우가 있음
+ **/
+ if(!defined('__OB_GZHANDLER_ENABLE__')) define('__OB_GZHANDLER_ENABLE__', 1);
+
+
+
/**
* @brief Firebug 콘솔 출력 사용시 관련 파일 require
**/
- if(__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') == 1) {
- require_once _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php';
+ if((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '5.2.0', '>=')) {
+ require _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php';
}
/**
* @brief 간단하게 사용하기 위한 함수 정의한 파일 require
**/
- require_once(_XE_PATH_.'config/func.inc.php');
+ require_once(_XE_PATH_.'config/func.inc.php');
if(__DEBUG__) define('__StartTime__', getMicroTime());
/**
* @brief 기본적인 class 파일 include
- *
- * php5 기반으로 바꾸게 되면 _autoload를 이용할 수 있기에 제거 대상
+ * @TODO : PHP5 기반으로 바꾸게 되면 _autoload()를 이용할 수 있기에 제거 대상
**/
if(__DEBUG__) define('__ClassLoadStartTime__', getMicroTime());
require_once(_XE_PATH_.'classes/object/Object.class.php');
diff --git a/config/func.inc.php b/config/func.inc.php
index be378ec16..d56b51c19 100644
--- a/config/func.inc.php
+++ b/config/func.inc.php
@@ -395,40 +395,44 @@
* ./files/_debug_message.php 파일에 $buff 내용을 출력한다.
* tail -f ./files/_debug_message.php 하여 계속 살펴 볼 수 있다
**/
- function debugPrint($buff = null, $display_option = true) {
+ function debugPrint($debug_output = null, $display_option = true) {
+ if(!(__DEBUG__ & 1)) return;
+
static $firephp;
$bt = debug_backtrace();
if(is_array($bt)) $first = array_shift($bt);
$file_name = array_pop(explode(DIRECTORY_SEPARATOR, $first['file']));
$line_num = $first['line'];
- if(__DEBUG_OUTPUT__ == 0 || (__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') != 1) ) {
- $debug_file = _XE_PATH_.'files/_debug_message.php';
- $buff = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($buff, true));
-
- if($display_option === true) $buff = "\n====================================\n".$buff."------------------------------------\n";
- $buff = "\n\n";
- if(@!$fp = fopen($debug_file, 'a')) return;
- fwrite($fp, $buff);
- fclose($fp);
-
- } elseif(__DEBUG_OUTPUT__ == 2 && version_compare(phpversion(), '5.2', '>') == 1) {
+ if(__DEBUG_OUTPUT__ == 2 && version_compare(PHP_VERSION, '5.2.0', '>=')) {
if(!isset($firephp)) $firephp = FirePHP::getInstance(true);
- $label = sprintf('%s:%d', $file_name, $line_num);
- // FirePHP 옵션
- if($display_option === 'TABLE') {
- $label = $display_option;
- }
+ $label = sprintf('[%s:%d] ', $file_name, $line_num);
- if(__DEBUG_PROTECT__ == 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
- $buff = '허용되지 않은 IP 입니다. config/config.inc.php 파일의 __DEBUG_PROTECT_IP__ 상수 값을 자신의 IP로 변경하세요.';
+ // FirePHP 옵션 체크
+ if($display_option === 'TABLE') $label = $display_option;
+
+ // __DEBUG_PROTECT__ 옵션으로 지정된 IP와 접근 IP가 동일한지 체크
+ if(__DEBUG_PROTECT__ === 1 && __DEBUG_PROTECT_IP__ != $_SERVER['REMOTE_ADDR']) {
+ $debug_output = 'The IP address is not allowed. Change the value of __DEBUG_PROTECT_IP__ into your IP address in config/config.user.inc.php or config/config.inc.php';
$label = null;
}
- $firephp->fb($buff, $label);
+ $firephp->fb($debug_output, $label);
+
+ } else {
+ $debug_file = _XE_PATH_.'files/_debug_message.php';
+ $debug_output = sprintf("[%s %s:%d]\n%s\n", date('Y-m-d H:i:s'), $file_name, $line_num, print_r($debug_output, true));
+
+ if($display_option === true) $debug_output = str_repeat('=', 40)."\n".$debug_output.str_repeat('-', 40);
+ $debug_output = "\n\n";
+
+ if(@!$fp = fopen($debug_file, 'a')) return;
+ fwrite($fp, $debug_output);
+ fclose($fp);
}
}
+
/**
* @brief microtime() return
* @return float
@@ -721,4 +725,4 @@
}
}
-?>
+?>
\ No newline at end of file
diff --git a/modules/admin/lang/fr.lang.php b/modules/admin/lang/fr.lang.php
index 299c3f7e2..8ffdb5730 100644
--- a/modules/admin/lang/fr.lang.php
+++ b/modules/admin/lang/fr.lang.php
@@ -54,16 +54,16 @@
$lang->yesterday = "Yesterday";
$lang->today = "Today";
- $lang->cmd_lang_select = "언어선택";
- $lang->about_cmd_lang_select = "선택된 언어들만 서비스 됩니다";
- $lang->about_recompile_cache = "쓸모없어졌거나 잘못된 캐시파일들을 정리할 수 있습니다";
- $lang->use_ssl = "SSL 사용";
+ $lang->cmd_lang_select = "langue";
+ $lang->about_cmd_lang_select = "La langue choisie seulement sera servie";
+ $lang->about_recompile_cache = "Vous pouvez arranger les fichiers inutils ou les fichiers invalides d'antémémoire";
+ $lang->use_ssl = "Utiliser SSL";
$lang->ssl_options = array(
- 'none' => "사용안함",
- 'optional' => "선택적으로",
- 'always' => "항상사용"
+ 'none' => "Ne Pas utiliser",
+ 'optional' => "Optionnel",
+ 'always' => "Toujours"
);
- $lang->about_use_ssl = "선택적으로에서는 회원가입/정보수정등의 지정된 action에서 SSL을 사용하고 항상 사용은 모든 서비스가 SSL을 이용하게 됩니다.";
- $lang->server_ports = "서버포트지정";
- $lang->about_server_ports = "HTTP는 80, HTTPS는 443이외의 다른 포트를 사용하는 경우에 포트를 지정해주어야합니다.";
+ $lang->about_use_ssl = "Si l'on choisit 'Optionnel' , on utilise protocole SSL seulement dans quelques services comme inscription ou modification. Si l'on choisit 'Toujours', on utilise protocole SSL dans tous les services.";
+ $lang->server_ports = "déclarer le port de serveur";
+ $lang->about_server_ports = "Si l'on ne veut pas utiliser le port 80 pour HTTP mais un autre port, ou bien, si l'on ne veut pas utiliser le port 443 pour HTTPS mais un autre port, on doit déclarer les ports.";
?>
diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css
index bffc33d95..b58ebac07 100644
--- a/modules/admin/tpl/css/admin.css
+++ b/modules/admin/tpl/css/admin.css
@@ -89,7 +89,7 @@ ul.localNavigation li.on a { background-position:right top; padding:8px 15px 5px
#popHeadder, #popHistoryHeadder { margin-bottom:10px;}
#popHeadder h1, #popHistoryHeadder h1 { background:url("../images/top_head_title_bg.gif") repeat-x left top; font-size:1em; border:1px solid #E3E3E2; padding:9px; color:#555555; margin:0; }
-#popBody, #popHistoryBody { width:600px; padding:10px; background:#ffffff;}
+#popBody, #popHistoryBody { width:600px; padding:10px; background:#ffffff; *zoom:1; position:relative;}
#popHistoryBody { height: 200px; overflow: auto; padding-right:0; }
#popFooter { width:620px; background:#70A2C6; border-top:1px solid #e8e8e7; padding:.5em 0 .5em 0; overflow:hidden; }
#popFooter .close { position:relative; left:50%; margin-left:-1em; float:left;}
diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php
index c78217907..adaf4e49c 100644
--- a/modules/board/board.controller.php
+++ b/modules/board/board.controller.php
@@ -25,7 +25,8 @@
$obj->module_srl = $this->module_srl;
if($obj->is_notice!='Y'||!$this->grant->manager) $obj->is_notice = 'N';
- if(!$obj->title) $obj->title = cut_str(strip_tags($obj->content),20,'...');
+ settype($obj->title, "string");
+ if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
// 관리자가 아니라면 게시글 색상/굵기 제거
if(!$this->grant->manager) {
diff --git a/modules/board/skins/xe_board/write_form.html b/modules/board/skins/xe_board/write_form.html
index c951736e5..cee49c1e6 100644
--- a/modules/board/skins/xe_board/write_form.html
+++ b/modules/board/skins/xe_board/write_form.html
@@ -110,11 +110,11 @@
+