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('id: %s', $image_name_file, strip_tags($nick_name), strip_tags($nick_name)); - if($image_mark_file) $nick_name = sprintf('id: %s%s', $image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name); + if($image_name_file) $nick_name = sprintf('id: %s', Context::getRequestUri(),$image_name_file, strip_tags($nick_name), strip_tags($nick_name)); + if($image_mark_file) $nick_name = sprintf('id: %s%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.''; 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 @@ +
-
diff --git a/modules/board/skins/xe_guestbook/write_form.html b/modules/board/skins/xe_guestbook/write_form.html index 465767498..7668469dd 100644 --- a/modules/board/skins/xe_guestbook/write_form.html +++ b/modules/board/skins/xe_guestbook/write_form.html @@ -92,8 +92,12 @@ + + +
+  
diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index c1f863862..c867acf05 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -170,7 +170,7 @@ return htmlspecialchars($content); } - function getContent($add_popup_menu = true, $add_content_info = true) { + function getContent($add_popup_menu = true, $add_content_info = true, $add_xe_content_class = true) { if($this->isSecret() && !$this->isAccessible()) return Context::getLang('msg_is_secret'); $content = $this->get('content'); @@ -195,7 +195,7 @@ ); // 컨텐츠에 대한 조작이 필요하지 않더라도 xe_content라는 클래스명을 꼭 부여 } else { - $content = sprintf('
%s
', $content); + if($add_xe_content_class) $content = sprintf('
%s
', $content); } return $content; diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index d6c2265be..53b3dca23 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -137,7 +137,8 @@ } // 제목이 없으면 내용에서 추출 - 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,'...'); // 내용에서 XE만의 태그를 삭제 $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); @@ -238,7 +239,8 @@ } // 제목이 없으면 내용에서 추출 - 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,'...'); // 내용에서 XE만의 태그를 삭제 $obj->content = preg_replace('!<\!--(Before|After)(Document|Comment)\(([0-9]+),([0-9]+)\)-->!is', '', $obj->content); diff --git a/modules/document/document.item.php b/modules/document/document.item.php index f4f308a5b..d8b52d810 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -235,7 +235,7 @@ return htmlspecialchars($content); } - function getContent($add_popup_menu = true, $add_content_info = true, $resource_realpath = false) { + function getContent($add_popup_menu = true, $add_content_info = true, $resource_realpath = false, $add_xe_content_class = true) { if(!$this->document_srl) return; if($this->isSecret() && !$this->isGranted()) return Context::getLang('msg_is_secret'); @@ -271,7 +271,7 @@ ); // 컨텐츠에 대한 조작이 필요하지 않더라도 xe_content라는 클래스명을 꼭 부여 } else { - $content = sprintf('
%s
', $content); + if($add_xe_content_class) $content = sprintf('
%s
', $content); } // resource_realpath가 true이면 내용내 이미지의 경로를 절대 경로로 변경 diff --git a/modules/editor/components/image_link/image_link.class.php b/modules/editor/components/image_link/image_link.class.php index 996dde41e..dc5a1d82c 100644 --- a/modules/editor/components/image_link/image_link.class.php +++ b/modules/editor/components/image_link/image_link.class.php @@ -49,6 +49,7 @@ $link_url = $xml_obj->attrs->link_url; $open_window = $xml_obj->attrs->open_window; $style = $xml_obj->attrs->style; + $margin = (int)$xml_obj->attrs->margin; if(!$alt) { $tmp_arr = explode('/',$src); @@ -64,6 +65,10 @@ $attr_output[] = "alt=\"".$alt."\""; $attr_output[] = "title=\"".$alt."\""; } + if($margin) { + $style = preg_replace('/margin[: 0-9a-z]+\;/i','', $style); + $style .= 'margin:'.$margin.'px;'; + } if($align) $attr_output[] = "align=\"".$align."\""; if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\""; @@ -72,7 +77,7 @@ if($height) $attr_output[] = 'height="'.$height.'"'; if($border) $attr_output[] = 'border="'.$border.'"'; - $code = sprintf("", implode(" ",$attr_output), $style); + $code = sprintf("", implode(' ',$attr_output), $style); if($link_url) { if($open_window =='Y') $code = sprintf('%s', $link_url, $code); diff --git a/modules/editor/components/image_link/lang/en.lang.php b/modules/editor/components/image_link/lang/en.lang.php index ecc125a8f..568914d1d 100644 --- a/modules/editor/components/image_link/lang/en.lang.php +++ b/modules/editor/components/image_link/lang/en.lang.php @@ -15,6 +15,7 @@ $lang->image_align_right = "Right of Article"; $lang->image_border = "Border Thickness"; $lang->urllink_url = "URL"; + $lang->image_margin = 'Image Margin'; $lang->about_url_link_open_window = "Make the link to open as a new window"; $lang->cmd_get_scale = "Get Image Size"; diff --git a/modules/editor/components/image_link/lang/es.lang.php b/modules/editor/components/image_link/lang/es.lang.php index 65b2606e2..221d794a0 100644 --- a/modules/editor/components/image_link/lang/es.lang.php +++ b/modules/editor/components/image_link/lang/es.lang.php @@ -15,6 +15,7 @@ $lang->image_align_right = "Derecho de articulo"; $lang->image_border = "Grosor de Fronteras"; $lang->urllink_url = "URL"; + $lang->image_margin = 'Image Margin'; $lang->about_url_link_open_window = "Hacer el vinculo para abrir una nueva ventana"; $lang->cmd_get_scale = "Obtener tamano de la imagen"; diff --git a/modules/editor/components/image_link/lang/jp.lang.php b/modules/editor/components/image_link/lang/jp.lang.php index 88aa8ac88..9cb6cc552 100644 --- a/modules/editor/components/image_link/lang/jp.lang.php +++ b/modules/editor/components/image_link/lang/jp.lang.php @@ -14,6 +14,7 @@ $lang->image_align_middle = "中央揃え"; $lang->image_align_right = "右揃え"; $lang->image_border = "ボーダー"; + $lang->image_margin = 'Image Margin'; $lang->urllink_open_window = "新しいウィンドウで開く"; $lang->about_url_link_open_window = "チェックすると、リンクをクリックした時に新しいウィンドウで開きます。"; diff --git a/modules/editor/components/image_link/lang/ko.lang.php b/modules/editor/components/image_link/lang/ko.lang.php index d8f9bfbbe..20eeb8d87 100644 --- a/modules/editor/components/image_link/lang/ko.lang.php +++ b/modules/editor/components/image_link/lang/ko.lang.php @@ -5,18 +5,19 @@ * @brief 위지윅에디터(editor) 모듈 > 이미지링크(image_link) 컴포넌트의 언어팩 **/ - $lang->image_url = "이미지 경로"; - $lang->image_alt = "설명 입력"; - $lang->image_scale = "이미지크기"; - $lang->image_align = "정렬 방법 "; - $lang->image_align_normal = "한 문단을 차지"; - $lang->image_align_left = "글의 왼쪽으로"; - $lang->image_align_middle = "가운데"; - $lang->image_align_right = "글의 우측으로"; - $lang->image_border = "경계선 두께"; + $lang->image_url = '이미지 경로'; + $lang->image_alt = '설명 입력'; + $lang->image_scale = '이미지크기'; + $lang->image_align = '정렬 방법'; + $lang->image_align_normal = '한 문단을 차지'; + $lang->image_align_left = '글의 왼쪽으로'; + $lang->image_align_middle = '가운데'; + $lang->image_align_right = '글의 우측으로'; + $lang->image_border = '경계선 두께'; + $lang->image_margin = '바깥 여백'; - $lang->urllink_open_window = "새창열기"; - $lang->about_url_link_open_window = "선택하시면 링크 선택시 새창으로 열립니다"; + $lang->urllink_open_window = '새창열기'; + $lang->about_url_link_open_window = '선택하시면 링크 선택시 새창으로 열립니다'; - $lang->cmd_get_scale = "크기 구하기"; + $lang->cmd_get_scale = '크기 구하기'; ?> diff --git a/modules/editor/components/image_link/lang/ru.lang.php b/modules/editor/components/image_link/lang/ru.lang.php index 1d5ac7536..26424e0e1 100644 --- a/modules/editor/components/image_link/lang/ru.lang.php +++ b/modules/editor/components/image_link/lang/ru.lang.php @@ -15,6 +15,7 @@ $lang->image_align_right = "Право"; $lang->image_border = "Толщина рамки"; $lang->urllink_url = "URL"; + $lang->image_margin = 'Image Margin'; $lang->about_url_link_open_window = "Создайте ссылку для открытия в новом окне"; $lang->cmd_get_scale = "Получить размер изображения"; diff --git a/modules/editor/components/image_link/lang/zh-CN.lang.php b/modules/editor/components/image_link/lang/zh-CN.lang.php index 72163ad03..c936ab8d9 100644 --- a/modules/editor/components/image_link/lang/zh-CN.lang.php +++ b/modules/editor/components/image_link/lang/zh-CN.lang.php @@ -15,6 +15,7 @@ $lang->image_align_right = "内容右侧"; $lang->image_border = "边框粗细"; $lang->urllink_url = "URL"; + $lang->image_margin = 'Image Margin'; $lang->about_url_link_open_window = "将在新窗口中打开链接。"; $lang->cmd_get_scale = "获得图片大小"; diff --git a/modules/editor/components/image_link/lang/zh-TW.lang.php b/modules/editor/components/image_link/lang/zh-TW.lang.php index 70bd13441..355cd395f 100644 --- a/modules/editor/components/image_link/lang/zh-TW.lang.php +++ b/modules/editor/components/image_link/lang/zh-TW.lang.php @@ -15,6 +15,7 @@ $lang->image_align_right = "靠右"; $lang->image_border = "邊框粗細"; $lang->urllink_url = "網址"; + $lang->image_margin = 'Image Margin'; $lang->about_url_link_open_window = "開啟連結於新視窗。"; $lang->cmd_get_scale = "取得圖片大小"; diff --git a/modules/editor/components/image_link/tpl/popup.html b/modules/editor/components/image_link/tpl/popup.html index 6890d935c..85d3cf5f4 100644 --- a/modules/editor/components/image_link/tpl/popup.html +++ b/modules/editor/components/image_link/tpl/popup.html @@ -79,6 +79,10 @@
{$lang->image_border}
px + +
{$lang->image_margin}
+ px +
diff --git a/modules/editor/components/image_link/tpl/popup.js b/modules/editor/components/image_link/tpl/popup.js index 6939bcdd7..6c97366d5 100644 --- a/modules/editor/components/image_link/tpl/popup.js +++ b/modules/editor/components/image_link/tpl/popup.js @@ -27,6 +27,8 @@ function getImage() { node.style.cssFloat : node.style.styleFloat; if(!align) align = node.style.verticalAlign? node.style.verticalAlign : node.getAttribute("align"); + var margin = node.style.margin ? + node.style.margin.match("[0-9]+") : node.getAttribute("margin"); var alt = node.getAttribute("alt"); var width = xWidth(node); var height = xHeight(node); @@ -51,6 +53,10 @@ function getImage() { default : xGetElementById("align_normal").checked = true; break; } + if(margin) { + xGetElementById('image_margin').value = margin; + } + xGetElementById("image_border").value = border; xGetElementById("width").value = width; @@ -87,6 +93,7 @@ function insertImage(obj) { else if(xGetElementById("align_middle").checked==true) align = "vertical-align: middle"; else if(xGetElementById("align_right").checked==true) align = "float: right"; var border = parseInt(xGetElementById("image_border").value,10); + var margin = parseInt(xGetElementById("image_margin").value,10); var width = xGetElementById("width").value; var height = xGetElementById("height").value; @@ -97,18 +104,21 @@ function insertImage(obj) { } url = url.replace(request_uri,''); - var text = " - + {@ $editor_class = "black" } diff --git a/modules/file/file.admin.controller.php b/modules/file/file.admin.controller.php index 591798ebc..e5ded7f37 100644 --- a/modules/file/file.admin.controller.php +++ b/modules/file/file.admin.controller.php @@ -81,6 +81,8 @@ $config->allowed_filesize = Context::get('allowed_filesize'); $config->allowed_attach_size = Context::get('allowed_attach_size'); $config->allowed_filetypes = Context::get('allowed_filetypes'); + $config->allow_outlink = Context::get('allow_outlink'); + $config->allow_outlink_site = Context::get('allow_outlink_site'); // module Controller 객체 생성하여 입력 $oModuleController = &getController('module'); @@ -101,6 +103,8 @@ $download_grant = trim(Context::get('download_grant')); + $file_config->allow_outlink = Context::get('allow_outlink'); + $file_config->allow_outlink_site = Context::get('allow_outlink_site'); $file_config->allowed_filesize = Context::get('allowed_filesize'); $file_config->allowed_attach_size = Context::get('allowed_attach_size'); $file_config->allowed_filetypes = Context::get('allowed_filetypes'); diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php index 7e868d033..8e8a5c507 100644 --- a/modules/file/file.controller.php +++ b/modules/file/file.controller.php @@ -54,8 +54,28 @@ $file_obj = $oFileModel->getFile($file_srl); if($file_obj->file_srl!=$file_srl || $file_obj->sid!=$sid || $file_obj->isvalid!='Y') return $this->stop('msg_not_permitted_download'); - // 파일 다운로드 권한이 있는지 확인 $file_module_config = $oFileModel->getFileModuleConfig($file_obj->module_srl); + // 파일 외부링크 차단 + if($file_module_config->allow_outlink == 'N') { + $referer = parse_url($_SERVER["HTTP_REFERER"]); + if($referer['host'] != $_SERVER['HTTP_HOST']) { + if($file_module_config->allow_outlink_site) { + $allow_outlink_site_array = array(); + $allow_outlink_site_array = explode("\n", $file_module_config->allow_outlink_site); + if(!is_array($allow_outlink_site_array)) $allow_outlink_site_array[0] = $file_module_config->allow_outlink_site; + foreach($allow_outlink_site_array as $val) { + $site = parse_url(trim($val)); + if($site['host'] == $referer['host']) { + $file_module_config->allow_outlink = 'Y'; + break; + } + } + if($file_module_config->allow_outlink != 'Y') return $this->stop('msg_not_permitted_download'); + } + else return $this->stop('msg_not_permitted_download'); + } + } + // 파일 다운로드 권한이 있는지 확인 if(is_array($file_module_config->download_grant) && count($file_module_config->download_grant)>0) { if(!Context::get('is_logged')) return $this->stop('msg_not_permitted_download'); $logged_info = Context::get('logged_info'); diff --git a/modules/file/file.model.php b/modules/file/file.model.php index ea3116e29..22893f708 100644 --- a/modules/file/file.model.php +++ b/modules/file/file.model.php @@ -93,18 +93,23 @@ $config->allowed_attach_size = $file_config->allowed_attach_size; $config->allowed_filetypes = $file_config->allowed_filetypes; $config->download_grant = $file_config->download_grant; + $config->allow_outlink = $file_config->allow_outlink; + $config->allow_outlink_site = $file_config->allow_outlink_site; } // 전체 파일첨부 속성을 먼저 따른다 if(!$config->allowed_filesize) $config->allowed_filesize = $file_module_config->allowed_filesize; if(!$config->allowed_attach_size) $config->allowed_attach_size = $file_module_config->allowed_attach_size; if(!$config->allowed_filetypes) $config->allowed_filetypes = $file_module_config->allowed_filetypes; + if(!$config->allow_outlink) $config->allow_outlink = $file_module_config->allow_outlink; + if(!$config->allow_outlink_site) $config->allow_outlink_site = $file_module_config->allow_outlink_site; if(!$config->download_grant) $config->download_grant = $file_module_config->download_grant; // 그래도 없으면 default로 if(!$config->allowed_filesize) $config->allowed_filesize = '2'; if(!$config->allowed_attach_size) $config->allowed_attach_size = '3'; if(!$config->allowed_filetypes) $config->allowed_filetypes = '*.*'; + if(!$config->allow_outlink) $config->allow_outlink = 'Y'; if(!$config->download_grant) $config->download_grant = array(); return $config; diff --git a/modules/file/lang/en.lang.php b/modules/file/lang/en.lang.php index 65054cf0e..bcf6886b9 100644 --- a/modules/file/lang/en.lang.php +++ b/modules/file/lang/en.lang.php @@ -1,46 +1,50 @@ - - * @brief Attachment module's basic language pack - **/ - - $lang->file = 'Attachment'; - $lang->file_name = 'File Name'; - $lang->file_size = 'File Size'; - $lang->download_count = 'Number of Downloads'; - $lang->status = 'Status'; - $lang->is_valid = 'Valid'; - $lang->is_stand_by = 'Stand by'; - $lang->file_list = 'Attachments List'; - $lang->allowed_filesize = 'Maximum File Size'; - $lang->allowed_attach_size = 'Maximum Attachments'; - $lang->allowed_filetypes = 'Allowed Extensions'; - $lang->enable_download_group = 'Download Allowed Groups'; - - $lang->about_allowed_filesize = 'You can assign file size limit for each file. (Exclude administrators)'; - $lang->about_allowed_attach_size = 'You can assign file size limit for each document. (Exclude administrators)'; - $lang->about_allowed_filetypes = 'Only allowed extentsions can be attached. To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension.
ex) *.* or *.jpg;*.gif;
(Exclude Administrators)'; - - $lang->cmd_delete_checked_file = 'Delete Selected Item(s)'; - $lang->cmd_move_to_document = 'Move to Document'; - $lang->cmd_download = 'Download'; - - $lang->msg_not_permitted_download = 'You do not have permission to download'; - $lang->msg_cart_is_null = 'Please select file(s) to delete'; - $lang->msg_checked_file_is_deleted = '%d attachment(s) was(were) deleted'; - $lang->msg_exceeds_limit_size = 'File size of attachment is bigger than allowed size.'; - - - $lang->file_search_target_list = array( - 'filename' => 'File Name', - 'filesize' => 'File Size (byte, over)', - 'filesize_mega' => 'File Size (mbyte, over)', - 'download_count' => 'Downloads (over)', - 'regdate' => 'Registered Date', - 'user_id' => 'User UD', - 'user_name' => 'User Name', - 'nick_name' => 'Nickname', - 'ipaddress' => 'IP Address', - ); -?> + + * @brief Attachment module's basic language pack + **/ + + $lang->file = 'Attachment'; + $lang->file_name = 'File Name'; + $lang->file_size = 'File Size'; + $lang->download_count = 'Number of Downloads'; + $lang->status = 'Status'; + $lang->is_valid = 'Valid'; + $lang->is_stand_by = 'Stand by'; + $lang->file_list = 'Attachments List'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; + $lang->allowed_filesize = 'Maximum File Size'; + $lang->allowed_attach_size = 'Maximum Attachments'; + $lang->allowed_filetypes = 'Allowed Extensions'; + $lang->enable_download_group = 'Download Allowed Groups'; + + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = 'You can assign file size limit for each file. (Exclude administrators)'; + $lang->about_allowed_attach_size = 'You can assign file size limit for each document. (Exclude administrators)'; + $lang->about_allowed_filetypes = 'Only allowed extentsions can be attached. To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension.
ex) *.* or *.jpg;*.gif;
(Exclude Administrators)'; + + $lang->cmd_delete_checked_file = 'Delete Selected Item(s)'; + $lang->cmd_move_to_document = 'Move to Document'; + $lang->cmd_download = 'Download'; + + $lang->msg_not_permitted_download = 'You do not have permission to download'; + $lang->msg_cart_is_null = 'Please select file(s) to delete'; + $lang->msg_checked_file_is_deleted = '%d attachment(s) was(were) deleted'; + $lang->msg_exceeds_limit_size = 'File size of attachment is bigger than allowed size.'; + + + $lang->file_search_target_list = array( + 'filename' => 'File Name', + 'filesize' => 'File Size (byte, over)', + 'filesize_mega' => 'File Size (mbyte, over)', + 'download_count' => 'Downloads (over)', + 'regdate' => 'Registered Date', + 'user_id' => 'User UD', + 'user_name' => 'User Name', + 'nick_name' => 'Nickname', + 'ipaddress' => 'IP Address', + ); +?> diff --git a/modules/file/lang/es.lang.php b/modules/file/lang/es.lang.php index 30133cb32..3566453ca 100644 --- a/modules/file/lang/es.lang.php +++ b/modules/file/lang/es.lang.php @@ -2,7 +2,7 @@ /** * @archivo modules/file/lang/es.lang.php * @autor zero - * @sumario Paquete del idioma español para los archivos adjuntos + * @sumario Paquete del idioma espaA±ol para los archivos adjuntos **/ $lang->file = 'Adjuntar archivos'; @@ -13,12 +13,16 @@ $lang->is_valid = 'Válido'; $lang->is_stand_by = 'En espera'; $lang->file_list = 'Lista de archivos adjuntos'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; $lang->allowed_filesize = 'Límite del tamaño del archivo adjunto'; $lang->allowed_attach_size = 'Límite del tamaño total de los archivos adjuntos por documento'; $lang->allowed_filetypes = 'Tipos de archivos permitidos'; $lang->enable_download_group = 'Descargar permitió grupos'; - $lang->about_allowed_filesize = 'Puede definir el límite del tamaño del archivo adjunto. (exceptuando el administrador)'; + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = 'Puede definir el límite del tamaño del archivo adjunto. (exceptuando el administrador)'; $lang->about_allowed_attach_size = 'Puede definir el límite del tamaño total de los archivos adjuntos por documento. (exceptuando el administrador)'; $lang->about_allowed_filetypes = 'Puede definir las extensiones de los archivos permitidos. Para permitir una extensión use "*.extensión". Para permitir más de una extensión use ";".
ej) *.* o *.jpg;*.gif;etc.
(exceptuando el administrador)'; diff --git a/modules/file/lang/fr.lang.php b/modules/file/lang/fr.lang.php index f12dfba2f..a46b87351 100644 --- a/modules/file/lang/fr.lang.php +++ b/modules/file/lang/fr.lang.php @@ -1,45 +1,49 @@ - Traduit par Pierre Duvent - * @brief Paquet du langage en français pour le module d\'Annexe - **/ - - $lang->file = 'Annexe'; - $lang->file_name = 'Nom du Fichier'; - $lang->file_size = 'Mesure du Fichier'; - $lang->download_count = 'Somme du Téléchargé'; - $lang->status = 'Statut'; - $lang->is_valid = 'Valide'; - $lang->is_stand_by = 'Attente'; - $lang->file_list = 'Liste des Annexes'; - $lang->allowed_filesize = 'Mesure du Fichier Maximum'; - $lang->allowed_attach_size = 'Somme des Annexes Maximum'; - $lang->allowed_filetypes = 'Extensions consentis'; - $lang->enable_download_group = 'Groupe permis de télécharger'; - - $lang->about_allowed_filesize = 'Vous pouvez désigner la limite de mesure pour chaque fichier. (Exclure administrateurs)'; - $lang->about_allowed_attach_size = 'Vous pouvez désigner la limite de mesure pour chaque document. (Exclure administrateurs)'; - $lang->about_allowed_filetypes = 'Extensions consentis seulement peuvent être attachés. Pour consentir une extension, utilisez "*.[extention]". Pour consentir plusieurs extensions, utilisez ";" entre chaque extension.
ex) *.* ou *.jpg;*.gif;
(Exclure Administrateurs)'; - - $lang->cmd_delete_checked_file = 'Supprimer item(s) slectionné(s)'; - $lang->cmd_move_to_document = 'Bouger au Document'; - $lang->cmd_download = 'Télécharger'; - - $lang->msg_not_permitted_download = 'Vous n\'êtes pas permis(e) de télécharger'; - $lang->msg_cart_is_null = 'Choisissez un(des) fichier(s) à supprimer'; - $lang->msg_checked_file_is_deleted = '%d Annexe(s) est(sont) supprimé(s)'; - $lang->msg_exceeds_limit_size = 'La mesure de l\'(des) Annexe(s) est plus grande que celle consentie.'; - - $lang->file_search_target_list = array( - 'filename' => 'Nom de Fichier', - 'filesize' => 'Mesure de Fichier (octet, surplus)', - 'filesize_mega' => '파일크기 (Mb, 이상)', - 'download_count' => 'Téléchargés (surplus)', - 'user_id' => '아이디', - 'user_name' => '이름', - 'nick_name' => '닉네임', - 'regdate' => 'Enrgistré', - 'ipaddress' => 'Adresse IP', - ); -?> + Traduit par Pierre Duvent + * @brief Paquet du langage en francais pour le module d\'Annexe + **/ + + $lang->file = 'Annexe'; + $lang->file_name = 'Nom du Fichier'; + $lang->file_size = 'Mesure du Fichier'; + $lang->download_count = 'Somme du Telecharge'; + $lang->status = 'Statut'; + $lang->is_valid = 'Valide'; + $lang->is_stand_by = 'Attente'; + $lang->file_list = 'Liste des Annexes'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; + $lang->allowed_filesize = 'Mesure du Fichier Maximum'; + $lang->allowed_attach_size = 'Somme des Annexes Maximum'; + $lang->allowed_filetypes = 'Extensions consentis'; + $lang->enable_download_group = 'Groupe permis de telecharger'; + + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = 'Vous pouvez designer la limite de mesure pour chaque fichier. (Exclure administrateurs)'; + $lang->about_allowed_attach_size = 'Vous pouvez designer la limite de mesure pour chaque document. (Exclure administrateurs)'; + $lang->about_allowed_filetypes = 'Extensions consentis seulement peuvent etre attaches. Pour consentir une extension, utilisez "*.[extention]". Pour consentir plusieurs extensions, utilisez ";" entre chaque extension.
ex) *.* ou *.jpg;*.gif;
(Exclure Administrateurs)'; + + $lang->cmd_delete_checked_file = 'Supprimer item(s) slectionne(s)'; + $lang->cmd_move_to_document = 'Bouger au Document'; + $lang->cmd_download = 'Telecharger'; + + $lang->msg_not_permitted_download = 'Vous n\'etes pas permis(e) de telecharger'; + $lang->msg_cart_is_null = 'Choisissez un(des) fichier(s) a supprimer'; + $lang->msg_checked_file_is_deleted = '%d Annexe(s) est(sont) supprime(s)'; + $lang->msg_exceeds_limit_size = 'La mesure de l\'(des) Annexe(s) est plus grande que celle consentie.'; + + $lang->file_search_target_list = array( + 'filename' => 'Nom de Fichier', + 'filesize' => 'Mesure de Fichier (octet, surplus)', + 'filesize_mega' => '파일크기 (Mb, 이상)', + 'download_count' => 'Telecharges (surplus)', + 'user_id' => '아이디', + 'user_name' => '이름', + 'nick_name' => '닉네임', + 'regdate' => 'Enrgistre', + 'ipaddress' => 'Adresse IP', + ); +?> diff --git a/modules/file/lang/jp.lang.php b/modules/file/lang/jp.lang.php index 1f36ee473..048310986 100644 --- a/modules/file/lang/jp.lang.php +++ b/modules/file/lang/jp.lang.php @@ -1,45 +1,49 @@ - 翻訳:RisaPapa、ミニミ - * @brief 添付ファイル(file)モジュールの基本言語パッケージ - **/ - - $lang->file = '添付ファイル'; - $lang->file_name = 'ファイル名'; - $lang->file_size = 'ファイルサイズ'; - $lang->download_count = 'ダウンロード数'; - $lang->status = '状態'; - $lang->is_valid = '有効'; - $lang->is_stand_by = '待機'; - $lang->file_list = '添付ファイルリスト'; - $lang->allowed_filesize = 'ファイルサイズ制限'; - $lang->allowed_attach_size = '書き込みへの添付制限'; - $lang->allowed_filetypes = '添付可能な拡張子'; - $lang->enable_download_group = 'ダウンロード可能グループ'; - - $lang->about_allowed_filesize = '一つのファイルに対して、アップロードできるファイルの最大サイズを指定します(管理者除外)。'; - $lang->about_allowed_attach_size = '一つの書き込みに対して、添付できる最大サイズを指定します(管理者除外)。'; - $lang->about_allowed_filetypes = 'アップロードできるように設定されたファイルのみが添付できます。"*.拡張子"で指定し、 ";"で区切って任意の拡張子を追加して指定できます(管理者除外)。
ex) *.* or *.jpg;*.gif;
'; - - $lang->cmd_delete_checked_file = '選択リスト削除'; - $lang->cmd_move_to_document = '書き込みに移動する'; - $lang->cmd_download = 'ダウンロード'; - - $lang->msg_not_permitted_download = 'ダウンロード権限がありません。'; - $lang->msg_cart_is_null = '削除するファイルを選択してください'; - $lang->msg_checked_file_is_deleted = '%d個の添付ファイルを削除しました'; - $lang->msg_exceeds_limit_size = 'ファイルサイズの制限を超えたため、添付できません。'; - - $lang->file_search_target_list = array( - 'filename' => 'ファイル名', - 'filesize' => 'ファイルサイズ((Byte以上)', - 'filesize_mega' => 'ファイルサイズ (Mb、以上)', - 'download_count' => 'ダウンロード数(以上)', - 'user_id' => 'ユーザーID', - 'user_name' => '名前', - 'nick_name' => 'ニックネーム', - 'regdate' => '登録日', - 'ipaddress' => 'IPアドレス', - ); -?> + 翻訳:RisaPapa、ミニミ + * @brief 添付ファイル(file)モジュールの基本言語パッケージ + **/ + + $lang->file = '添付ファイル'; + $lang->file_name = 'ファイル名'; + $lang->file_size = 'ファイルサイズ'; + $lang->download_count = 'ダウンロード数'; + $lang->status = '状態'; + $lang->is_valid = '有効'; + $lang->is_stand_by = '待機'; + $lang->file_list = '添付ファイルリスト'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; + $lang->allowed_filesize = 'ファイルサイズ制限'; + $lang->allowed_attach_size = '書き込みへの添付制限'; + $lang->allowed_filetypes = '添付可能な拡張子'; + $lang->enable_download_group = 'ダウンロード可能グループ'; + + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = '一つのファイルに対して、アップロードできるファイルの最大サイズを指定します(管理者除外)。'; + $lang->about_allowed_attach_size = '一つの書き込みに対して、添付できる最大サイズを指定します(管理者除外)。'; + $lang->about_allowed_filetypes = 'アップロードできるように設定されたファイルのみが添付できます。"*.拡張子"で指定し、 ";"で区切って任意の拡張子を追加して指定できます(管理者除外)。
ex) *.* or *.jpg;*.gif;
'; + + $lang->cmd_delete_checked_file = '選択リスト削除'; + $lang->cmd_move_to_document = '書き込みに移動する'; + $lang->cmd_download = 'ダウンロード'; + + $lang->msg_not_permitted_download = 'ダウンロード権限がありません。'; + $lang->msg_cart_is_null = '削除するファイルを選択してください'; + $lang->msg_checked_file_is_deleted = '%d個の添付ファイルを削除しました'; + $lang->msg_exceeds_limit_size = 'ファイルサイズの制限を超えたため、添付できません。'; + + $lang->file_search_target_list = array( + 'filename' => 'ファイル名', + 'filesize' => 'ファイルサイズ((Byte以上)', + 'filesize_mega' => 'ファイルサイズ (Mb、以上)', + 'download_count' => 'ダウンロード数(以上)', + 'user_id' => 'ユーザーID', + 'user_name' => '名前', + 'nick_name' => 'ニックネーム', + 'regdate' => '登録日', + 'ipaddress' => 'IPアドレス', + ); +?> diff --git a/modules/file/lang/ko.lang.php b/modules/file/lang/ko.lang.php index b49df9ad0..e9a9b5581 100644 --- a/modules/file/lang/ko.lang.php +++ b/modules/file/lang/ko.lang.php @@ -13,11 +13,15 @@ $lang->is_valid = '유효'; $lang->is_stand_by = '대기'; $lang->file_list = '첨부 파일 목록'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; $lang->allowed_filesize = '파일 제한 크기'; $lang->allowed_attach_size = '문서 첨부 제한'; $lang->allowed_filetypes = '허용 확장자'; $lang->enable_download_group = '다운로드 가능 그룹'; + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; $lang->about_allowed_filesize = '하나의 파일에 대해 최고 용량을 지정할 수 있습니다. (관리자는 제외)'; $lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다. (관리자는 제외)'; $lang->about_allowed_filetypes = '허용한 확장자만 첨부할 수 있습니다. "*.확장자"로 지정할 수 있고 ";" 으로 여러개 지정이 가능합니다.
ex) *.* or *.jpg;*.gif;
(관리자는 제외)'; diff --git a/modules/file/lang/ru.lang.php b/modules/file/lang/ru.lang.php index a4cfae678..0067eb2b3 100644 --- a/modules/file/lang/ru.lang.php +++ b/modules/file/lang/ru.lang.php @@ -1,45 +1,49 @@ - | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467; - * @brief Russian basic language pack - **/ - - $lang->file = 'Вложение'; - $lang->file_name = 'Имя файла'; - $lang->file_size = 'Размер файла'; - $lang->download_count = 'Скачано'; - $lang->status = 'Состояние'; - $lang->is_valid = 'Верно'; - $lang->is_stand_by = 'Ожидание'; - $lang->file_list = 'Список Вложений'; - $lang->allowed_filesize = 'Лимит размера файла'; - $lang->allowed_attach_size = 'Общий лимит размера'; - $lang->allowed_filetypes = 'Разрешенные расширения'; - $lang->enable_download_group = 'Группы с разрешением на скачивание'; - - $lang->about_allowed_filesize = 'Вы можете присвоить лимит на размер для каждого файла. (Исключая администраторов)'; - $lang->about_allowed_attach_size = 'Вы можете присвоить лимит на размер для каждого документа. (Исключая администраторов'; - $lang->about_allowed_filetypes = 'Только файлы с разрешенными расширениями могут быть вложены. Чтобы разрешить расширение, ипользуйте "*.расширение". Чтобы разрешить несколько расширений, используйте ";" между ними.
например: *.* или *.jpg;*.gif;
(Исключая администраторов)'; - - $lang->cmd_delete_checked_file = 'Удалить Выделенные'; - $lang->cmd_move_to_document = 'Переместить в документ'; - $lang->cmd_download = 'Скачать'; - - $lang->msg_not_permitted_download = 'У Вас нет прав доступа для скачивания'; - $lang->msg_cart_is_null = 'Выберите файл, который Вы хотите удалить'; - $lang->msg_checked_file_is_deleted = 'Всего %d вложений было удалено'; - $lang->msg_exceeds_limit_size = 'Вложение провалено: превышен лимит размера файлов'; - - $lang->file_search_target_list = array( - 'filename' => 'Имя файла', - 'filesize' => 'Размер файла (байт, Выше)', - 'filesize_mega' => '파일크기 (Mb, 이상)', - 'download_count' => 'Скачано (Выше)', - 'user_id' => '아이디', - 'user_name' => '이름', - 'nick_name' => '닉네임', - 'regdate' => 'Дата', - 'ipaddress' => 'IP-Адрес', - ); -?> + | translation by Maslennikov Evgeny aka X-[Vr]bL1s5 | e-mail: x-bliss[a]tut.by; ICQ: 225035467; + * @brief Russian basic language pack + **/ + + $lang->file = 'Вложение'; + $lang->file_name = 'Имя файла'; + $lang->file_size = 'Размер файла'; + $lang->download_count = 'Скачано'; + $lang->status = 'Состояние'; + $lang->is_valid = 'Верно'; + $lang->is_stand_by = 'Ожидание'; + $lang->file_list = 'Список Вложений'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; + $lang->allowed_filesize = 'Лимит размера файла'; + $lang->allowed_attach_size = 'Общий лимит размера'; + $lang->allowed_filetypes = 'Разрешенные расширения'; + $lang->enable_download_group = 'Группы с разрешением на скачивание'; + + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = 'Вы можете присвоить лимит на размер для каждого файла. (Исключая администраторов)'; + $lang->about_allowed_attach_size = 'Вы можете присвоить лимит на размер для каждого документа. (Исключая администраторов'; + $lang->about_allowed_filetypes = 'Только файлы с разрешенными расширениями могут быть вложены. Чтобы разрешить расширение, ипользуйте "*.расширение". Чтобы разрешить несколько расширений, используйте ";" между ними.
например: *.* или *.jpg;*.gif;
(Исключая администраторов)'; + + $lang->cmd_delete_checked_file = 'Удалить Выделенные'; + $lang->cmd_move_to_document = 'Переместить в документ'; + $lang->cmd_download = 'Скачать'; + + $lang->msg_not_permitted_download = 'У Вас нет прав доступа для скачивания'; + $lang->msg_cart_is_null = 'Выберите файл, который Вы хотите удалить'; + $lang->msg_checked_file_is_deleted = 'Всего %d вложений было удалено'; + $lang->msg_exceeds_limit_size = 'Вложение провалено: превышен лимит размера файлов'; + + $lang->file_search_target_list = array( + 'filename' => 'Имя файла', + 'filesize' => 'Размер файла (байт, Выше)', + 'filesize_mega' => '파일크기 (Mb, 이상)', + 'download_count' => 'Скачано (Выше)', + 'user_id' => '아이디', + 'user_name' => '이름', + 'nick_name' => '닉네임', + 'regdate' => 'Дата', + 'ipaddress' => 'IP-Адрес', + ); +?> diff --git a/modules/file/lang/zh-CN.lang.php b/modules/file/lang/zh-CN.lang.php index e041a556c..a73a95d3c 100644 --- a/modules/file/lang/zh-CN.lang.php +++ b/modules/file/lang/zh-CN.lang.php @@ -13,12 +13,16 @@ $lang->is_valid = '有效'; $lang->is_stand_by = '等待'; $lang->file_list = '附件目录'; - $lang->allowed_filesize = '文件大小限制'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; + $lang->allowed_filesize = '文件大小限制'; $lang->allowed_attach_size = '上传限制'; $lang->allowed_filetypes = '可用扩展名'; $lang->enable_download_group = '允许下载的用户组'; - $lang->about_allowed_filesize = '最大单个上传文件大小(管理员不受此限制)。'; + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = '最大单个上传文件大小(管理员不受此限制)。'; $lang->about_allowed_attach_size = '每个主题最大上传文件大小(管理员不受此限制)。'; $lang->about_allowed_filetypes = '只允许上传指定的扩展名。 可以用"*.扩展名"来指定或用 ";"来 区分多个扩展名
例) *.* or *.jpg;*.gif;
(管理员不受此限制)'; diff --git a/modules/file/lang/zh-TW.lang.php b/modules/file/lang/zh-TW.lang.php index eb7d95979..5e565db86 100644 --- a/modules/file/lang/zh-TW.lang.php +++ b/modules/file/lang/zh-TW.lang.php @@ -13,12 +13,16 @@ $lang->is_valid = '有效'; $lang->is_stand_by = '等待'; $lang->file_list = '檔案清單'; + $lang->allow_outlink = '파일 외부 링크'; + $lang->allow_outlink_site = '파일 외부 허용 사이트'; $lang->allowed_filesize = '檔案大小限制'; $lang->allowed_attach_size = '上傳限制'; $lang->allowed_filetypes = '允許檔案類型'; $lang->enable_download_group = '允許下載的用戶組'; - $lang->about_allowed_filesize = '最大單一上傳檔案大小(管理員不受此限制)。'; + $lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)'; + $lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.
ex)http://www.zeroboard.com'; + $lang->about_allowed_filesize = '最大單一上傳檔案大小(管理員不受此限制)。'; $lang->about_allowed_attach_size = '每個主題最大上傳檔案大小(管理員不受此限制)。'; $lang->about_allowed_filetypes = '設定允許上傳的檔案類型。 可以用"*.副檔名"來指定或用 ";"來 區分多個副檔名
例) *.* or *.jpg;*.gif;
(管理員不受此限制)'; diff --git a/modules/file/tpl/file_config.html b/modules/file/tpl/file_config.html index d3310ad81..f215d4e45 100644 --- a/modules/file/tpl/file_config.html +++ b/modules/file/tpl/file_config.html @@ -3,6 +3,23 @@
+ + + + + + + + - - -
{$lang->allow_outlink}
+ +

{$lang->about_allow_outlink}

+
{$lang->allow_outlink_site}
+ +

{$lang->about_allow_outlink_site}

+
{$lang->allowed_filesize}
diff --git a/modules/importer/tpl/js/importer_admin.js b/modules/importer/tpl/js/importer_admin.js index af81a6e97..479d9765b 100644 --- a/modules/importer/tpl/js/importer_admin.js +++ b/modules/importer/tpl/js/importer_admin.js @@ -86,7 +86,7 @@ function completePreProcessing(ret_obj, response_tags) { fo_obj.key.value = key; var fo_import = xGetElementById('fo_import'); - if(fo_import && fo_import.target_module) fo_obj.target_module.value = fo_import.target_module.options[fo_import.target_module.selectedIndex].value; + if(fo_import && fo_import.target_module) fo_obj.target_module.value = fo_import.target_module.value; if(fo_import && fo_import.user_id) fo_obj.user_id.value = fo_import.user_id.value; fo_obj.unit_count.value = fo_import.unit_count.options[fo_import.unit_count.selectedIndex].value; @@ -160,3 +160,10 @@ function displayProgress(total, cur) { status += '
'; xInnerHtml('status', status); } + +function insertSelectedModule(id, module_srl, mid, browser_title) { + var obj= xGetElementById('_'+id); + var sObj = xGetElementById(id); + sObj.value = module_srl; + obj.value = browser_title+' ('+mid+')'; +} diff --git a/modules/importer/tpl/module.html b/modules/importer/tpl/module.html index 021d2ab63..0f34d35a0 100644 --- a/modules/importer/tpl/module.html +++ b/modules/importer/tpl/module.html @@ -4,17 +4,13 @@
+
{$lang->import_step_title[1]} - {$lang->import_step_desc[12]}
- + {$lang->cmd_select}
diff --git a/modules/importer/tpl/ttxml.html b/modules/importer/tpl/ttxml.html index 43f293927..430ae225d 100644 --- a/modules/importer/tpl/ttxml.html +++ b/modules/importer/tpl/ttxml.html @@ -4,17 +4,13 @@
+
{$lang->import_step_title[1]} - {$lang->import_step_desc[12]}
- + {$lang->cmd_select}
diff --git a/modules/importer/ttimport.class.php b/modules/importer/ttimport.class.php index 3aaffb50b..b7ad50d2d 100644 --- a/modules/importer/ttimport.class.php +++ b/modules/importer/ttimport.class.php @@ -438,7 +438,7 @@ $parent_output = executeQuery('comment.getCommentListItem', $parent_args); // 부모댓글이 존재하지 않으면 return - if(!$parent_output->toBool() || !$parent_output->data) continue; + if(!$parent_output->toBool() || !$parent_output->data) return false; $parent = $parent_output->data; $list_args->head = $parent->head; diff --git a/modules/issuetracker/conf/info.xml b/modules/issuetracker/conf/info.xml index 887fd2d75..9d2953604 100644 --- a/modules/issuetracker/conf/info.xml +++ b/modules/issuetracker/conf/info.xml @@ -4,11 +4,13 @@ イシュートラッカー 问题跟踪 Issue Tracker + Issue Tracker 問題追蹤 각종 이슈 처리를 위한 모듈입니다. 各種イシューを処理するモジュールです。 一个具有项目跟踪功能的模块。 This module handles many kinds of issues. + Este módulo se ocupa de muchos tipos de cuestiones. 可以處理追蹤多種問題的模組。 1.0 2008-08-04 @@ -18,6 +20,7 @@ haneul haneul haneul + haneul haneul @@ -25,6 +28,7 @@ zero zero zero + zero zero diff --git a/modules/issuetracker/conf/module.xml b/modules/issuetracker/conf/module.xml index 80a1bc27e..fc66e7e9b 100644 --- a/modules/issuetracker/conf/module.xml +++ b/modules/issuetracker/conf/module.xml @@ -84,6 +84,7 @@ + @@ -103,6 +104,7 @@ + diff --git a/modules/issuetracker/issuetracker.admin.controller.php b/modules/issuetracker/issuetracker.admin.controller.php index 08ca9d6df..b76e025c6 100644 --- a/modules/issuetracker/issuetracker.admin.controller.php +++ b/modules/issuetracker/issuetracker.admin.controller.php @@ -452,6 +452,31 @@ $this->setTemplateFile("top_refresh.html"); } + function procIssuetrackerAdminManageCheckedIssue() { + $module_srl = Context::get('module_srl'); + $cart = Context::get('cart'); + if($cart) $document_srl_list = explode('|@|', $cart); + else $document_srl_list = array(); + + $document_srl_count = count($document_srl_list); + $objs = Context::gets('priority_srl', 'component_srl', 'type_srl', 'milestone_srl'); + $oController = &getController('issuetracker'); + foreach($document_srl_list as $target_srl) + { + $output = $oController->insertHistory($target_srl, $objs, $module_srl, true); + if(!$output->toBool()) + { + return $output; + } + } + + $_SESSION['document_management'] = array(); + + $this->setMessage('success_updated'); + } + + + } ?> diff --git a/modules/issuetracker/issuetracker.admin.view.php b/modules/issuetracker/issuetracker.admin.view.php index db23af495..95a1684bb 100644 --- a/modules/issuetracker/issuetracker.admin.view.php +++ b/modules/issuetracker/issuetracker.admin.view.php @@ -302,5 +302,39 @@ $this->setTemplateFile('issuetracker_delete'); } + function dispIssuetrackerAdminManageDocument() { + // 선택한 목록을 세션에서 가져옴 + $flag_list = $_SESSION['document_management']; + if(count($flag_list)) { + foreach($flag_list as $key => $val) { + if(!is_bool($val)) continue; + $document_srl_list[] = $key; + } + } + + if(count($document_srl_list)) { + $oDocumentModel = &getModel('document'); + $document_list = $oDocumentModel->getDocuments($document_srl_list, $this->grant->is_admin); + Context::set('document_list', $document_list); + } + + $module_srl = $this->module_info->module_srl; + Context::set('module_srl', $module_srl); + + $oIssuetrackerModel = &getModel('issuetracker'); + $project = null; + $project->priorities = $oIssuetrackerModel->getList($module_srl, "Priorities"); + $project->components = $oIssuetrackerModel->getList($module_srl, "Components"); + $project->milestones = $oIssuetrackerModel->getList($module_srl, "Milestones"); + $project->types = $oIssuetrackerModel->getList($module_srl, "Types"); + Context::set('project', $project); + + // 팝업 레이아웃 선택 + $this->setLayoutPath('./common/tpl'); + $this->setLayoutFile('popup_layout'); + + $this->setTemplatePath($this->module_path.'tpl'); + $this->setTemplateFile('checked_list'); + } } ?> diff --git a/modules/issuetracker/issuetracker.class.php b/modules/issuetracker/issuetracker.class.php index 7a364a571..294a336e2 100644 --- a/modules/issuetracker/issuetracker.class.php +++ b/modules/issuetracker/issuetracker.class.php @@ -48,13 +48,31 @@ $oModuleController->insertActionForward('issuetracker', 'controller', 'procIssuetrackerAdminAttachRelease'); + // 아이디 클릭시 나타나는 팝업메뉴에 작성글 보기 기능 추가 + $oModuleController->insertTrigger('member.getMemberMenu', 'issuetracker', 'controller', 'triggerMemberMenu', 'after'); + + $oDB = &DB::getInstance(); $oDB->addIndex("issue_changesets","idx_unique_revision", array("module_srl","revision"), true); } function checkUpdate() { + $oModuleModel = &getModel('module'); + // 아이디 클릭시 나타나는 팝업메뉴에 작성글 보기 기능 추가 + if(!$oModuleModel->getTrigger('member.getMemberMenu', 'issuetracker', 'controller', 'triggerMemberMenu', 'after')) return true; return false; } + + function moduleUpdate() { + $oModuleModel = &getModel('module'); + $oModuleController = &getController('module'); + + // 아이디 클릭시 나타나는 팝업메뉴에 작성글 보기 기능 추가 + if(!$oModuleModel->getTrigger('member.getMemberMenu', 'issuetracker', 'controller', 'triggerMemberMenu', 'after')) + $oModuleController->insertTrigger('member.getMemberMenu', 'issuetracker', 'controller', 'triggerMemberMenu', 'after'); + + return new Object(0, 'success_updated'); + } } ?> diff --git a/modules/issuetracker/issuetracker.controller.php b/modules/issuetracker/issuetracker.controller.php index b8685ada2..cdde83e61 100644 --- a/modules/issuetracker/issuetracker.controller.php +++ b/modules/issuetracker/issuetracker.controller.php @@ -125,19 +125,16 @@ $this->setMessage('success_deleted'); } - function procIssuetrackerInsertHistory() { - // 권한 체크 - if(!$this->grant->ticket_write && !$this->grant->commiter) return new Object(-1, 'msg_not_permitted'); - - // 원 이슈를 가져옴 - $target_srl = Context::get('target_srl'); + function insertHistory($target_srl, $objs, $module_srl, $grant) + { $oIssuetrackerModel = &getModel('issuetracker'); $oIssue = $oIssuetrackerModel->getIssue($target_srl); if(!$oIssue->isExists()) return new Object(-1,'msg_not_founded'); - // 로그인 정보 $logged_info = Context::get('logged_info'); + $args = null; + // 글작성시 필요한 변수를 세팅 $args->target_srl = $target_srl; $args->content = Context::get('content'); @@ -150,18 +147,18 @@ } // 커미터일 경우 각종 상태 변경값을 받아서 이슈의 상태를 변경하고 히스토리 생성 - if($this->grant->commiter) { - $milestone_srl = Context::get('milestone_srl'); - $priority_srl = Context::get('priority_srl'); - $type_srl = Context::get('type_srl'); - $component_srl = Context::get('component_srl'); - $package_srl = Context::get('package_srl'); - $occured_version_srl = Context::get('occured_version_srl'); - $action = Context::get('action'); - $status = Context::get('status'); - $assignee_srl = Context::get('assignee_srl'); + if($grant) { + $milestone_srl = $objs->milestone_srl; + $priority_srl = $objs->priority_srl; + $type_srl = $objs->type_srl; + $component_srl = $objs->component_srl; + $package_srl = $objs->package_srl; + $occured_version_srl = $objs->occured_version_srl; + $action = $objs->action; + $status = $objs->status; + $assignee_srl = $objs->assignee_srl; - $project = $oIssuetrackerModel->getProjectInfo($this->module_srl); + $project = $oIssuetrackerModel->getProjectInfo($module_srl); $history = array(); $change_args = null; @@ -326,7 +323,7 @@ } } $args->issues_history_srl = getNextSequence(); - $args->module_srl = $this->module_srl; + $args->module_srl = $module_srl; $output = executeQueryArray('issuetracker.insertHistory', $args); if(!$output->toBool()) return $output; @@ -335,6 +332,21 @@ $cnt = $oIssuetrackerModel->getHistoryCount($target_srl); $oDocumentController = &getController('document'); $oDocumentController->updateCommentCount($target_srl, $cnt, $logged_info->member_srl); + return new Object(); + } + + function procIssuetrackerInsertHistory() { + // 권한 체크 + if(!$this->grant->ticket_write && !$this->grant->commiter) return new Object(-1, 'msg_not_permitted'); + + // 원 이슈를 가져옴 + $target_srl = Context::get('target_srl'); + $args = Context::gets('milestone_srl', 'priority_srl', 'type_srl', 'component_srl', 'package_srl', 'occured_version_srl', 'action', 'status', 'assignee_srl'); + $output = $this->insertHistory($target_srl, $args, $this->module_srl, $this->grant->commiter); + if(!$output->toBool()) + { + return $output; + } $this->add('document_srl', $target_srl); $this->add('mid', $this->module_info->mid); @@ -414,5 +426,39 @@ } } + /** + * @brief 아이디 클릭시 나타나는 팝업메뉴에 "작성글 보기" 메뉴를 추가하는 trigger - board 모듈과 동일 + **/ + function triggerMemberMenu(&$obj) { + $member_srl = Context::get('target_srl'); + $mid = Context::get('cur_mid'); + + if(!$member_srl || !$mid) return new Object(); + + $logged_info = Context::get('logged_info'); + + // 호출된 모듈의 정보 구함 + $oModuleModel = &getModel('module'); + $cur_module_info = $oModuleModel->getModuleInfoByMid($mid); + + if($cur_module_info->module != 'issuetracker') return new Object(); + + // 자신의 아이디를 클릭한 경우 + if($member_srl == $logged_info->member_srl) { + $member_info = $logged_info; + } else { + $oMemberModel = &getModel('member'); + $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl); + } + + if(!$member_info->user_id) return new Object(); + + // 아이디로 검색기능 추가 + $url = getUrl('','mid',$mid,'act','dispIssuetrackerViewIssue','status[0]','new','status[1]','reviewing','status[2]','assign','status[3]','resolve','status[4]','reopen','status[5]','postponed','status[6]','duplicated','status[7]','invalid','search_target','user_id','search_keyword',$member_info->user_id); + $oMemberController = &getController('member'); + $oMemberController->addMemberPopupMenu($url, 'cmd_view_own_document', './modules/member/tpl/images/icon_view_written.gif'); + + return new Object(); + } } ?> diff --git a/modules/issuetracker/issuetracker.view.php b/modules/issuetracker/issuetracker.view.php index c47725a7f..21e19f67b 100644 --- a/modules/issuetracker/issuetracker.view.php +++ b/modules/issuetracker/issuetracker.view.php @@ -74,12 +74,15 @@ } Context::set('display_option', $display_option); - if(Context::get('document_srl') && !in_array(Context::get('act'),array('dispIssuetrackerNewIssue','dispIssuetrackerDeleteIssue'))) { - $this->act = 'dispIssuetrackerViewIssue'; - Context::set('act','dispIssuetrackerViewIssue'); + if(!Context::get('act')) { + if (!Context::get('document_srl')) { + $this->act = 'dispIssuetrackerViewMilestone'; + Context::set('act','dispIssuetrackerViewMilestone'); + } else { + $this->act = 'dispIssuetrackerViewIssue'; + Context::set('act','dispIssuetrackerViewIssue'); + } } - - if(!Context::get('act')) Context::set('act','dispIssuetrackerViewMilestone'); } function dispIssuetrackerTimeline() { diff --git a/modules/issuetracker/lang/en.lang.php b/modules/issuetracker/lang/en.lang.php index 89bb2f534..bcc53821e 100644 --- a/modules/issuetracker/lang/en.lang.php +++ b/modules/issuetracker/lang/en.lang.php @@ -98,4 +98,5 @@ 'changed' => 'changed', 'created' => 'created' ); + $lang->cmd_manage_issue = 'Manage issues'; ?> diff --git a/modules/issuetracker/lang/es.lang.php b/modules/issuetracker/lang/es.lang.php new file mode 100644 index 000000000..7c5696953 --- /dev/null +++ b/modules/issuetracker/lang/es.lang.php @@ -0,0 +1,103 @@ +issuetracker = 'Duco cuestiones actualización'; + $lang->about_issuetracker = 'Calendario para la gestión de proyectos, el código de acceso, gestión y distribución, para gestionar el problema, el módulo es'; + + $lang->cmd_project_list = 'Lista de proyectos'; + $lang->cmd_view_info = 'Información del Proyecto'; + $lang->cmd_project_setting = 'Configuración del proyecto'; + $lang->cmd_release_setting = 'Configuración de despliegue'; + $lang->cmd_insert_package = 'Añadir paquete'; + $lang->cmd_insert_release = 'Añadir distribución'; + $lang->cmd_attach_file = 'Archivo Adjuntos'; + $lang->cmd_display_item = 'Meta pantalla'; + + $lang->cmd_resolve_as = 'Cambio de estado'; + $lang->cmd_reassign = 'Cambiar Propietario'; + $lang->cmd_accept = 'Aceptar'; + + $lang->svn_url = 'SVN dirección'; + $lang->about_svn_url = 'Versión SVN de la gestión del proyecto de obras, por favor, la dirección'; + $lang->svn_cmd = 'SVN ubicación del archivo ejecutable'; + $lang->about_svn_cmd = 'SVN svn para trabajar con el cliente, por favor, introduzca la ubicación del archivo ejecutable. (ej: / usr / bin / svn)'; + $lang->diff_cmd = 'Ejecute el archivo de ubicación DIFF'; + $lang->about_diff_cmd = 'SVN revisión de la comparación, por favor, introduzca la ubicación del archivo ejecutable de la diferencia. (ej: / usr / bin / diff)'; + $lang->svn_userid = 'SVN autenticación ID'; + $lang->about_svn_userid = 'Introduce el número de autenticación, en caso necesario'; + $lang->svn_passwd = 'SVN contraseña de autenticación'; + $lang->about_svn_passwd = 'Introduzca la contraseña para la autenticación, en caso necesario'; + + $lang->issue = 'Tema'; + $lang->total_issue = 'Todos los números'; + $lang->milestone = $lang->milestone_srl = 'Plan de'; + $lang->priority = $lang->priority_srl = 'Prioridad'; + $lang->type = $lang->type_srl = 'Tipo'; + $lang->component = $lang->component_srl = 'Componentes'; + $lang->assignee = 'Propietario'; + $lang->status = 'Estado'; + $lang->action = 'Comportamiento'; + + $lang->history_format_not_source = ' [objetivo] [clave] Cambiar'; + $lang->history_format = ' [fuente] en el [objetivo] [clave] Cambiar'; + + $lang->project = 'Proyecto'; + + $lang->deadline = 'Completa hasta'; + $lang->name = 'Nombre'; + $lang->complete = 'Completa'; + $lang->completed_date = 'Completado'; + $lang->order = 'Orden'; + $lang->package = $lang->package_srl = 'Paquete'; + $lang->release = $lang->release_srl = 'Distribución'; + $lang->release_note = 'Registro de la distribución'; + $lang->release_changes = 'Cambios'; + $lang->occured_version = $lang->occured_version_srl = 'Planteadas versión'; + $lang->attached_file = 'Adjuntos'; + $lang->filename = 'Nombre del archivo'; + $lang->filesize = 'Tamaño de archivo'; + + $lang->status_list = array( + 'new' => 'Nuevo', + 'reviewing' => 'Geomtojung', + 'assign' => 'Asignación', + 'resolve' => 'Resolver', + 'reopen' => 'Recurrencia', + 'postponed' => 'Pendiente', + 'duplicated' => 'Duplicar', + 'invalid' => 'Problemas o', + ); + + $lang->about_milestone = 'Establecer el plan de desarrollo'; + $lang->about_priority = 'Para establecer las prioridades.'; + $lang->about_type = 'Establece el tipo de problema (por ejemplo, los problemas, las mejoras)'; + $lang->about_component = 'Establece el objetivo de componentes del problema'; + + $lang->project_menus = array( + 'dispIssuetrackerViewMilestone' => 'Plan de desarrollo', + 'dispIssuetrackerViewIssue' => 'Problemas de lectura', + 'dispIssuetrackerNewIssue' => 'Crear problemas', + 'dispIssuetrackerTimeline' => 'Cronología', + 'dispIssuetrackerViewSource' => 'Código de Lectura', + 'dispIssuetrackerDownload' => 'Descargar', + 'dispIssuetrackerAdminProjectSetting' => 'Escenario', + ); + + $lang->msg_not_attched = 'Por favor, adjunte el archivo'; + $lang->msg_attached = 'El archivo se ha registrado'; + $lang->msg_no_releases = 'Distribuciones no son registrados'; + + $lang->cmd_document_do = 'Este problema ..'; + $lang->not_assigned = 'No asignado'; + $lang->not_assigned_description = 'No es asignado una lista de cuestiones.'; + $lang->timeline_msg = array( + 'changed' => 'Cambiar', + 'created' => 'Creación' + ); + + $lang->cmd_manage_issue = 'Cuestiones de gestión'; +?> diff --git a/modules/issuetracker/lang/jp.lang.php b/modules/issuetracker/lang/jp.lang.php index 72b570827..ffbb56a72 100644 --- a/modules/issuetracker/lang/jp.lang.php +++ b/modules/issuetracker/lang/jp.lang.php @@ -98,4 +98,5 @@ 'changed' => '変更', 'created' => '作成' ); + $lang->cmd_manage_issue = 'Manage issues'; ?> diff --git a/modules/issuetracker/lang/ko.lang.php b/modules/issuetracker/lang/ko.lang.php index fbb2ce06f..bd6d3f3b5 100644 --- a/modules/issuetracker/lang/ko.lang.php +++ b/modules/issuetracker/lang/ko.lang.php @@ -98,4 +98,6 @@ 'changed' => '변경', 'created' => '생성' ); + + $lang->cmd_manage_issue = '이슈 관리'; ?> diff --git a/modules/issuetracker/lang/zh-CN.lang.php b/modules/issuetracker/lang/zh-CN.lang.php index 717a04459..4de55aae3 100644 --- a/modules/issuetracker/lang/zh-CN.lang.php +++ b/modules/issuetracker/lang/zh-CN.lang.php @@ -81,6 +81,7 @@ 'dispIssuetrackerViewIssue' => '查看问题', 'dispIssuetrackerNewIssue' => '提交问题', 'dispIssuetrackerViewMilestone' => '开发计划', + 'dispIssuetrackerTimeline' => 'Timeline', 'dispIssuetrackerViewSource' => '查看代码', 'dispIssuetrackerDownload' => '下载', 'dispIssuetrackerAdminProjectSetting' => '设置', @@ -93,4 +94,9 @@ $lang->cmd_document_do = '将吧此问题.. '; $lang->not_assigned = '没有分配'; $lang->not_assigned_description = '没被分配的问题目录'; + $lang->timeline_msg = array( + 'changed' => 'changed', + 'created' => 'created' + ); + $lang->cmd_manage_issue = 'Manage issues'; ?> diff --git a/modules/issuetracker/lang/zh-TW.lang.php b/modules/issuetracker/lang/zh-TW.lang.php index 0384bcfe8..2a412dad9 100644 --- a/modules/issuetracker/lang/zh-TW.lang.php +++ b/modules/issuetracker/lang/zh-TW.lang.php @@ -94,4 +94,9 @@ $lang->cmd_document_do = '將此問題.. '; $lang->not_assigned = '尚未分配'; $lang->not_assigned_description = '尚未被分配的問題清單'; + $lang->timeline_msg = array( + 'changed' => 'changed', + 'created' => 'created' + ); + $lang->cmd_manage_issue = 'Manage issues'; ?> diff --git a/modules/issuetracker/skins/xe_issuetracker/issue_list.html b/modules/issuetracker/skins/xe_issuetracker/issue_list.html index 1563d76d2..f9ab49372 100644 --- a/modules/issuetracker/skins/xe_issuetracker/issue_list.html +++ b/modules/issuetracker/skins/xe_issuetracker/issue_list.html @@ -178,6 +178,7 @@ diff --git a/modules/issuetracker/skins/xe_issuetracker/newissue.html b/modules/issuetracker/skins/xe_issuetracker/newissue.html index e64453482..895263984 100644 --- a/modules/issuetracker/skins/xe_issuetracker/newissue.html +++ b/modules/issuetracker/skins/xe_issuetracker/newissue.html @@ -144,16 +144,22 @@
{$oIssue->getEditor()}
- - -
-
+
+ +
+ +
+ +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + +
+ + {$lang->cmd_select} +
    + +
  • {$document->getNickName()}
    {$document->getTitle()}
  • + +
+ +   + +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
diff --git a/modules/issuetracker/tpl/css/issuetracker.css b/modules/issuetracker/tpl/css/issuetracker.css index d96336217..d9f155ead 100644 --- a/modules/issuetracker/tpl/css/issuetracker.css +++ b/modules/issuetracker/tpl/css/issuetracker.css @@ -22,3 +22,12 @@ img.btnDelete { vertical-align:middle; } td.filename { background-color:#EFEFEF; } td.filename a { font-weight:bold;} + +ul.document_list_box { margin:0; padding:0; list-style:none; } +.document_list_box { height:230px; overflow-y:scroll; overflow-x:hidden;} +.document_list { margin-top:.5em; overflow:hidden; white-space:nowrap; clear:both;} +.document_list input { float:left; margin-right:10px; } +.document_list address { float:left; width:100px; margin-right:10px; overflow:hidden; white-space:nowrap;} +.document_list .document_title { } + +#popbody .adminTable tr th { width: 200px; } diff --git a/modules/issuetracker/tpl/filter/manage_checked_issue.xml b/modules/issuetracker/tpl/filter/manage_checked_issue.xml new file mode 100644 index 000000000..c8202d3a4 --- /dev/null +++ b/modules/issuetracker/tpl/filter/manage_checked_issue.xml @@ -0,0 +1,7 @@ + +
+ + + + + diff --git a/modules/issuetracker/tpl/js/issue_admin.js b/modules/issuetracker/tpl/js/issue_admin.js index 423a72758..3b82018b3 100644 --- a/modules/issuetracker/tpl/js/issue_admin.js +++ b/modules/issuetracker/tpl/js/issue_admin.js @@ -4,6 +4,18 @@ * @brief 관리자용 javascript **/ +function doManageIssue() { + var fo_obj = jQuery("#fo_management").get(0); + + procFilter(fo_obj, manage_checked_issue); +} + +function completeManageIssue(ret_obj) { + if(opener) opener.window.location.reload(); + alert(ret_obj['message']); + window.close(); +} + /* 모듈 생성 후 */ function completeInsertProject(ret_obj) { var error = ret_obj['error']; diff --git a/modules/member/member.model.php b/modules/member/member.model.php index 75e5a63c5..8e691295b 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -203,7 +203,7 @@ } /** - * @brief userid에 해당하는 member_srl을 구함 + * @brief EmailAddress에 해당하는 member_srl을 구함 **/ function getMemberSrlByEmailAddress($email_address) { $args->email_address = $email_address; @@ -212,7 +212,7 @@ } /** - * @brief userid에 해당하는 member_srl을 구함 + * @brief NickName에 해당하는 member_srl을 구함 **/ function getMemberSrlByNickName($nick_name) { $args->nick_name = $nick_name; diff --git a/modules/module/conf/module.xml b/modules/module/conf/module.xml index 51479dbfe..03561a901 100644 --- a/modules/module/conf/module.xml +++ b/modules/module/conf/module.xml @@ -8,6 +8,8 @@ + + diff --git a/modules/widget/widget.admin.model.php b/modules/module/module.admin.model.php similarity index 84% rename from modules/widget/widget.admin.model.php rename to modules/module/module.admin.model.php index 1a2635940..3f80d3e99 100644 --- a/modules/widget/widget.admin.model.php +++ b/modules/module/module.admin.model.php @@ -1,12 +1,12 @@ module_srls = Context::get('module_srls'); $output = executeQueryArray('module.getModulesInfo', $args); if(!$output->toBool() || !$output->data) return new Object(); diff --git a/modules/module/tpl/js/module_admin.js b/modules/module/tpl/js/module_admin.js index 3caa8bb56..d6731da6c 100644 --- a/modules/module/tpl/js/module_admin.js +++ b/modules/module/tpl/js/module_admin.js @@ -61,11 +61,12 @@ function completeCopyModule() { function insertModule(id, module_srl, mid, browser_title, multi_select) { if(typeof(multi_select)=='undefined') multi_select = true; if(!window.opener) window.close(); - if(typeof(opener.insertSelectedModule)=='undefined') return; if(multi_select) { + if(typeof(opener.insertSelectedModules)=='undefined') return; opener.insertSelectedModules(id, module_srl, mid, browser_title); } else { + if(typeof(opener.insertSelectedModule)=='undefined') return; opener.insertSelectedModule(id, module_srl, mid, browser_title); window.close(); } diff --git a/modules/module/tpl/module_selector.html b/modules/module/tpl/module_selector.html index 604867deb..8f5e459fd 100644 --- a/modules/module/tpl/module_selector.html +++ b/modules/module/tpl/module_selector.html @@ -52,7 +52,7 @@ {$k} {$v->browser_title} - {$type=='single'?$lang->cmd_select:$lang->cmd_insert} + browser_title)}',{$type=='single'?'false':'true'}); return false;" class="button green">{$type=='single'?$lang->cmd_select:$lang->cmd_insert} {@ $_idx ++; } @@ -64,7 +64,7 @@ {$k} {$v->browser_title} - {$type=='single'?$lang->cmd_select:$lang->cmd_insert} + browser_title)}',{$type=='single'?'false':'true'}); return false;" class="button green">{$type=='single'?$lang->cmd_select:$lang->cmd_insert} diff --git a/modules/opage/opage.controller.php b/modules/opage/opage.controller.php index 177b663fb..b6599c748 100644 --- a/modules/opage/opage.controller.php +++ b/modules/opage/opage.controller.php @@ -71,11 +71,11 @@ if(substr($path,-1)!='/') $path.='/'; $this->target_path = $path; - // element의 속성중 value에 " 로 안 묶여 있는 것을 검사하여 묶어줌 - $content = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', fixQuotation, $content); + // element의 속성중 value에 " 로 안 묶여 있는 것을 검사하여 묶어줌 - 에러날 수 있음 ex) window.open('*','*','width=320, height=240 ,left=100,top=100') + //$content = preg_replace_callback('/([^=^"^ ]*)=([^ ^>]*)/i', fixQuotation, $content); // img, input, a, link등의 href, src값 변경 - $content = preg_replace_callback('!(script|link|a|img|input)([^>]*)(href|src)=[\'"](.*?)[\'"]!is', array($this, '_replaceSrc'), $content); + $content = preg_replace_callback('!<(script|link|a|img|input|iframe)([^>]*)(href|src)=[\'"](.*?)[\'"]!is', array($this, '_replaceSrc'), $content); // background:url의 값 변경 $content = preg_replace_callback('!url\((.*?)\)!is', array($this, '_replaceBackgroundUrl'), $content); @@ -90,7 +90,7 @@ if(substr($href,0,1)=='/') $href = substr($href,1); $href = $this->target_path.$href; - $buff = sprintf('%s%s%s="%s"', $matches[1], $matches[2], $matches[3], $href); + $buff = sprintf('<%s%s%s="%s"', $matches[1], $matches[2], $matches[3], $href); return $buff; } diff --git a/modules/opage/opage.view.php b/modules/opage/opage.view.php index 72114bcaa..2addbd7bc 100644 --- a/modules/opage/opage.view.php +++ b/modules/opage/opage.view.php @@ -35,7 +35,7 @@ $cache_file = sprintf("./files/cache/opage/%d.cache.php", $module_info->module_srl); // http 인지 내부 파일인지 점검 - if(preg_match("/^http:\/\//i",$path)) $content = $this->getHtmlPage($path, $caching_interval, $cache_file); + if(preg_match("/^([a-z]+):\/\//i",$path)) $content = $this->getHtmlPage($path, $caching_interval, $cache_file); else $content = $this->executeFile($path, $caching_interval, $cache_file); Context::set('opage_content', $content); diff --git a/modules/planet/planet.controller.php b/modules/planet/planet.controller.php index 22715aa5d..0de007c8a 100644 --- a/modules/planet/planet.controller.php +++ b/modules/planet/planet.controller.php @@ -126,7 +126,8 @@ $obj->content = str_replace(array('<','>'),array('<','>'),$obj->content); $obj->content = str_replace('...', '…', $obj->content); $obj->content = str_replace('--', '—', $obj->content); - $obj->content = preg_replace('/"([^"]*)":(http|ftp|https|mms)([^ ]+)/is','$1$4', $obj->content); + $obj->content = preg_replace('/"([^"]+)":([0-9]+)/i', '$1', $obj->content); + $obj->content = preg_replace('/"([^"]+)":(http|ftp|https|mms)([^ ]+)/is','$1$4', $obj->content); $oDocumentController = &getController('document'); $output = $oDocumentController->insertDocument($obj,$manual_inserted); if(!$output->toBool()) return $output; diff --git a/modules/planet/skins/xe_planet/content_list.html b/modules/planet/skins/xe_planet/content_list.html index 03e3aec1f..4f0f2b231 100644 --- a/modules/planet/skins/xe_planet/content_list.html +++ b/modules/planet/skins/xe_planet/content_list.html @@ -29,7 +29,7 @@
{@ $regdate = $item->get('regdate') } -

{getTimeGap($item->get('regdate'), sprintf('y/m/d a H%s i%s', $lang->unit_hour,$lang->unit_min))}

+

{getTimeGap($item->get('regdate'), sprintf('y/m/d a H%s i%s', $lang->unit_hour,$lang->unit_min))}

TAG
@@ -104,6 +104,11 @@ diff --git a/modules/planet/skins/xe_planet/css/default.css b/modules/planet/skins/xe_planet/css/default.css index ce2f5ce7b..7443c53e7 100644 --- a/modules/planet/skins/xe_planet/css/default.css +++ b/modules/planet/skins/xe_planet/css/default.css @@ -250,6 +250,7 @@ button span{ position:absolute; width:0; height:0; font:0/0 Sans-serif; visibili .commentBody .comment .tongue .postExtra *{ margin:0; padding:0;} .commentBody .comment .tongue .postExtra .tag { float:left;} .commentBody .comment .tongue .postExtra .tag .time{ display:inline; margin-right:5px; color:#999; font:11px AppleGothic, Dotum, Gulim, Sans-serif;} +.commentBody .comment .tongue .postExtra .tag .time a{color:#999;} .commentBody .comment .tongue .postExtra .tag dl{ display:inline;} .commentBody .comment .tongue .postExtra .tag dt{ text-align:center; padding:0 7px; margin-right:5px; display:inline; background:url(../images/bgTag.gif) no-repeat center; font:bold 11px Tahoma; color:#fff;} .commentBody .comment .tongue .postExtra .tag dd{ display:inline; position:relative;} diff --git a/modules/planet/skins/xe_planet/header.html b/modules/planet/skins/xe_planet/header.html index ff6892ec3..610e29b8c 100644 --- a/modules/planet/skins/xe_planet/header.html +++ b/modules/planet/skins/xe_planet/header.html @@ -32,7 +32,7 @@
- + < @@ -41,7 +41,7 @@ {zdate($date,'d')}{$lang->unit_day} ({zdate($date,'l')}) - + > diff --git a/modules/planet/skins/xe_planet/js/planet.js b/modules/planet/skins/xe_planet/js/planet.js index a0b3f05d1..52ff5d5da 100644 --- a/modules/planet/skins/xe_planet/js/planet.js +++ b/modules/planet/skins/xe_planet/js/planet.js @@ -178,7 +178,9 @@ function planetPreview(obj) { text = text.replace(/>/ig,'>'); text = text.replace(/\.\.\./g, '…'); text = text.replace(/--/g, '—'); - $('preview_text').innerHTML = text.replace(/"([^"]*)":(mms|http|ftp|https)([^ ]+)/ig,'$1'); + text = text.replace(/"([^"]*)":([0-9]+)/ig,'$1'); + text = text.replace(/"([^"]*)":(mms|http|ftp|https)([^ ]+)/ig,'$1'); + $('preview_text').innerHTML = text; }else{ $Element('preview').addClass('off'); $('preview_text').innerHTML = ''; diff --git a/modules/planet/skins/xe_planet/myPlanet.html b/modules/planet/skins/xe_planet/myPlanet.html index 1e739bc50..bd94ff43b 100644 --- a/modules/planet/skins/xe_planet/myPlanet.html +++ b/modules/planet/skins/xe_planet/myPlanet.html @@ -7,11 +7,11 @@ diff --git a/modules/rss/rss.class.php b/modules/rss/rss.class.php index 26a01e346..a9d80267a 100644 --- a/modules/rss/rss.class.php +++ b/modules/rss/rss.class.php @@ -15,6 +15,7 @@ $oModuleController = &getController('module'); $oModuleController->insertActionForward('rss', 'view', 'rss'); + $oModuleController->insertActionForward('rss', 'view', 'atom'); // 2007. 10. 18 서비스형 모듈의 추가 설정에 참여하기 위한 trigger 추가 $oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before'); @@ -31,6 +32,9 @@ function checkUpdate() { $oModuleModel = &getModel('module'); + // atom 을 위한 Action forward 추가 + if(!$oModuleModel->getActionForward('atom')) return true; + // 2007. 10. 18 서비스형 모듈의 추가 설정에 참여하기 위한 trigger 추가 if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before')) return true; @@ -47,6 +51,10 @@ $oModuleModel = &getModel('module'); $oModuleController = &getController('module'); + // atom act 추가 + if(!$oModuleModel->getActionForward('atom')) + $oModuleController->insertActionForward('rss', 'view', 'atom'); + // 2007. 10. 18 서비스형 모듈의 추가 설정에 참여하기 위한 trigger 추가 if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before')) $oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before'); diff --git a/modules/rss/rss.controller.php b/modules/rss/rss.controller.php index 225f674fc..5d27bafd7 100644 --- a/modules/rss/rss.controller.php +++ b/modules/rss/rss.controller.php @@ -34,6 +34,7 @@ $rss_config = $oRssModel->getRssModuleConfig($current_module_srl); if($rss_config->open_rss != 'N') Context::set('rss_url', getUrl('','mid',Context::get('mid'),'act','rss')); + if($rss_config->open_rss != 'N') Context::set('atom_url', getUrl('','mid',Context::get('mid'),'act','atom')); return new Object(); } diff --git a/modules/rss/rss.view.php b/modules/rss/rss.view.php index 3de26acf9..c7f99e5d5 100644 --- a/modules/rss/rss.view.php +++ b/modules/rss/rss.view.php @@ -1,158 +1,197 @@ -module_info->module_srl; - $config = $oModuleModel->getModulePartConfig('rss', $module_srl); - if($config->open_rss && $config->open_rss != 'N') { - $module_srls[] = $module_srl; - $rss_config[$module_srl] = $config->open_rss; - } - - // mid 가 선택되어 있지 않으면 전체 - } else { - $rss_config = $oModuleModel->getModulePartConfigs('rss'); - if($rss_config) { - foreach($rss_config as $module_srl => $config) { - if($config && $config->open_rss != 'N') { - $module_srls[] = $module_srl; - $rss_config[$module_srl] = $config->open_rss; - } - } - } - } - - if(!count($module_srls)) return $this->dispError(); - - $args->module_srl = implode(',',$module_srls); - $module_list = $oModuleModel->getMidList($args); - - $args->search_target = 'is_secret'; - $args->search_keyword = 'N'; - $args->page = 1; - $args->list_count = 15; - if($start_date) $args->start_date = $start_date; - if($end_date) $args->end_date = $end_date; - - $args->sort_index = 'list_order'; - $args->order_type = 'asc'; - - // 대상 문서들을 가져옴 - $oDocumentModel = &getModel('document'); - $output = $oDocumentModel->getDocumentList($args); - $document_list = $output->data; - - // rss 제목 및 정보등을 추출 - if($mid) { - $info->title = Context::getBrowserTitle(); - $info->description = $this->module_info->description; - $info->link = getUrl('','mid',Context::get('mid')); - } else { - $info->title = $info->link = Context::getRequestUri(); - } - $info->total_count = $output->total_count; - $info->total_page = $output->total_page; - $info->date = date("D, d M Y H:i:s").' '.$GLOBALS['_time_zone']; - $info->language = Context::getLangType(); - - // RSS 출력물에서 사용될 변수 세팅 - Context::set('info', $info); - Context::set('rss_config', $rss_config); - Context::set('document_list', $document_list); - - // 결과 출력을 XMLRPC로 강제 지정 - Context::setResponseMethod("XMLRPC"); - - // 결과물을 얻어와서 에디터 컴포넌트등의 전처리 기능을 수행시킴 - $path = $this->module_path.'tpl/'; - if($args->start_date || $args->end_date) $file = 'xe_rss'; - else $file = 'rss20'; - - $oTemplate = new TemplateHandler(); - $oContext = &Context::getInstance(); - - $content = $oTemplate->compile($path, $file); - $content = $oContext->transContent($content); - Context::set('content', $content); - - // 템플릿 파일 지정 - $this->setTemplatePath($path); - $this->setTemplateFile('display'); - } - - /** - * @brief 에러 출력 - **/ - function dispError() { - - // 결과 출력을 XMLRPC로 강제 지정 - Context::setResponseMethod("XMLRPC"); - - // 출력 메세지 작성 - Context::set('error', -1); - Context::set('message', Context::getLang('msg_rss_is_disabled') ); - - // 템플릿 파일 지정 - $this->setTemplatePath($this->module_path.'tpl'); - $this->setTemplateFile("error"); - } - - /** - * @brief 서비스형 모듈의 추가 설정을 위한 부분 - * rss의 사용 형태에 대한 설정만 받음 - **/ - function triggerDispRssAdditionSetup(&$obj) { - $current_module_srl = Context::get('module_srl'); - $current_module_srls = Context::get('module_srls'); - - if(!$current_module_srl && !$current_module_srls) { - // 선택된 모듈의 정보를 가져옴 - $current_module_info = Context::get('current_module_info'); - $current_module_srl = $current_module_info->module_srl; - if(!$current_module_srl) return new Object(); - } - - // 선택된 모듈의 rss설정을 가져옴 - $oRssModel = &getModel('rss'); - $rss_config = $oRssModel->getRssModuleConfig($current_module_srl); - Context::set('rss_config', $rss_config); - - // 템플릿 파일 지정 - $oTemplate = &TemplateHandler::getInstance(); - $tpl = $oTemplate->compile($this->module_path.'tpl', 'rss_module_config'); - $obj .= $tpl; - - return new Object(); - } - } -?> +module_info->module_srl; + $config = $oModuleModel->getModulePartConfig('rss', $module_srl); + if($config->open_rss && $config->open_rss != 'N') { + $module_srls[] = $module_srl; + $rss_config[$module_srl] = $config->open_rss; + } + + // mid 가 선택되어 있지 않으면 전체 + } else { + $rss_config = $oModuleModel->getModulePartConfigs('rss'); + if($rss_config) { + foreach($rss_config as $module_srl => $config) { + if($config && $config->open_rss != 'N') { + $module_srls[] = $module_srl; + $rss_config[$module_srl] = $config->open_rss; + } + } + } + } + + if(!count($module_srls)) return $this->dispError(); + + $args->module_srl = implode(',',$module_srls); + $module_list = $oModuleModel->getMidList($args); + + $args->search_target = 'is_secret'; + $args->search_keyword = 'N'; + $args->page = (int)Context::get('page'); + $args->list_count = 15; + if(!$args->page || $args->page < 1) $args->page = 1; + if($start_date || $start_date != 0) $args->start_date = $start_date; + if($end_date || $end_date != 0) $args->end_date = $end_date; + if($start_date == 0) unset($start_date); + if($end_date == 0) unset($end_date); + + $args->sort_index = 'list_order'; + $args->order_type = 'asc'; + + // 대상 문서들을 가져옴 + $oDocumentModel = &getModel('document'); + $output = $oDocumentModel->getDocumentList($args); + $document_list = $output->data; + + // rss 제목 및 정보등을 추출 Context::getBrowserTitle + if($mid) { + $info->title = Context::getBrowserTitle(); + $info->title = str_replace('\'', ''',$info->title); + $info->description = $this->module_info->description; + $info->link = getUrl('','mid',$mid); + } else { + $site_module_info = Context::get('site_module_info'); + $info->title = $site_module_info->browser_title; + $info->title = str_replace('\'', ''', htmlspecialchars($info->title)); + $info->link = Context::getRequestUri(); + } + $info->total_count = $output->total_count; + $info->total_page = $output->total_page; + switch (Context::get('format')) { + case 'atom': + $info->date = date('Y-m-d\TH:i:sP'); + if($mid) { $info->id = getUrl('','mid',$mid,'act','atom','page',Context::get('page'),'start_date',Context::get('start_date'),'end_date',Context::get('end_date')); } + else { $info->id = getUrl('','module','rss','act','atom','page',Context::get('page'),'start_date',Context::get('start_date'),'end_date',Context::get('end_date')); } + break; + case 'rss1.0': + $info->date = date('Y-m-d\TH:i:sP'); + break; + default: + $info->date = date("D, d M Y H:i:s").' '.$GLOBALS['_time_zone']; + break; + } + $info->language = Context::getLangType(); + + // RSS 출력물에서 사용될 변수 세팅 + Context::set('info', $info); + Context::set('rss_config', $rss_config); + Context::set('document_list', $document_list); + + // 결과 출력을 XMLRPC로 강제 지정 + Context::setResponseMethod("XMLRPC"); + + // 결과물을 얻어와서 에디터 컴포넌트등의 전처리 기능을 수행시킴 + $path = $this->module_path.'tpl/'; + //if($args->start_date || $args->end_date) $file = 'xe_rss'; + //else $file = 'rss20'; + switch (Context::get('format')) { + case 'xe': + $file = 'xe_rss'; + break; + case 'atom': + $file = 'atom10'; + break; + case 'rss1.0': + $file = 'rss10'; + break; + default: + $file = 'rss20'; + break; + } + + $oTemplate = new TemplateHandler(); + + $content = $oTemplate->compile($path, $file); + Context::set('content', $content); + + // 템플릿 파일 지정 + $this->setTemplatePath($path); + $this->setTemplateFile('display'); + } + + /** @brief ATOM 출력 **/ + function atom() { + Context::set('format', 'atom'); + $this->rss(); + } + + /** + * @brief 에러 출력 + **/ + function dispError() { + + // 결과 출력을 XMLRPC로 강제 지정 + Context::setResponseMethod("XMLRPC"); + + // 출력 메세지 작성 + Context::set('error', -1); + Context::set('message', Context::getLang('msg_rss_is_disabled') ); + + // 템플릿 파일 지정 + $this->setTemplatePath($this->module_path.'tpl'); + $this->setTemplateFile("error"); + } + + /** + * @brief 서비스형 모듈의 추가 설정을 위한 부분 + * rss의 사용 형태에 대한 설정만 받음 + **/ + function triggerDispRssAdditionSetup(&$obj) { + $current_module_srl = Context::get('module_srl'); + $current_module_srls = Context::get('module_srls'); + + if(!$current_module_srl && !$current_module_srls) { + // 선택된 모듈의 정보를 가져옴 + $current_module_info = Context::get('current_module_info'); + $current_module_srl = $current_module_info->module_srl; + if(!$current_module_srl) return new Object(); + } + + // 선택된 모듈의 rss설정을 가져옴 + $oRssModel = &getModel('rss'); + $rss_config = $oRssModel->getRssModuleConfig($current_module_srl); + Context::set('rss_config', $rss_config); + + // 템플릿 파일 지정 + $oTemplate = &TemplateHandler::getInstance(); + $tpl = $oTemplate->compile($this->module_path.'tpl', 'rss_module_config'); + $obj .= $tpl; + + return new Object(); + } + } +?> diff --git a/modules/rss/tpl/atom10.html b/modules/rss/tpl/atom10.html new file mode 100644 index 000000000..99f4d149e --- /dev/null +++ b/modules/rss/tpl/atom10.html @@ -0,0 +1,35 @@ +{''} + + + {$info->title} + + {str_replace('\'', ''', htmlspecialchars($info->description))} + + {$info->date} + {$info->id} + + + XpressEngine + + {str_replace('\'', ''',$oDocument->getTitle())} + {$oDocument->getPermanentUrl()} + {$oDocument->getRegdate('Y-m-d\TH:i:sP')} + {zdate($oDocument->get('last_update'),'Y-m-d\TH:i:sP')} + + + {str_replace('\'', ''',$oDocument->getNickName())} + + {$oDocument->getHomepageUrl()} + + + + {str_replace('\'', ''', htmlspecialchars(Context::getInstance()->transContent($oDocument->getContent(false,false,true))))} + + {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))} + + + + + + + diff --git a/modules/rss/tpl/rss10.html b/modules/rss/tpl/rss10.html index d4cc8bf5f..66c8b2c97 100644 --- a/modules/rss/tpl/rss10.html +++ b/modules/rss/tpl/rss10.html @@ -1,27 +1,26 @@ {''} - - - <![CDATA[{$info->title}]]> - link}]]> - description}]]> + + + {$info->title} + {$info->link} + {str_replace('\'', ''', htmlspecialchars($info->description))} - - + + {$info->date} {$info->language} - {$info->total_count} - - - - <![CDATA[{$item->title}]]> - link}]]> - description}]]> - {$item->date} + + + + {str_replace('\'', ''',$oDocument->getTitle())} + {$oDocument->getPermanentUrl()} + {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(200)))} + {$oDocument->getRegdate('Y-m-d\TH:i:sP')} diff --git a/modules/rss/tpl/rss20.html b/modules/rss/tpl/rss20.html index c8c545aa1..85926d9f5 100644 --- a/modules/rss/tpl/rss20.html +++ b/modules/rss/tpl/rss20.html @@ -1,26 +1,33 @@ {''} - + - <![CDATA[{$info->title}]]> - link}]]> - description}]]> + {$info->title} + {$info->link} + {str_replace('\'', ''', htmlspecialchars($info->description))} {$info->language} {$info->date} - {$info->total_count} + XpressEngine {__ZBXE_VERSION__} - <![CDATA[{$oDocument->getTitleText()}]]> - getNickName()}]]> - getPermanentUrl()}]]> + {str_replace('\'', ''',$oDocument->getTitle())} + {str_replace('\'', ''',$oDocument->getNickName())} + {$oDocument->getPermanentUrl()} + {$oDocument->getPermanentUrl()} + + {$oDocument->getPermanentUrl()}#comment + - getContent(false,false,true)}]]> + {str_replace('\'', ''', htmlspecialchars(Context::getInstance()->transContent($oDocument->getContent(false,false,true))))} - getContentText(100)}]]> + {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))} {$oDocument->getRegdateGM()} - + {str_replace('\'', ''', htmlspecialchars($tag))} + + + {$oDocument->getCommentcount()} diff --git a/modules/rss/tpl/xe_rss.html b/modules/rss/tpl/xe_rss.html index 0671ec817..6de4abeae 100644 --- a/modules/rss/tpl/xe_rss.html +++ b/modules/rss/tpl/xe_rss.html @@ -2,24 +2,24 @@ - <![CDATA[{$info->title}]]> - link}]]> - description}]]> + {$info->title} + {$info->link} + {str_replace('\'', ''', htmlspecialchars($info->description))} {$info->language} {$info->date} {$info->total_count} {$info->total_page} - <![CDATA[{$oDocument->getTitleText()}]]> - getNickName()}]]> - getPermanentUrl()}]]> + {str_replace('\'', ''',$oDocument->getTitle())} + {str_replace('\'', ''',$oDocument->getNickName())} + {$oDocument->getPermanentUrl()} - getContent(false)}]]> + {str_replace('\'', ''', htmlspecialchars($oDocument->getContent(false)))} - getContentText(100)}]]> + {str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))} - get('tags')}]]> + {str_replace('\'', ''', htmlspecialchars($oDocument->get('tags')))} {$oDocument->getCommentCount()} {$oDocument->getTrackbackCount()} {$oDocument->getRegdateGM()} diff --git a/modules/spamfilter/spamfilter.controller.php b/modules/spamfilter/spamfilter.controller.php index 2cbe50f7f..30a779ae6 100644 --- a/modules/spamfilter/spamfilter.controller.php +++ b/modules/spamfilter/spamfilter.controller.php @@ -155,6 +155,7 @@ **/ function insertIP($ipaddress) { $args->ipaddress = $ipaddress; + return executeQuery('spamfilter.insertDeniedIP', $args); } diff --git a/modules/widget/conf/module.xml b/modules/widget/conf/module.xml index 7c23c8497..c19c308aa 100644 --- a/modules/widget/conf/module.xml +++ b/modules/widget/conf/module.xml @@ -8,8 +8,6 @@ - - diff --git a/modules/widget/tpl/css/widget.css b/modules/widget/tpl/css/widget.css index 2e1cc6c2b..130537c33 100644 --- a/modules/widget/tpl/css/widget.css +++ b/modules/widget/tpl/css/widget.css @@ -55,4 +55,3 @@ div.editor { width:700px; } ul.midCommand { float:left; margin:0 0 0 10px;; padding:0; *zoom:1; } ul.midCommand li { display:block; margin-bottom:5px; list-style:none;} -#popBody { *zoom:1; position:relative;} diff --git a/modules/widget/tpl/js/widget.js b/modules/widget/tpl/js/widget.js index ca42e4092..f63bf2a67 100644 --- a/modules/widget/tpl/js/widget.js +++ b/modules/widget/tpl/js/widget.js @@ -88,7 +88,7 @@ function removeAllWidget() { exec_xml('widget',"procWidgetRemoveContents",params,function() { restoreWidgetButtons(); xInnerHtml(zonePageObj,'') }); } -/** +/** * 특정 영역에 편집된 위젯들을 약속된 태그로 변환하여 return **/ function getWidgetContent(obj) { @@ -266,6 +266,8 @@ function doAddWidget(fo) { popopen(url,'GenerateWidgetCode'); } + + // widgetBorder에 height를 widgetOutput와 맞춰줌 function doFitBorderSize() { var obj_list = xGetElementsByClassName('widgetBorder', zonePageObj); @@ -325,7 +327,7 @@ function doAddWidgetCode(widget_code) { // 클릭 이벤트시 위젯의 수정/제거/이벤트 무효화 처리 function doCheckWidget(e) { var evt = new xEvent(e); if(!evt.target) return; - var obj = evt.target; + var obj = evt.target; selectedWidget = null; @@ -459,7 +461,7 @@ function completeDeleteWidgetContent(ret_obj, response_tags, params, p_obj) { // 마우스 다운 이벤트 발생시 위젯의 이동을 처리 function doCheckWidgetDrag(e) { var evt = new xEvent(e); if(!evt.target) return; - var obj = evt.target; + var obj = evt.target; var pObj = obj.parentNode; while(pObj) { @@ -588,7 +590,7 @@ function _getBorderStyle(fld_color, fld_thick, fld_type) { else color = '#'+color; var width = fld_thick.value; if(!width) width = '0px'; - else width = parseInt(width,10)+'px'; + else width = parseInt(width,10)+'px'; var style = fld_type.options[fld_type.selectedIndex].value; if(!style) style = 'solid'; @@ -706,7 +708,7 @@ function doApplyWidgetSize(fo_obj) { selectedSizeWidget = null; doFitBorderSize(); } - + doHideWidgetSizeSetup(); } @@ -821,7 +823,7 @@ function widgetGetTmpObject(obj) { return tmpObj; } -// 메뉴에 마우스 클릭이 일어난 시점에 드래그를 위한 제일 첫 동작 (해당 object에 각종 함수나 상태변수 설정) +// 메뉴에 마우스 클릭이 일어난 시점에 드래그를 위한 제일 첫 동작 (해당 object에 각종 함수나 상태변수 설정) function widgetDragEnable(obj, funcDragStart, funcDrag, funcDragEnd) { // 상위 object에 드래그 가능하다는 상태와 각 드래그 관련 함수를 설정 @@ -834,11 +836,11 @@ function widgetDragEnable(obj, funcDragStart, funcDrag, funcDragEnd) { if (!widgetDragManager.isDrag) { widgetDragManager.isDrag = true; xAddEventListener(document, 'mousemove', widgetDragMouseMove, false); - } -} + } +} // 드래그를 시작할때 호출되는 함수 (이동되는 형태를 보여주기 위한 작업을 함) -function widgetDragStart(tobj, px, py) { +function widgetDragStart(tobj, px, py) { if(tobj.className == 'widgetResize' || tobj.className == 'widgetResizeLeft' || tobj.className == 'widgetBoxResize' || tobj.className == 'widgetBoxResizeLeft') return; var obj = widgetGetTmpObject(tobj); @@ -986,7 +988,7 @@ function widgetDrag(tobj, dx, dy) { // 이동을 멈춤 widgetManualEnd(); - + doFitBorderSize(); boxList = null; return; @@ -1030,8 +1032,8 @@ function widgetDrag(tobj, dx, dy) { widgetList = null; } } -} - +} + // 드래그 종료 (이동되는 object가 이동할 곳에 서서히 이동되는 것처럼 보이는 효과) function widgetDragEnd(tobj, px, py) { var obj = widgetGetTmpObject(tobj); @@ -1092,7 +1094,7 @@ function widgetMouseDown(e) { } // 마우스 버튼을 놓았을때 동작될 함수 (각종 이벤트 해제 및 변수 설정 초기화) -function widgetMouseUp(e) { +function widgetMouseUp(e) { if (widgetDragManager.obj) { xPreventDefault(e); xRemoveEventListener(document, 'mouseup', widgetMouseUp, false); @@ -1100,14 +1102,14 @@ function widgetMouseUp(e) { if (widgetDragManager.obj.dragEnd) { var evt = new xEvent(e); widgetDragManager.obj.dragEnd(widgetDragManager.obj, evt.pageX, evt.pageY); - } + } widgetDragManager.obj = null; widgetDragManager.isDrag = false; - } -} + } +} -// 드래그할때의 object이동등을 담당 +// 드래그할때의 object이동등을 담당 function widgetDragMouseMove(e) { var evt = new xEvent(e); if(widgetDragManager.obj) { diff --git a/modules/widget/tpl/js/widget_admin.js b/modules/widget/tpl/js/widget_admin.js index 4d33c9787..6dad1bfda 100644 --- a/modules/widget/tpl/js/widget_admin.js +++ b/modules/widget/tpl/js/widget_admin.js @@ -10,20 +10,20 @@ function completeGenerateCode(ret_obj) { var zone = xGetElementById("widget_code"); zone.value = widget_code; -} +} /* 생성된 코드를 페이지 zone에 출력 */ function completeGenerateCodeInPage(ret_obj,response_tags,params,fo_obj) { var widget_code = ret_obj["widget_code"]; if(!opener || !widget_code) { - window.close(); + window.close(); return; } opener.doAddWidgetCode(widget_code); window.close(); -} +} /* 위젯 코드 생성시 스킨을 고르면 컬러셋의 정보를 표시 */ function doDisplaySkinColorset(sel, colorset) { @@ -51,6 +51,8 @@ function completeGetSkinColorset(ret_obj, response_tags, params, fo_obj) { var selected_colorset = params["colorset"]; for(var i=0;i8) sel_obj.size = sel_obj.options.length; - + syncMid(id); } @@ -208,7 +210,7 @@ function midMoveUp(id) { t_obj.value = value; t_obj.text = text; sel_obj.selectedIndex = idx-1; - + syncMid(id); } @@ -260,7 +262,7 @@ function getModuleSrlList(id) { params["id"] = id; var response_tags = new Array("error","message","module_list","id"); - exec_xml("widget", "getWidgetAdminModuleList", params, completeGetModuleSrlList, response_tags, params); + exec_xml("module", "getModuleAdminModuleList", params, completeGetModuleSrlList, response_tags, params); } function completeGetModuleSrlList(ret_obj, response_tags) { @@ -291,7 +293,7 @@ function getModuleSrl(id) { params["id"] = id; var response_tags = new Array("error","message","module_list","id"); - exec_xml("widget", "getWidgetAdminModuleList", params, completeGetModuleSrl, response_tags, params); + exec_xml("module", "getModuleAdminModuleList", params, completeGetModuleSrl, response_tags, params); } function completeGetModuleSrl(ret_obj, response_tags) { @@ -319,3 +321,9 @@ function excuteWindowLoadEvent() { } } xAddEventListener(window,'load',excuteWindowLoadEvent); + + +function selectWidget(val){ + var url =current_url.setQuery('selected_widget', val); + document.location.href = url; +} diff --git a/modules/widget/tpl/widget_generate_code.html b/modules/widget/tpl/widget_generate_code.html index 1e2a37fca..5a34fc206 100644 --- a/modules/widget/tpl/widget_generate_code.html +++ b/modules/widget/tpl/widget_generate_code.html @@ -4,7 +4,7 @@ - +

{$lang->cmd_generate_code}

diff --git a/modules/widget/tpl/widget_generate_code.include.html b/modules/widget/tpl/widget_generate_code.include.html index d961faa35..ba5ed005d 100644 --- a/modules/widget/tpl/widget_generate_code.include.html +++ b/modules/widget/tpl/widget_generate_code.include.html @@ -3,7 +3,14 @@
{$lang->widget}
- {$widget_info->title} ver {$widget_info->version} + +{$lang->cmd_select} + +
{nl2br(trim($widget_info->author->description))}
@@ -13,13 +20,13 @@
{$lang->skin}
- - +{$lang->cmd_select}