diff --git a/addons/resize_image/css/resize_image.mobile.css b/addons/resize_image/css/resize_image.mobile.css
index a62075411..53d753413 100644
--- a/addons/resize_image/css/resize_image.mobile.css
+++ b/addons/resize_image/css/resize_image.mobile.css
@@ -1 +1 @@
-.xe_content img { max-width:100%; height:auto; }
+.xe_content img{max-width:100%;height:auto !important}
diff --git a/addons/resize_image/js/resize_image.js b/addons/resize_image/js/resize_image.js
index be1e197eb..c1de9b2ae 100644
--- a/addons/resize_image/js/resize_image.js
+++ b/addons/resize_image/js/resize_image.js
@@ -90,10 +90,14 @@ function getScreen() {
$("#xe_gallery_controls,#xe_gallery_screen").css({
display:"block",
- width : clientWidth + "px",
- height : clientHeight + "px",
- left : $(document).scrollLeft(),
- top : $(document).scrollTop()
+ width : $(document).width() + "px",
+ height : $(document).height() + "px",
+ left : 0,
+ top : 0
+ //width : clientWidth + "px",
+ //height : clientHeight + "px",
+ // left : $(document).scrollLeft(),
+ // top : $(document).scrollTop()
});
closebtn.css("left", Math.round((clientWidth-60)/2) + "px");
@@ -126,8 +130,13 @@ function getScreen() {
if(!src) src = this.list.eq(this.index).attr("src");
imgframe.attr("src", src).css({
- left : Math.round( Math.max( (clientWidth-imgframe.width()-14)/2, 0 ) ) + "px",
- top : Math.round( Math.max( (clientHeight-imgframe.height()-14)/2, 0 ) ) + "px"
+ left : Math.round( Math.max( parseInt($(document).scrollLeft()) + (clientWidth-imgframe.width()-14)/2, 0 ) ) + "px",
+ top : Math.round( Math.max( parseInt($(document).scrollTop()) + (clientHeight-imgframe.height()-14)/2, 0 ) ) + "px"
+ });
+
+ closebtn.css({
+ left : Math.round( Math.max( parseInt($(document).scrollLeft()) + (clientWidth-closebtn.width())/2, 0 ) ) + "px",
+ top : Math.round( Math.max( parseInt($(document).scrollTop()) + 10, 0 ) ) + "px"
});
};
diff --git a/addons/resize_image/js/resize_image.min.js b/addons/resize_image/js/resize_image.min.js
index 659fd9f56..fe8f24f84 100644
--- a/addons/resize_image/js/resize_image.min.js
+++ b/addons/resize_image/js/resize_image.min.js
@@ -1,9 +1,7 @@
/**
* @brief 화면내에서 상위 영역보다 이미지가 크면 리사이즈를 하고 클릭시 원본을 보여줄수 있도록 변경
**/
-(function($){var xScreen=null;function getScreen(){var body=$(document.body);var controls,imgframe,closebtn,prevbtn,nextbtn;if(!xScreen){xScreen=$("
").attr("id","xe_gallery_screen").css({position:"absolute",display:"none",backgroundColor:"black",zIndex:500,opacity:0.5});controls=$("
").attr("id","xe_gallery_controls").css({position:"absolute",display:"none",overflow:"hidden",zIndex:510});closebtn=$("
![]()
").attr("id","xe_gallery_closebtn").attr("src",request_uri+"addons/resize_image/iconClose.png").css({top:"10px"}).click(function(){xScreen.xeHide()}).appendTo(controls);prevbtn=$("
![]()
").attr("id","xe_gallery_prevbtn").attr("src",request_uri+"addons/resize_image/iconLeft.png").css("left","10px").click(function(){xScreen.xePrev()}).appendTo(controls);nextbtn=$("
![]()
").attr("id","xe_gallery_nextbtn").attr("src",request_uri+"addons/resize_image/iconRight.png").css("right","10px").click(function(){xScreen.xeNext()}).appendTo(controls);controls.find("img").attr({width:60,height:60,className:"iePngFix"}).css({position:"absolute",width:"60px",height:"60px",zIndex:530,cursor:"pointer"});imgframe=$("
![]()
").attr("id","xe_gallery_holder").css("border","7px solid white").css("zIndex",520).appendTo(controls).draggable();body.append(xScreen).append(controls);xScreen.xeShow=function(){var clientWidth=$(window).width();var clientHeight=$(window).height();$("#xe_gallery_controls,#xe_gallery_screen").css({display:"block",width:clientWidth+"px",height:clientHeight+"px",left:$(document).scrollLeft(),top:$(document).scrollTop()});closebtn.css("left",Math.round((clientWidth-60)/2)+"px");$("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round((clientHeight-60)/2)+"px");this.xeMove(0);};xScreen.xeHide=function(event){xScreen.css("display","none");controls.css("display","none");};xScreen.xePrev=function(){this.xeMove(-1);};xScreen.xeNext=function(){this.xeMove(1);};xScreen.xeMove=function(val){var clientWidth=$(window).width();var clientHeight=$(window).height();this.index+=val;prevbtn.css("visibility",(this.index>0)?"visible":"hidden");nextbtn.css("visibility",(this.index
');function doResize(contentWidth,count){if(!count)count=0;if(count>=10)return;var $img=this;var beforSize={'width':$img.width(),'height':$img.height()};if(!beforSize.width||!beforSize.height){setTimeout(function(){doResize.call($img,contentWidth,++count)},200);return;}
-if(beforSize.width<=contentWidth)return;var resize_ratio=contentWidth/beforSize.width;$img.removeAttr('width').removeAttr('height').css({'width':contentWidth,'height':parseInt(beforSize.height*resize_ratio,10)});}
-$('div.xe_content').each(function(){dummy.appendTo(this);var contentWidth=dummy.width();dummy.remove();if(!contentWidth)return;$('img',this).each(function(){var $img=$(this);var imgSrc=$img.attr('src');if(regx_skip.test(imgSrc)&&!regx_allow_i6pngfix.test(imgSrc))return;$img.attr('rel','xe_gallery');doResize.call($img,contentWidth);});$('img[rel=xe_gallery]',this).live('mouseover',function(){var $img=$(this);if(!$img.parent('a').length&&!$img.attr('onclick')){$img.css('cursor','pointer').click(slideshow);}});});});})(jQuery);
+(function($){var xScreen=null
+function getScreen(){var body=$(document.body),controls,imgframe,closebtn,prevbtn,nextbtn;if(!xScreen){xScreen=$("
").attr("id","xe_gallery_screen").css({position:"absolute",display:"none",backgroundColor:"black",zIndex:500,opacity:0.5});controls=$("
").attr("id","xe_gallery_controls").css({position:"absolute",display:"none",overflow:"hidden",zIndex:510});closebtn=$("
![]()
").attr("id","xe_gallery_closebtn").attr("src",request_uri+"addons/resize_image/iconClose.png").css({top:"10px"}).click(function(){xScreen.xeHide()}).appendTo(controls);prevbtn=$("
![]()
").attr("id","xe_gallery_prevbtn").attr("src",request_uri+"addons/resize_image/iconLeft.png").css("left","10px").click(function(){xScreen.xePrev()}).appendTo(controls);nextbtn=$("
![]()
").attr("id","xe_gallery_nextbtn").attr("src",request_uri+"addons/resize_image/iconRight.png").css("right","10px").click(function(){xScreen.xeNext()}).appendTo(controls);controls.find("img").attr({width:60,height:60,className:"iePngFix"}).css({position:"absolute",width:"60px",height:"60px",zIndex:530,cursor:"pointer"});imgframe=$("
![]()
").attr("id","xe_gallery_holder").css("border","7px solid white").css("zIndex",520).appendTo(controls).draggable();body.append(xScreen).append(controls);xScreen.xeShow=function(){var clientWidth=$(window).width(),clientHeight=$(window).height();$("#xe_gallery_controls,#xe_gallery_screen").css({display:"block",width:$(document).width()+"px",height:$(document).height()+"px",left:0,top:0});closebtn.css("left",Math.round((clientWidth-60)/2)+"px");$("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round((clientHeight-60)/2)+"px");this.xeMove(0)};xScreen.xeHide=function(event){xScreen.css("display","none");controls.css("display","none")};xScreen.xePrev=function(){this.xeMove(-1)};xScreen.xeNext=function(){this.xeMove(1)};xScreen.xeMove=function(val){var clientWidth=$(window).width(),clientHeight=$(window).height();this.index+=val;prevbtn.css("visibility",(this.index>0)?"visible":"hidden");nextbtn.css("visibility",(this.index
')
+function doResize(contentWidth,count){if(!count)count=0;if(count>=10)return;var $img=this,beforSize={width:$img.width(),height:$img.height()};if(!beforSize.width||!beforSize.height){setTimeout(function(){doResize.call($img,contentWidth,++count)},200);return};if(beforSize.width<=contentWidth)return;var resize_ratio=contentWidth/beforSize.width;$img.removeAttr('width').removeAttr('height').css({width:contentWidth,height:parseInt(beforSize.height*resize_ratio,10)})};$('div.xe_content').each(function(){var contentWidth=dummy.appendTo(this).width();dummy.remove();if(!contentWidth)return;$('img',this).each(function(){var $img=$(this),imgSrc=$img.attr('src');if(regx_skip.test(imgSrc)&&!regx_allow_i6pngfix.test(imgSrc))return;$img.attr('rel','xe_gallery');doResize.call($img,contentWidth)});$('img[rel=xe_gallery]',this).live('mouseover',function(){var $img=$(this);if(!$img.parent('a').length&&!$img.attr('onclick'))$img.css('cursor','pointer').click(slideshow)})})})})(jQuery)
\ No newline at end of file
diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php
index 678abf9cf..d36f24ed3 100644
--- a/classes/module/ModuleHandler.class.php
+++ b/classes/module/ModuleHandler.class.php
@@ -151,7 +151,17 @@
$this->mid = $module_info->mid;
$this->module_info = $module_info;
Context::setBrowserTitle($module_info->browser_title);
- $part_config= $oModuleModel->getModulePartConfig('layout',$module_info->layout_srl);
+
+ if($module_info->use_mobile && Mobile::isFromMobilePhone())
+ {
+ $layoutSrl = $module_info->mlayout_srl;
+ }
+ else
+ {
+ $layoutSrl = $module_info->layout_srl;
+ }
+
+ $part_config= $oModuleModel->getModulePartConfig('layout',$layoutSrl);
Context::addHtmlHeader($part_config->header_script);
}
diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php
index 31de9b8f4..050adf159 100644
--- a/classes/template/TemplateHandler.class.php
+++ b/classes/template/TemplateHandler.class.php
@@ -187,7 +187,7 @@ class TemplateHandler {
$buff = preg_replace('@@s', '', $buff);
// replace value of src in img/input/script tag
- $buff = preg_replace_callback('/<(?:img|input|script)(?:(?!["\'\/]\s*>).)* src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
+ $buff = preg_replace_callback('/<(?:img|input|script)[^<>]*src="(?!https?:\/\/|[\/\{])([^"]+)"/is', array($this, '_replacePath'), $buff);
// replace loop and cond template syntax
$buff = $this->_parseInline($buff);
@@ -223,6 +223,7 @@ class TemplateHandler {
* @param array $matches
* @return string
**/
+
function _compileFormAuthGeneration($matches)
{
// form ruleset attribute move to hidden tag
diff --git a/classes/xml/xmlquery/argument/Argument.class.php b/classes/xml/xmlquery/argument/Argument.class.php
index 5ac884869..def8b2814 100644
--- a/classes/xml/xmlquery/argument/Argument.class.php
+++ b/classes/xml/xmlquery/argument/Argument.class.php
@@ -163,11 +163,50 @@ class Argument {
* @return string
*/
function _escapeStringValue($value) {
+ // Remove non-utf8 chars.
+ $regex = <<<'END'
+/
+(
+ (?:
+ [\x00-\x7F] # single-byte sequences 0xxxxxxx
+ |[\xC0-\xDF][\x80-\xBF] # double-byte sequences 110xxxxx 10xxxxxx
+ |[\xE0-\xEF][\x80-\xBF]{2} # triple-byte sequences 1110xxxx 10xxxxxx * 2
+ )+
+)
+|([\xF0-\xF7][\x80-\xBF]{3}) # quadruple-byte sequence 11110xxx 10xxxxxx * 3
+|([\x80-\xBF]) # invalid byte in range 10000000 - 10111111
+|([\xC0-\xFF]) # invalid byte in range 11000000 - 11111111
+/x
+END;
+
+ $value = preg_replace_callback($regex, array($this, 'utf8Replacer'), $value);
$db = &DB::getInstance();
$value = $db->addQuotes($value);
return '\'' . $value . '\'';
}
+ function utf8Replacer($captures) {
+ if (!empty($captures[1]))
+ {
+ // Valid byte sequence. Return unmodified.
+ return $captures[1];
+ }
+ elseif(!empty($captures[2]))
+ {
+ // Remove user defined area
+ if("\xF3\xB0\x80\x80" <= $captures[2])
+ {
+ return;
+ }
+
+ return $captures[2];
+ }
+ else
+ {
+ return;
+ }
+ }
+
function isValid() {
return $this->isValid;
}
diff --git a/common/js/common.js b/common/js/common.js
index 6cb9b8bbc..bb8128aae 100644
--- a/common/js/common.js
+++ b/common/js/common.js
@@ -364,18 +364,18 @@ function sendMailTo(to) {
/**
* @brief url이동 (open_window 값이 N 가 아니면 새창으로 띄움)
**/
-function move_url(url, open_wnidow) {
+function move_url(url, open_window) {
if(!url) return false;
- if(typeof(open_wnidow) == 'undefined') open_wnidow = 'N';
- if(open_wnidow=='N') {
- open_wnidow = false;
+ if(typeof(open_window) == 'undefined') open_window = 'N';
+ if(open_window=='N') {
+ open_window = false;
} else {
- open_wnidow = true;
+ open_window = true;
}
if(/^\./.test(url)) url = request_uri+url;
- if(open_wnidow) {
+ if(open_window) {
winopen(url);
} else {
location.href=url;
diff --git a/common/js/xe.js b/common/js/xe.js
index 62d8af7fe..345459888 100644
--- a/common/js/xe.js
+++ b/common/js/xe.js
@@ -648,18 +648,18 @@ function sendMailTo(to) {
/**
* @brief url이동 (open_window 값이 N 가 아니면 새창으로 띄움)
**/
-function move_url(url, open_wnidow) {
+function move_url(url, open_window) {
if(!url) return false;
- if(typeof(open_wnidow) == 'undefined') open_wnidow = 'N';
- if(open_wnidow=='N') {
- open_wnidow = false;
+ if(typeof(open_window) == 'undefined') open_window = 'N';
+ if(open_window=='N') {
+ open_window = false;
} else {
- open_wnidow = true;
+ open_window = true;
}
if(/^\./.test(url)) url = request_uri+url;
- if(open_wnidow) {
+ if(open_window) {
winopen(url);
} else {
location.href=url;
diff --git a/common/lang/lang.xml b/common/lang/lang.xml
index ec929ff94..b5ededcbd 100644
--- a/common/lang/lang.xml
+++ b/common/lang/lang.xml
@@ -2935,6 +2935,10 @@
+
-
+
+
+
-
diff --git a/config/func.inc.php b/config/func.inc.php
index 7368dbc6b..67ff1c780 100644
--- a/config/func.inc.php
+++ b/config/func.inc.php
@@ -326,7 +326,7 @@
$request_uri = Context::getRequestUri();
if(!$num_args) return $request_uri;
- $url = Context::getUrl($num_args, $args_list);
+ $url = Context::getUrl($num_args, $args_list, null, false);
if(!preg_match('/^http/i',$url)){
preg_match('/^(http|https):\/\/([^\/]+)\//',$request_uri,$match);
$url = Context::getUrl($num_args, $args_list, null, false);
diff --git a/libs/tar.class.php b/libs/tar.class.php
index 66294278d..7536e17f4 100644
--- a/libs/tar.class.php
+++ b/libs/tar.class.php
@@ -99,6 +99,10 @@ class tar {
// PRIVATE ACCESS FUNCTION
function __parseNullPaddedString($string) {
$position = strpos($string,chr(0));
+ if(!$position)
+ {
+ $position = strlen($string);
+ }
return substr($string,0,$position);
}
@@ -109,6 +113,7 @@ class tar {
// Read Files from archive
$tar_length = strlen($this->tar_file);
$main_offset = 0;
+ $flag_longlink = false;
while($main_offset < $tar_length) {
// If we read a block of 512 nulls, we are at the end of the archive
if(substr($this->tar_file,$main_offset,512) == str_repeat(chr(0),512))
@@ -141,6 +146,8 @@ class tar {
// Parse Group name
$file_gname = $this->__parseNullPaddedString(substr($this->tar_file,$main_offset + 297,32));
+ $file_type = substr($this->tar_file,$main_offset + 156,1);
+
// Make sure our file is valid
if($this->__computeUnsignedChecksum(substr($this->tar_file,$main_offset,512)) != $file_chksum)
return false;
@@ -159,42 +166,67 @@ class tar {
$activeFile["endheader"] = substr($this->tar_file,$main_offset + 500,12);
*/
- if($file_size > 0) {
- // Increment number of files
- $this->numFiles++;
+ if(strtolower($file_type) == 'l' || $file_name == '././@LongLink')
+ {
+ $flag_longlink = true;
+ $longlink_name = $this->__parseNullPaddedString($file_contents);
+ }
+ elseif($file_type == '0') {
+ // Increment number of files
+ $this->numFiles++;
- // Create us a new file in our array
- $activeFile = &$this->files[];
+ // Create us a new file in our array
+ $activeFile = &$this->files[];
- // Asign Values
- $activeFile["name"] = $file_name;
- $activeFile["mode"] = $file_mode;
- $activeFile["size"] = $file_size;
- $activeFile["time"] = $file_time;
- $activeFile["user_id"] = $file_uid;
- $activeFile["group_id"] = $file_gid;
- $activeFile["user_name"] = $file_uname;
- $activeFile["group_name"] = $file_gname;
- $activeFile["checksum"] = $file_chksum;
- $activeFile["file"] = $file_contents;
+ // Asign Values
+ if($flag_longlink)
+ {
+ $activeFile["name"] = $longlink_name;
+ }
+ else
+ {
+ $activeFile["name"] = $file_name;
+ }
+ $activeFile["type"] = $file_type;
+ $activeFile["mode"] = $file_mode;
+ $activeFile["size"] = $file_size;
+ $activeFile["time"] = $file_time;
+ $activeFile["user_id"] = $file_uid;
+ $activeFile["group_id"] = $file_gid;
+ $activeFile["user_name"] = $file_uname;
+ $activeFile["group_name"] = $file_gname;
+ $activeFile["checksum"] = $file_chksum;
+ $activeFile["file"] = $file_contents;
- } else {
- // Increment number of directories
- $this->numDirectories++;
+ $flag_longlink = false;
- // Create a new directory in our array
- $activeDir = &$this->directories[];
+ } elseif($file_type == '5') {
+ // Increment number of directories
+ $this->numDirectories++;
- // Assign values
- $activeDir["name"] = $file_name;
- $activeDir["mode"] = $file_mode;
- $activeDir["time"] = $file_time;
- $activeDir["user_id"] = $file_uid;
- $activeDir["group_id"] = $file_gid;
- $activeDir["user_name"] = $file_uname;
- $activeDir["group_name"] = $file_gname;
- $activeDir["checksum"] = $file_chksum;
- }
+ // Create a new directory in our array
+ $activeDir = &$this->directories[];
+
+ // Assign values
+ if($flag_longlink)
+ {
+ $activeDir["name"] = $longlink_name;
+ }
+ else
+ {
+ $activeDir["name"] = $file_name;
+ }
+ $activeDir["type"] = $file_type;
+ $activeDir["mode"] = $file_mode;
+ $activeDir["time"] = $file_time;
+ $activeDir["user_id"] = $file_uid;
+ $activeDir["group_id"] = $file_gid;
+ $activeDir["user_name"] = $file_uname;
+ $activeDir["group_name"] = $file_gname;
+ $activeDir["checksum"] = $file_chksum;
+
+ $flag_longlink = false;
+ }
// Move our offset the number of blocks we have processed
$main_offset += 512 + (ceil($file_size / 512) * 512);
diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js
index 240bc2348..1b21c494b 100644
--- a/modules/admin/tpl/js/admin.js
+++ b/modules/admin/tpl/js/admin.js
@@ -942,10 +942,10 @@ $('.multiLangEdit')
function on_complete(data, idx){
var results = data.results, $btn, i, c;
- if(data.error || !results || (r_idx != idx+1)) return;
-
$this.removeClass('loading');
+ if(data.error || !results || results.length === 0 || (r_idx != idx+1)) return;
+
$ul.empty();
for(i=0,c=results.length; i < c; i++) {
$btn = $('').data('langkey', results[i].name).text(results[i].value);
@@ -972,6 +972,8 @@ $('.multiLangEdit')
$active = $ul.find('button.active');
if(key == ENTER) {
+ if($active.length === 0) return true;
+
$active.click();
return false;
}
diff --git a/modules/admin/tpl/js/admin.min.js b/modules/admin/tpl/js/admin.min.js
index ea88667f8..f251568e4 100644
--- a/modules/admin/tpl/js/admin.min.js
+++ b/modules/admin/tpl/js/admin.min.js
@@ -27,13 +27,13 @@ jQuery(function(a){function d(a,b){for(var d=0,f=0;a&&a!=b;)d+=a.offsetTop,f+=a.
k.trigger(before_event);if(before_event.isDefaultPrevented())return!1;j=e.pageY;h=d(f.get(0),q);$clone=f.attr("target",!0).clone(!0).appendTo(k);l=(e=k.find("thead th")).length;e.filter("[colspan]").attr("colspan",function(a,b){l+=b-1});b.find("td").attr("colspan",l);o=[];k.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b=a(this),e;e=d(this,q);o.push({top:e.top,bottom:e.top+b.height(),$item:b})});$clone.addClass("draggable").css({position:"absolute",opacity:0.6,width:n,height:g,
left:h.left,top:h.top,zIndex:100});b.css({position:"absolute",opacity:0.6,width:n,height:"10px",left:h.left,top:h.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(k);f.css("opacity",0.6);a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var e,d,f;m=null;a=h.top-(j-a.pageY);e=0;for(d=o.length;ea||ea-12?(m.state="before",b.css("top",f.top-5)):(m.state="after",b.css("top",f.bottom-5)));$clone.css({top:a})}).bind("mouseup.st",
function(){var e;a(document).unbind("mousemove.st mouseup.st");f.removeAttr("target").css("opacity","");$clone.remove();b.remove();m&&(e=a(m.element),e[m.state](f),k.trigger("after-drag.st"))})}});return this};a("table.sortable").xeSortableTable()});
-jQuery(function(a){var d=null,b=null,e=0,j=null,g=!1,f=!1,k;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){function d(){f.addClass("loading");l.parent().is(":visible")&&l.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete",{search_keyword:m},function(b){return function(d){var h=d.results,g,m;if(!d.error&&h&&e==b+1){f.removeClass("loading");l.empty();g=0;for(m=h.length;g').data("langkey",
+jQuery(function(a){var d=null,b=null,e=0,j=null,g=!1,f=!1,k;a(".multiLangEdit").delegate("input.vLang:text,textarea.vLang",{textchange:function(){function d(){f.addClass("loading");l.parent().is(":visible")&&l.parent().hide();show_waiting_message=!1;a.exec_json("module.getLangListByLangcodeForAutoComplete",{search_keyword:m},function(b){return function(d){var h=d.results,g,m;f.removeClass("loading");if(!d.error&&h&&!(0===h.length||e!=b+1)){l.empty();g=0;for(m=h.length;g').data("langkey",
h[g].name).text(h[g].value),a("").append(d).appendTo(l);k.trigger("show")}}}(e++));show_waiting_message=!0}var f=a(this),m=a.trim(f.val()),l;b&&(clearTimeout(b),b=null);f.data("mle-container");l=k.find(">ul");!m||g?(g=!1,l.parent().hide(),f.prev("input.vLang").val("")):(f.data("mle-langkey").val(""),f.prev("input.vLang").val(m),b=setTimeout(d,100))},keydown:function(b){var e,d,f=b.which;a(this);b=k.find(">ul");if(!k.is(":visible")||0>a.inArray(f,[38,40,13,27]))return!0;if(27==f)return k.trigger("hide"),
-!1;e=b.find("button.active");if(13==f)return e.click(),!1;if(!e.length)return b.find("li>button:first").addClass("active"),!1;38==f?(d=e.parent().prev("li").find(">button"),d.length||(d=b.find(">li:last>button"))):40==f&&(d=e.parent().next("li").find(">button"),d.length||(d=b.find(">li:first>button")));e.removeClass("active");d.addClass("active");return!1},focus:function(){var b=a(this),e=a.trim(b.val()),f=b.closest(".multiLangEdit");b.after(k);b.data("mle-container")||b.data("mle-container",f);b.data("mle-langkey")||
-b.data("mle-langkey",f.find("input.vLang:first"));(function(){var f=a.trim(b.val());f!=e&&(e=f,b.trigger("textchange"));d=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(d);d=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(j);j=setTimeout(function(){f?f=!1:b.find(":focus").is(".vLang,button._btnLang")||k.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var b,e,d;b=a(this);e=a(b.attr("href")).insertBefore(b);
-d=b.closest(".multiLangEdit").find("input.vLang,textarea.vLang");b=d.eq(0).val();d=d.eq(1).val();var f=e,g=function(){var a=[];v.each(function(){a.push(this.value)});return a.join("\n")},j=function(){f.data("multilang-current-name")?f.find("h2").find("strong").text(p==y?t:z).end().find("a").text(p==y?z:t).show().end():f.find("h2").find("strong").text(t).end().find("a").hide()},r,v,w="",s=0,p,t,z,u=[],y=0;f.data("init-multilang-editor")||(f.data("init-multilang-editor",!0).bind("multilang-reset",function(){f.data("multilang-current-name",
-"").find(".langInput li").find(">input:text,>textarea").val("").prev("label").css("visibility","visible");p=y;j()}).find("h2 a").click(function(){p=!p;j();return!1}).end().delegate("a.langItem","click",function(){var b=a(this),e,d,h;d=f.data("multilang-list");h=b.data("multilang-name");if(d&&d[h]){d=d[h];e=f.find(".langInput");f.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",h);b.parent("li").addClass("active");for(var k in d)d.hasOwnProperty(k)&&
-e.find("li."+k).find(">input:text,>textarea").data("multilang-value",d[k]).val(d[k]).prev("label").css("visibility","hidden");w=g();s=0;r.val(u[s]);p=1;j();return!1}}).data("layer_index",n).find(".langInput").attr("id","langInput_"+n++),z=f.find("h2 strong").text(),t=f.find("h2 a").text(),v=f.find("input:text,textarea").change(function(){var a=g()==w?0:1;a!=s&&r.val(u[s=a])}),r=f.find("input[type=submit]").click(function(){function b(){f.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+
+!1;e=b.find("button.active");if(13==f){if(0===e.length)return!0;e.click();return!1}if(!e.length)return b.find("li>button:first").addClass("active"),!1;38==f?(d=e.parent().prev("li").find(">button"),d.length||(d=b.find(">li:last>button"))):40==f&&(d=e.parent().next("li").find(">button"),d.length||(d=b.find(">li:first>button")));e.removeClass("active");d.addClass("active");return!1},focus:function(){var b=a(this),e=a.trim(b.val()),f=b.closest(".multiLangEdit");b.after(k);b.data("mle-container")||b.data("mle-container",
+f);b.data("mle-langkey")||b.data("mle-langkey",f.find("input.vLang:first"));(function(){var f=a.trim(b.val());f!=e&&(e=f,b.trigger("textchange"));d=setTimeout(arguments.callee,50)})()},blur:function(){clearTimeout(d);d=null;a(this).closest(".multiLangEdit").focusout()},focusout:function(){var b=a(this);clearTimeout(j);j=setTimeout(function(){f?f=!1:b.find(":focus").is(".vLang,button._btnLang")||k.trigger("hide")},10)}}).delegate("a.tgAnchor.editUserLang",{"before-open.tc":function(){var b,e,d;b=a(this);
+e=a(b.attr("href")).insertBefore(b);d=b.closest(".multiLangEdit").find("input.vLang,textarea.vLang");b=d.eq(0).val();d=d.eq(1).val();var f=e,g=function(){var a=[];v.each(function(){a.push(this.value)});return a.join("\n")},j=function(){f.data("multilang-current-name")?f.find("h2").find("strong").text(p==y?t:z).end().find("a").text(p==y?z:t).show().end():f.find("h2").find("strong").text(t).end().find("a").hide()},r,v,w="",s=0,p,t,z,u=[],y=0;f.data("init-multilang-editor")||(f.data("init-multilang-editor",
+!0).bind("multilang-reset",function(){f.data("multilang-current-name","").find(".langInput li").find(">input:text,>textarea").val("").prev("label").css("visibility","visible");p=y;j()}).find("h2 a").click(function(){p=!p;j();return!1}).end().delegate("a.langItem","click",function(){var b=a(this),e,d,h;d=f.data("multilang-list");h=b.data("multilang-name");if(d&&d[h]){d=d[h];e=f.find(".langInput");f.trigger("multilang-reset").find(".langList li.active").removeClass("active").end().data("multilang-current-name",
+h);b.parent("li").addClass("active");for(var k in d)d.hasOwnProperty(k)&&e.find("li."+k).find(">input:text,>textarea").data("multilang-value",d[k]).val(d[k]).prev("label").css("visibility","hidden");w=g();s=0;r.val(u[s]);p=1;j();return!1}}).data("layer_index",n).find(".langInput").attr("id","langInput_"+n++),z=f.find("h2 strong").text(),t=f.find("h2 a").text(),v=f.find("input:text,textarea").change(function(){var a=g()==w?0:1;a!=s&&r.val(u[s=a])}),r=f.find("input[type=submit]").click(function(){function b(){f.hide().closest(".multiLangEdit").find(".vLang").eq(0).val("$user_lang->"+
d).end().eq(1).val(f.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val()).end()}function e(a){a&&(!a.error&&a.name)&&(d=a.name,b())}var d=f.data("multilang-current-name");if(g()==w)b();else{var h={};d&&1==p&&(h.lang_name=d);v.each(function(){var b=a(this);h[b.parent("li").attr("class")]=b.val()});a.exec_json("module.procModuleAdminInsertLang",h,e)}return!1}),u=r.val().split("|"),r.val(u[0]));e.trigger("multilang-reset").removeClass("showChild").find(".langList").empty().end();
e.find(".langInput li."+xe.current_lang).find(">input:text,>textarea").val(d).prev("label").css("visibility","hidden");k.trigger("hide");/^\$user_lang->(.+)$/.test(b)?(b="module.getModuleAdminLangListByName",d={lang_name:RegExp.$1}):(b="module.getModuleAdminLangListByValue",d={value:d});show_waiting_message=!1;a.exec_json(b,d,function(b){var d=b.lang_list,f;if(!b.error&&d){var b=d,g,h={},j,d=0;for(g=b.length;d").appendTo(f),g=e.data("layer_index"),h=this[xe.current_lang];if(!h)for(lang_code in this){h=this[lang_code];break}a('').text(h).data("multilang-name",b).appendTo(d)});var b=d,d=0,k;for(k in b)b.hasOwnProperty(k)&&d++;d>1&&e.addClass("showChild");e.find(".langList>li>a:first").click()}});show_waiting_message=!0}}).delegate("button._btnLang",{click:function(){var b=a(this);g=!0;k.trigger("hide");
diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php
index 2dde08d49..b74af126f 100644
--- a/modules/comment/comment.controller.php
+++ b/modules/comment/comment.controller.php
@@ -114,6 +114,11 @@
*/
function isModuleUsingPublishValidation($module_srl=null)
{
+ if(!$module_srl == null)
+ {
+ return false;
+ }
+
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
$module_part_config = $oModuleModel->getModulePartConfig('comment',$module_info->module_srl);
@@ -666,7 +671,7 @@
* @param int $document_srl
* @return object
*/
- function deleteComments($document_srl, &$obj = NULL) {
+ function deleteComments($document_srl, $obj = NULL) {
// create the document model object
$oDocumentModel = &getModel('document');
$oCommentModel = &getModel('comment');
diff --git a/modules/comment/queries/insertComment.xml b/modules/comment/queries/insertComment.xml
index 5389c1939..d466a8f68 100644
--- a/modules/comment/queries/insertComment.xml
+++ b/modules/comment/queries/insertComment.xml
@@ -24,6 +24,6 @@
-
+
diff --git a/modules/document/document.admin.controller.php b/modules/document/document.admin.controller.php
index ab777dde4..9dc64989d 100644
--- a/modules/document/document.admin.controller.php
+++ b/modules/document/document.admin.controller.php
@@ -361,6 +361,7 @@
}
// Call a trigger (before)
+ $triggerObj->copied_srls = $copied_srls;
$output = ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
if(!$output->toBool()) {
$oDB->rollback();
diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php
index 90c095ee8..c78109892 100644
--- a/modules/document/document.controller.php
+++ b/modules/document/document.controller.php
@@ -1918,14 +1918,14 @@ class documentController extends document {
$msg_code = 'success_moved';
}
- elseif($type == 'copy') {
+ elseif($type == 'copy')
+ {
if(!$module_srl) return new Object(-1, 'fail_to_move');
$output = $oDocumentAdminController->copyDocumentModule($document_srl_list, $module_srl, $category_srl);
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
- $msg_code = 'success_copy';
-
+ $msg_code = 'success_copied';
}
elseif($type =='delete') {
$oDB = &DB::getInstance();
diff --git a/modules/editor/components/image_gallery/tpl/slide_gallery.js b/modules/editor/components/image_gallery/tpl/slide_gallery.js
index 08efeafc6..b2aa90358 100644
--- a/modules/editor/components/image_gallery/tpl/slide_gallery.js
+++ b/modules/editor/components/image_gallery/tpl/slide_gallery.js
@@ -19,10 +19,19 @@ var slideShow = xe.createPlugin('slideShow', {
API_SHOW_SLIDE : function(sender, params) {
var self=this, srl = params[0], key = '@'+srl, imgs, $zone, $thumb, $holder, i, c;
-
+ var p = params;
imgs = this.cast('GET_IMAGES', [srl]);
if(!imgs.length) return;
+ for(var i=0, nLen=imgs.length; ia?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[g,a]))},API_NEXT_SLIDE:function(g,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(g,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(g,f){var b=f[0],a=f[1],c,d,e;c=this.cast("GET_IMAGES",[b]);if(c.length&&is_def(d=c[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+b).text(a+1+"/"+c.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),
-b=this._holders["@"+b],c=b.parent().innerWidth(),a=d.$obj.prop("width"),e=d.$obj.prop("height"),0==a&&(a=d.$obj.attr("width")),0==e&&(e=d.$obj.attr("height")),a>c-20&&(c-=20,e=Math.floor(e*(c/a)),a=c,d.$obj.css("cursor","pointer"),d.$obj.attr("rel","xe_gallery")),d.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(d.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);
+(function(k){var m=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(h,f){var b=this,a=f[0],d="@"+a,c,e,j,i,g,l;c=this.cast("GET_IMAGES",[a]);if(c.length){g=0;for(e=c.length;ga?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[h,a]))},API_NEXT_SLIDE:function(h,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(h,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(h,f){var b=f[0],a=f[1],d,c,e;d=this.cast("GET_IMAGES",[b]);if(d.length&&is_def(c=d[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+
+b).text(a+1+"/"+d.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),b=this._holders["@"+b],d=b.parent().innerWidth(),a=c.$obj.prop("width"),e=c.$obj.prop("height"),0==a&&(a=c.$obj.attr("width")),0==e&&(e=c.$obj.attr("height")),a>d-20&&(d-=20,e=Math.floor(e*(d/a)),a=d,c.$obj.css("cursor","pointer"),c.$obj.attr("rel","xe_gallery")),c.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(c.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);
diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php
index bd44a99a0..dc2d8ca9b 100644
--- a/modules/layout/layout.model.php
+++ b/modules/layout/layout.model.php
@@ -484,8 +484,7 @@
if($header_script)
{
- $header_script = str_replace('"','\\"',$header_script);
- $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('$','\$',$header_script));
+ $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace(array('$','"'),array('\$','\\"'),$header_script));
}
$buff = '';
diff --git a/modules/layout/tpl/layout_modify.html b/modules/layout/tpl/layout_modify.html
index b5c3698e2..163c348ce 100644
--- a/modules/layout/tpl/layout_modify.html
+++ b/modules/layout/tpl/layout_modify.html
@@ -163,8 +163,11 @@
-
+
diff --git a/modules/member/member.view.php b/modules/member/member.view.php
index 1895646e8..4c42751f1 100644
--- a/modules/member/member.view.php
+++ b/modules/member/member.view.php
@@ -47,6 +47,7 @@
$layout_info = $oLayoutModel->getLayout($this->member_config->layout_srl);
if($layout_info)
{
+ $this->module_info->layout_srl = $this->member_config->layout_srl;
$this->setLayoutPath($layout_info->path);
}
}
diff --git a/modules/menu/menu.admin.controller.php b/modules/menu/menu.admin.controller.php
index 308bfa4d3..e4414e05a 100644
--- a/modules/menu/menu.admin.controller.php
+++ b/modules/menu/menu.admin.controller.php
@@ -606,16 +606,24 @@
//$info = $oModuleModel->getModuleInfoXml($moduleName);
$info = $oModuleModel->getModuleActionXml($moduleName);
- $url = getNotEncodedUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
- if(empty($url)) $url = getNotEncodedUrl('', 'module', 'admin', 'act', $info->admin_index_act);
- if(empty($url)) $url = getNotEncodedUrl('', 'module', 'admin');
+ $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
+ if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->admin_index_act);
+ if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin');
$dbInfo = Context::getDBInfo();
$args->menu_item_srl = (!$requestArgs->menu_item_srl) ? getNextSequence() : $requestArgs->menu_item_srl;
$args->parent_srl = $requestArgs->parent_srl;
$args->menu_srl = $requestArgs->menu_srl;
$args->name = sprintf('{$lang->menu_gnb_sub[\'%s\']}', $menuName);
- $args->url = str_replace($dbInfo->default_url, '', $url);
+ //if now page is https...
+ if(strpos($url, 'https') !== false)
+ {
+ $args->url = str_replace('https'.substr($dbInfo->default_url, 4), '', $url);
+ }
+ else
+ {
+ $args->url = str_replace($dbInfo->default_url, '', $url);
+ }
$args->open_window = 'N';
$args->expand = 'N';
$args->normal_btn = '';
diff --git a/modules/module/module.admin.model.php b/modules/module/module.admin.model.php
index a4315e172..e3065dc5c 100644
--- a/modules/module/module.admin.model.php
+++ b/modules/module/module.admin.model.php
@@ -50,11 +50,51 @@
return $output;
}
+ function getSelectedManageHTML($grantList)
+ {
+ // Grant virtual permission for access and manager
+ $grantList->access->title = Context::getLang('grant_access');
+ $grantList->access->default = 'guest';
+ if(count($grantList))
+ {
+ foreach($grantList as $key => $val) {
+ if(!$val->default) $val->default = 'guest';
+ if($val->default == 'root') $val->default = 'manager';
+ $grant_list->{$key} = $val;
+ }
+ }
+ $grant_list->manager->title = Context::getLang('grant_manager');
+ $grant_list->manager->default = 'manager';
+ Context::set('grant_list', $grant_list);
+
+ // Get a list of groups
+ $oMemberModel = &getModel('member');
+ $group_list = $oMemberModel->getGroups(0);
+ Context::set('group_list', $group_list);
+
+ Context::set('module_srls', 'dummy');
+ $content = '';
+ // Call a trigger for additional settings
+ // Considering uses in the other modules, trigger name cen be publicly used
+ $output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
+ $output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
+ Context::set('setup_content', $content);
+
+ // Get information of module_grants
+ $oTemplate = &TemplateHandler::getInstance();
+ return $oTemplate->compile($this->module_path.'tpl', 'include.manage_selected.html');
+ }
+
/**
* @brief Common:: module's permission displaying page in the module
* Available when using module instance in all the modules
**/
function getModuleGrantHTML($module_srl, $source_grant_list) {
+ if(!$module_srl)
+ {
+ return;
+ }
+
// get member module's config
$oMemberModel = &getModel('member');
$member_config = $oMemberModel->getMemberConfig();
diff --git a/modules/module/module.controller.php b/modules/module/module.controller.php
index 6a436d6b2..b6b550744 100644
--- a/modules/module/module.controller.php
+++ b/modules/module/module.controller.php
@@ -244,7 +244,7 @@
if(isSiteID($args->domain) && $oModuleModel->isIDExists($args->domain)) return new Object(-1,'msg_already_registed_vid');
if($args->domain && !isSiteID($args->domain)) {
- $args->domain = strtolower($args->domain);
+ $args->domain = $args->domain;
}
}
diff --git a/modules/poll/poll.admin.controller.php b/modules/poll/poll.admin.controller.php
index b992f4983..6198bef8c 100644
--- a/modules/poll/poll.admin.controller.php
+++ b/modules/poll/poll.admin.controller.php
@@ -80,12 +80,19 @@
/**
* @brief Delete the poll (when several questions are registered in one poll, delete this question)
**/
- function deletePollTitle($poll_index_srl) {
+ function deletePollTitle($poll_index_srl)
+ {
$args->poll_index_srl = $poll_index_srl;
$oDB = &DB::getInstance();
$oDB->begin();
+ $output = executeQueryArray('poll.getPollByDeletePollTitle', $args);
+ if($output->toBool() && $output->data && $output->data[0]->count == 1)
+ {
+ $dargs->poll_srl = $output->data[0]->poll_srl;
+ }
+
$output = $oDB->executeQuery('poll.deletePollTitle', $args);
if(!$output) {
$oDB->rollback();
@@ -98,6 +105,20 @@
return $output;
}
+ if($dargs->poll_srl)
+ {
+ $output = executeQuery('poll.deletePoll', $dargs);
+ if(!$output) {
+ $oDB->rollback();
+ return $output;
+ }
+
+ $output = executeQuery('poll.deletePollLog', $dargs);
+ if(!$output) {
+ $oDB->rollback();
+ return $output;
+ }
+ }
$oDB->commit();
return new Object();
diff --git a/modules/poll/queries/getPollByDeletePollTitle.xml b/modules/poll/queries/getPollByDeletePollTitle.xml
new file mode 100644
index 000000000..b68225982
--- /dev/null
+++ b/modules/poll/queries/getPollByDeletePollTitle.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/rss/tpl/rss_admin_index.html b/modules/rss/tpl/rss_admin_index.html
index 3ef69f84a..8e63e6fdb 100644
--- a/modules/rss/tpl/rss_admin_index.html
+++ b/modules/rss/tpl/rss_admin_index.html
@@ -47,29 +47,29 @@
-