Merge pull request #2 from xpressengine/develop

Develop
This commit is contained in:
dorami 2014-03-30 11:37:01 +09:00
commit 3cceee802c
171 changed files with 2152 additions and 1393 deletions

2
.gitignore vendored
View file

@ -2,5 +2,5 @@ config.user.inc.php
/files/
/build/
/node_modules/
.DS_Srore
.DS_Store
Thumbs.db

View file

@ -75,8 +75,6 @@ module.exports = function(grunt) {
'modules/board/skins/default/board.default.min.js': ['modules/board/skins/default/board.default.js'],
'modules/board/m.skins/default/js/mboard.min.js': ['modules/board/m.skins/default/js/mboard.js'],
'modules/board/m.skins/simpleGray/js/mboard.min.js': ['modules/board/m.skins/simpleGray/js/mboard.js'],
// editor-component-multimedia-link
'modules/editor/components/multimedia_link/tpl/popup.min.js': ['modules/editor/components/multimedia_link/tpl/popup.js'],
// editor-component-image-gallery
'modules/editor/components/image_gallery/tpl/gallery.min.js' : ['modules/editor/components/image_gallery/tpl/gallery.js'],
'modules/editor/components/image_gallery/tpl/list_gallery.min.js' : ['modules/editor/components/image_gallery/tpl/list_gallery.js'],
@ -114,11 +112,6 @@ module.exports = function(grunt) {
'modules/editor/components/image_gallery/tpl/slide_gallery.min.css': ['modules/editor/components/image_gallery/tpl/slide_gallery.css'],
}
},
'editor-component-multimedia-link': {
files: {
'modules/editor/components/multimedia_link/tpl/popup.min.css': ['modules/editor/components/multimedia_link/tpl/popup.css'],
}
},
'moudle-widget-tpl': {
files: {
'modules/widget/tpl/css/widget.min.css': ['modules/widget/tpl/css/widget.css'],

View file

@ -1,7 +1,7 @@
# XpressEngine
## Authors
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @devjin, @dionirom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, haojilin, heemin, ikko, johnsonshu, juanlee0, k10206, kagami, @khongchi, @largeden, liahona, lickawtl, mayoojin, mglclub, @misol, mmx900, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, @qw5414, @Rayyin, risapapa, rokmcssu, royallin, rubyeye, ryin005, sanghunjun, @sejin7940, @SMaker, @solidh, sspa3141, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
adrian.vasile.constantin, aerofleet, @akasima, @andreimarin, araste, @bnu, bradly1, buffkj, c2joy, @canto, cbrghost, @ccata17, @ChanMyeong, chinaskyking, chschy, clench, @devjin, @dionisrom, @dorami, @dragan-dan, ducduydaovn, duvent, @Eundong, @florinutz, @flourscent, @flyskyko, @ForPeople, FruitsHake, guny, @haneul, hankm2004, haojilin, heemin, ikko, johnsonshu, juanlee0, k10206, kagami, @khongchi, @lansi951, @largeden, liahona, lickawtl, mayoojin, mglclub, @misol, mmx900, mooo, mosmartin, @nagoon97, @ngleader, nicetwo, ovclas, risapapa, rokmcssu, royallin, rubyeye, ryin005, sanghunjun, @sejin7940, @SMaker, sspa3141, @stellar12, supershop, @taggon, @ucorina, unryong, venister, wdlee91, welcomeju, @YJSoft, ysnglee2000, zero
## License
Copyright (C) NAVER <http://www.navercorp.com>

View file

@ -9,7 +9,7 @@ if(!defined("__XE__")) exit();
* @brief Captcha for a particular action
* English alphabets and voice verification added
* */
if(!class_exists('AddonCaptcha'))
if(!class_exists('AddonCaptcha', false))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -9,7 +9,7 @@ if(!defined("__XE__")) exit();
* @brief Captcha for a particular action
* English alphabets and voice verification added
* */
if(!class_exists('AddonMemberCaptcha'))
if(!class_exists('AddonMemberCaptcha', false))
{
// On the mobile mode, XE Core does not load jquery and xe.js as normal.
Context::loadFile(array('./common/js/jquery.min.js', 'head', NULL, -100000), true);

View file

@ -101,10 +101,11 @@ div.oembedall-githubrepos ul.oembedall-repo-stats li.oembedall-forks a {
span.oembedall-closehide{
background-color: #aaa;
background-color: #EEE;
border-radius: 2px;
cursor: pointer;
margin-right: 3px;
padding: 0 3px;
}
div.oembedall-container {

View file

@ -261,7 +261,7 @@
success: function (data) {
var oembedData = $.extend({}, data);
oembedData.code = embedProvider.templateData(data);
success(oembedData, externalUrl, container);
if(oembedData.code) success(oembedData, externalUrl, container);
},
error: settings.onError.call(container, externalUrl, embedProvider)
}, settings.ajaxOptions || {});
@ -389,8 +389,8 @@
$.fn.oembed.getGenericCode = function (url, oembedData) {
var title = (oembedData.title !== null) ? oembedData.title : url,
code = '<a href="' + url + '">' + title + '</a>';
if(oembedData.html) code += "<div>" + oembedData.html + "</div>";
code = '';
if(oembedData.html) code += '<blockquote class="oembedall-blockquote"><strong>' + title + '</strong><br>' + jQuery(oembedData.html).text().substring(0,200) + '... <a href="'+url+'">more</a></blockquote>';
return code;
};
@ -849,7 +849,7 @@
templateData: function (data) {
if(!data.parse) return false;
var text = data.parse['text']['*'].replace(/href="\/wiki/g, 'href="http://en.wikipedia.org/wiki');
return '<div id="content"><h3><a class="nav-link" href="http://en.wikipedia.org/wiki/' + data.parse['displaytitle'] + '">' + data.parse['displaytitle'] + '</a></h3>' + text + '</div>';
return '<div id="content"><blockquote class="oembedall-blockquote"><strong>' + data.parse['displaytitle'] + '</strong><br>' +jQuery(text).text().substring(0,200) + '...</blockquote></div>';
}
}),
new $.fn.oembed.OEmbedProvider("imdb", "rich", ["imdb.com/title/.+"], "http://www.imdbapi.com/?i=$1&callback=?", {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
!function(a){var b="(https?|ftp|news|telnet|irc|mms)://",c="(?:[\\w\\-]+\\.)+(?:[a-z]+)",d="(?:1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9]?[0-9])",e="(?:"+d+"\\.){3}"+d,f="(?::([0-9]+))?",g="(?:/~[\\w-]+)?",h='((?:/[\\w!"$-/:-@]+)*)',i="(?:#([\\w!-@]+))?",j=new RegExp("("+b+"("+c+"|"+e+"|localhost)"+f+g+h+i+")","ig"),k=xe.createPlugin("OEmbed",{targets:[],init:function(){this.targets=[],this.enableAutoLink=!1,this.castedOembedA=!1,this.embedSetting=[]},API_ONREADY:function(){var b=this;this.extractTargets(a(".xe_content")),this.oApp.getPlugin("autolink").length&&(this.enableAutoLink=!0),b.cast("OEMBEDA"),this.enableAutoLink||a(this.targets).each(function(){b.cast("OEMBED",[this])})},API_BEFORE_AUTOLINK:function(){var a=this;a.cast("OEMBEDA")},API_AFTER_AUTOLINK:function(a,b){this.oembed(b[0])},API_OEMBED:function(b,c){if(!this.enableAutoLink){var d=c[0];if(!a(d).parent().length||"a"==a(d).parent().get(0).nodeName.toLowerCase())return this.oembed(a(d)),void 0;var e=d.nodeValue,f=a("<span>");e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(j,'<a href="$1" target="_blank">$1</a>'),a(d).before(f),a(d).replaceWith(e),c[0]=f.next("a"),f.remove(),this.oembed(c[0])}},API_OEMBEDA:function(){if(!this.castedOembedA){var b=this;this.castedOembedA=!0,a(".read_body a").not("_oembed").each(function(){b.oembed(a(this))})}},oembed:function(b){var c=this;this.embedSetting.maxWidth||(this.embedSetting.maxWidth=a(".xe_content").width()),b&&(b&&3==b.nodeType&&(b=a(b)),b.oembed(null,c.embedSetting).addClass("_oembed"))},extractTargets:function(b){var c=this,d=a(".xe_content",b);return d.length?(this.extractTargets(d),void 0):(a(b).contents().each(function(){var b=this.nodeName.toLowerCase();if(-1==a.inArray(b,["a","pre","xml","textarea","input","select","option","code","script","style","iframe","button","img","embed","object","ins"]))if(j.exec(""),3==this.nodeType){var d=this.nodeValue;if(d.length<5)return;if(!/(http|https|ftp|news|telnet|irc|mms):\/\//i.test(d))return;c.targets.push(this)}else c.extractTargets(this)}),void 0)}});xe.registerPlugin(new k)}(jQuery);
!function(a){var b="(https?|ftp|news|telnet|irc|mms)://",c="(?:[\\w\\-]+\\.)+(?:[a-z]+)",d="(?:1[0-9]{2}|2[0-4][0-9]|25[0-5]|[1-9]?[0-9])",e="(?:"+d+"\\.){3}"+d,f="(?::([0-9]+))?",g="(?:/~[\\w-]+)?",h='((?:/[\\w!"$-/:-@]+)*)',i="(?:#([\\w!-@]+))?",j=new RegExp("("+b+"("+c+"|"+e+"|localhost)"+f+g+h+i+")","ig"),k=xe.createPlugin("OEmbed",{targets:[],init:function(){this.targets=[],this.enableAutoLink=!1,this.castedOembedA=!1,this.embedSetting=[]},API_ONREADY:function(){var b=this;this.extractTargets(a(".xe_content")),this.oApp.getPlugin("autolink").length&&(this.enableAutoLink=!0),b.cast("OEMBEDA"),this.enableAutoLink||a(this.targets).each(function(){b.cast("OEMBED",[this])})},API_BEFORE_AUTOLINK:function(){var a=this;a.cast("OEMBEDA")},API_AFTER_AUTOLINK:function(a,b){this.oembed(b[0])},API_OEMBED:function(b,c){if(!this.enableAutoLink){var d=c[0];if(!a(d).parent().length||"a"==a(d).parent().get(0).nodeName.toLowerCase())return void this.oembed(a(d));var e=d.nodeValue,f=a("<span>");e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(j,'<a href="$1" target="_blank">$1</a>'),a(d).before(f),a(d).replaceWith(e),c[0]=f.next("a"),f.remove(),this.oembed(c[0])}},API_OEMBEDA:function(){if(!this.castedOembedA){var b=this;this.castedOembedA=!0,a(".read_body a").not("_oembed").each(function(){b.oembed(a(this))})}},oembed:function(b){var c=this;this.embedSetting.maxWidth||(this.embedSetting.maxWidth=a(".xe_content").width()),b&&(b&&3==b.nodeType&&(b=a(b)),b.oembed(null,c.embedSetting).addClass("_oembed"))},extractTargets:function(b){var c=this,d=a(".xe_content",b);return d.length?void this.extractTargets(d):void a(b).contents().each(function(){var b=this.nodeName.toLowerCase();if(-1==a.inArray(b,["a","pre","xml","textarea","input","select","option","code","script","style","iframe","button","img","embed","object","ins"]))if(j.exec(""),3==this.nodeType){var d=this.nodeValue;if(d.length<5)return;if(!/(http|https|ftp|news|telnet|irc|mms):\/\//i.test(d))return;c.targets.push(this)}else c.extractTargets(this)})}});xe.registerPlugin(new k)}(jQuery);

View file

@ -1 +1 @@
!function(a){function b(){var b,c,e,f,g,h=a(document.body);return d?(b=a("#xe_gallery_controls"),c=a("#xe_gallery_holder"),e=a("#xe_gallery_closebtn"),f=a("#xe_gallery_prevbtn"),g=a("#xe_gallery_nextbtn")):(d=a("<div>").attr("id","xe_gallery_screen").css({position:"fixed",display:"none",backgroundColor:"black",zIndex:500,opacity:.7}),b=a("<div>").attr("id","xe_gallery_controls").css({position:"fixed",display:"none",overflow:"hidden",zIndex:510}),f=a('<button type="button" id="xe_gallery_prevbtn" />').css({left:"10px",backgroundPosition:"0 -64px"}).click(function(){d.xePrev()}).appendTo(b),e=a('<button type="button" id="xe_gallery_closebtn" />').css({top:"10px",backgroundPosition:"0 0"}).click(function(){d.xeHide()}).appendTo(b),g=a('<button type="button" id="xe_gallery_nextbtn" />').attr("id","xe_gallery_nextbtn").css({right:"10px",backgroundPosition:"0 -128px"}).click(function(){d.xeNext()}).appendTo(b),b.find(">button").css({position:"absolute",width:"64px",height:"64px",zIndex:530,cursor:"pointer",border:0,margin:0,padding:0,backgroundColor:"transparent",backgroundImage:"url("+request_uri+"addons/resize_image/btn.png)",backgroundRepeat:"no-repeat",opacity:".5",filter:"alpha(opacity=50)"}).mouseover(function(){a(this).css({opacity:"1",filter:"alpha(opacity=100)"})}).mouseout(function(){a(this).css({opacity:".5",filter:"alpha(opacity=50)"})}).focus(function(){a(this).trigger("mouseover")}).blur(function(){a(this).trigger("mouseout")}),c=a("<img>").attr("id","xe_gallery_holder").css({border:"5px solid white",zindex:520,maxWidth:"none",borderRadius:"5px",boxShadow:"0 0 10px #000"}).appendTo(b).draggable(),h.append(d).append(b),d.xeShow=function(){var b=(a(window).width(),a(window).height());a("#xe_gallery_controls,#xe_gallery_screen").show().css({top:0,right:0,bottom:0,left:0}),a("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round(b/2-32)+"px"),this.xeMove(0)},d.xeHide=function(){d.hide(),b.hide()},d.xePrev=function(){this.xeMove(-1)},d.xeNext=function(){this.xeMove(1)},d.xeMove=function(b){var d=a(window).width(),h=a(window).height();this.index+=b,f.css("visibility",this.index>0?"visible":"hidden"),g.css("visibility",this.index<this.list.size()-1?"visible":"hidden");var i=this.list.eq(this.index).attr("rawsrc");i||(i=this.list.eq(this.index).attr("src")),c.attr("src",i).css({left:d/2-c.width()/2+"px",top:h/2-c.height()/2+"px"}),e.css({left:d/2-32+"px",top:"10px"}).focus()},a(document).keydown(function(a){return 27==a.which?(d.xeHide(),!1):!0})),d}function c(){var c=a(this).closest(".xe_content"),d=c.find("img[rel=xe_gallery]"),e=a.inArray(a(this).get(0),d.get()),f=b();f.list=d,f.index=e,f.xeShow()}var d=null;a(window).load(function(){function b(a,c){if(c||(c=0),!(c>=10)){var d=this,e={width:d.width(),height:d.height()};if(!e.width||!e.height)return setTimeout(function(){b.call(d,a,++c)},200),void 0;if(!(e.width<=a)){var f=a/e.width;d.removeAttr("width").removeAttr("height").css({width:a,height:parseInt(e.height*f,10)})}}}var d=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i,e=/(?:common\/tpl\/images\/blank\.gif$)/i,f=a('<div style="height:1px;overflow:hidden;opacity:0;display:block;clear:both"></div>');a(".xe_content").each(function(){var g=f.appendTo(this).width();f.remove(),g&&(a("img",this).each(function(){var c=a(this),f=c.attr("src");(!d.test(f)||e.test(f))&&(c.attr("rel","xe_gallery"),b.call(c,g))}),a("img[rel=xe_gallery]",this).live("mouseover",function(){var b=a(this);b.parent("a").length||b.attr("onclick")||b.css("cursor","pointer").click(c)}))})})}(jQuery);
!function(a){function b(){var b,c,e,f,g,h=a(document.body);return d?(b=a("#xe_gallery_controls"),c=a("#xe_gallery_holder"),e=a("#xe_gallery_closebtn"),f=a("#xe_gallery_prevbtn"),g=a("#xe_gallery_nextbtn")):(d=a("<div>").attr("id","xe_gallery_screen").css({position:"fixed",display:"none",backgroundColor:"black",zIndex:500,opacity:.7}),b=a("<div>").attr("id","xe_gallery_controls").css({position:"fixed",display:"none",overflow:"hidden",zIndex:510}),f=a('<button type="button" id="xe_gallery_prevbtn" />').css({left:"10px",backgroundPosition:"0 -64px"}).click(function(){d.xePrev()}).appendTo(b),e=a('<button type="button" id="xe_gallery_closebtn" />').css({top:"10px",backgroundPosition:"0 0"}).click(function(){d.xeHide()}).appendTo(b),g=a('<button type="button" id="xe_gallery_nextbtn" />').attr("id","xe_gallery_nextbtn").css({right:"10px",backgroundPosition:"0 -128px"}).click(function(){d.xeNext()}).appendTo(b),b.find(">button").css({position:"absolute",width:"64px",height:"64px",zIndex:530,cursor:"pointer",border:0,margin:0,padding:0,backgroundColor:"transparent",backgroundImage:"url("+request_uri+"addons/resize_image/btn.png)",backgroundRepeat:"no-repeat",opacity:".5",filter:"alpha(opacity=50)"}).mouseover(function(){a(this).css({opacity:"1",filter:"alpha(opacity=100)"})}).mouseout(function(){a(this).css({opacity:".5",filter:"alpha(opacity=50)"})}).focus(function(){a(this).trigger("mouseover")}).blur(function(){a(this).trigger("mouseout")}),c=a("<img>").attr("id","xe_gallery_holder").css({border:"5px solid white",zindex:520,maxWidth:"none",borderRadius:"5px",boxShadow:"0 0 10px #000"}).appendTo(b).draggable(),h.append(d).append(b),d.xeShow=function(){var b=(a(window).width(),a(window).height());a("#xe_gallery_controls,#xe_gallery_screen").show().css({top:0,right:0,bottom:0,left:0}),a("#xe_gallery_prevbtn,#xe_gallery_nextbtn").css("top",Math.round(b/2-32)+"px"),this.xeMove(0)},d.xeHide=function(){d.hide(),b.hide()},d.xePrev=function(){this.xeMove(-1)},d.xeNext=function(){this.xeMove(1)},d.xeMove=function(b){var d=a(window).width(),h=a(window).height();this.index+=b,f.css("visibility",this.index>0?"visible":"hidden"),g.css("visibility",this.index<this.list.size()-1?"visible":"hidden");var i=this.list.eq(this.index).attr("rawsrc");i||(i=this.list.eq(this.index).attr("src")),c.attr("src",i).css({left:d/2-c.width()/2+"px",top:h/2-c.height()/2+"px"}),e.css({left:d/2-32+"px",top:"10px"}).focus()},a(document).keydown(function(a){return 27==a.which?(d.xeHide(),!1):!0})),d}function c(){var c=a(this).closest(".xe_content"),d=c.find("img[rel=xe_gallery]"),e=a.inArray(a(this).get(0),d.get()),f=b();f.list=d,f.index=e,f.xeShow()}var d=null;a(window).load(function(){function b(a,c){if(c||(c=0),!(c>=10)){var d=this,e={width:d.width(),height:d.height()};if(!e.width||!e.height)return void setTimeout(function(){b.call(d,a,++c)},200);if(!(e.width<=a)){var f=a/e.width;d.removeAttr("width").removeAttr("height").css({width:a,height:parseInt(e.height*f,10)})}}}var d=/(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i,e=/(?:common\/tpl\/images\/blank\.gif$)/i,f=a('<div style="height:1px;overflow:hidden;opacity:0;display:block;clear:both"></div>');a(".xe_content").each(function(){var g=f.appendTo(this).width();f.remove(),g&&(a("img",this).each(function(){var c=a(this),f=c.attr("src");(!d.test(f)||e.test(f))&&(c.attr("rel","xe_gallery"),b.call(c,g))}),a("img[rel=xe_gallery]",this).live("mouseover",function(){var b=a(this);b.parent("a").length||b.attr("onclick")||b.css("cursor","pointer").click(c)}))})})}(jQuery);

View file

@ -9,7 +9,7 @@ if(!defined('__XE__'))
* @author NAVER (developers@xpressengine.com)
* @brief Add-on to resize images in the body
*/
if($called_position == 'after_module_proc' && Context::getResponseMethod() == "HTML" || !isCrawler())
if($called_position == 'after_module_proc' && (Context::getResponseMethod() == "HTML" || !isCrawler()))
{
if(Mobile::isFromMobilePhone())
{

View file

@ -420,7 +420,7 @@ body,table,input,textarea,select,button{font-family:나눔고딕,NanumGothic,NG,
<li id="UMAN_config_general_db_session">인증 세션 DB 사용: 인증 시 사용되는 PHP 세션을 DB로 사용하는 기능입니다. 웹서버의 사용률이 낮은 사이트에서는 비활성화시 사이트 응답 속도가 향상될 수 있습니다. 단, 현재 접속자를 구할 수 없어 관련된 기능을 사용할 수 없게 됩니다.</li>
<li id="UMAN_config_general_qmail">Qmail 호환: Qmail등 CRLF를 줄 구분자로 인식하지 못하는 MTA에서 메일이 발송되도록 합니다.</li>
<li id="UMAN_config_general_sitelock">사이트 잠금: 지정한 IP 외 접근을 차단할 수 있습니다.</li>
<li id="UMAN_config_general_sitelock_whitelist">접근 허용 IP: 이곳에 관리자의 IP가 반드시 포함되어야 합니다. 만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `$db_info->use_sitelock`를 'N'으로 변경하여 차단을 해제할 수 있습니다.</li>
<li id="UMAN_config_general_sitelock_whitelist">접근 허용 IP: 이곳에 관리자의 IP가 반드시 포함되어야 합니다. 만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => 'Y'`를 `'use_sitelock' => 'N'`으로 변경하여 차단을 해제할 수 있습니다.</li>
</ul>
</dd>
<dt id="UMAN_config_ftp">FTP 설정</dt>
@ -441,6 +441,23 @@ body,table,input,textarea,select,button{font-family:나눔고딕,NanumGothic,NG,
<dd>파일박스를 관리할 수 있습니다. 파일박스는 관리자가 재사용할 수 있는 이미지 파일을 관리하는 기능입니다. 회원 그룹 아이콘을 등록하면 이미지 파일은 파일박스에 업로드됩니다.</dd>
</dl>
</section>
<section class="h3">
<h1 id="UMAN_config_embed_filter">embed Filter</h1>
<p>&lt;iframe&gt; 또는 &lt;object&gt;, &lt;embed&gt; 태그에 허용 할 URL을 지정할 수 있습니다.<br>주로 domain을 포함한 URL을 지정하여 허용 URL을 지정할 수 있습니다.</p>
<p>domain을 포함하지 않은 짧거나 단순한 단어('video', 'swf' 등)만을 지정할 경우 손쉽게 악의적인 접근을 시도할 수 있으니 주의해야 합니다.</p>
<dl>
<dt id="UMAN_config_embed_filter_iframe">iFrame</dt>
<dd>
<p>&lt;iframe&gt; 태그에 허용 할 URL을 지정할 수 있습니다.</p>
<p>예시 : 'http://www.youtube.com/v/...'와 같은 URL을 &lt;iframe&gt;에 허용 하려면 'http://www.youtube.com/v/'처럼 입력하면 됩니다.</p>
</dd>
<dt id="UMAN_config_embed_filter_object">object / embed</dt>
<dd>
<p>&lt;object&gt;, &lt;embed&gt; 태그에 허용 할 URL을 지정할 수 있습니다.</p>
<p>주로 domain을 포함한 URL을 지정하여 허용 URL을 지정할 수 있습니다.<br>예시 : 'http://www.youtube.com/v/...'와 같은 URL을 &lt;object&gt;, &lt;embed&gt;에 허용 하려면 'http://www.youtube.com/v/'처럼 입력하면 됩니다.</p>
</dd>
</dl>
</section>
<section class="h3">
<h1 id="UMAN_advanced">고급</h1>
<dl>

View file

@ -8,6 +8,8 @@
* */
class CacheApc extends CacheBase
{
public static $isSupport = false;
/**
* Get instance of CacheApc
*
@ -30,7 +32,6 @@ class CacheApc extends CacheBase
*/
function CacheApc()
{
}
/**
@ -40,7 +41,7 @@ class CacheApc extends CacheBase
*/
function isSupport()
{
return function_exists('apc_add');
return self::$isSupport;
}
/**
@ -83,7 +84,7 @@ class CacheApc extends CacheBase
if($modified_time > 0 && $modified_time > $obj[0])
{
$this->_delete($_key);
$this->delete($key);
return false;
}
@ -109,24 +110,13 @@ class CacheApc extends CacheBase
if($modified_time > 0 && $modified_time > $obj[0])
{
$this->_delete($_key);
$this->delete($key);
return false;
}
return $obj[1];
}
/**
* Delete variable from the cache(private)
*
* @param string $_key Used to store the value.
* @return void
*/
function _delete($_key)
{
$this->put($_key, null, 1);
}
/**
* Delete variable from the cache
*
@ -135,7 +125,8 @@ class CacheApc extends CacheBase
*/
function delete($key)
{
$this->_delete($key);
$_key = md5(_XE_PATH_ . $key);
return apc_delete($_key);
}
/**
@ -148,6 +139,16 @@ class CacheApc extends CacheBase
return apc_clear_cache('user');
}
/**
* @DEPRECATED
*/
function _delete($key)
{
return $this->delete($key);
}
}
CacheApc::$isSupport = function_exists('apc_add');
/* End of file CacheApc.class.php */
/* Location: ./classes/cache/CacheApc.class.php */

View file

@ -6,7 +6,7 @@
*
* Filedisk Cache Handler
*
* @author Arnia Software (xe_dev@arnia.ro)
* @author NAVER (developers@xpressengine.com)
*/
class CacheFile extends CacheBase
{
@ -90,8 +90,15 @@ class CacheFile extends CacheBase
function isValid($key, $modified_time = 0)
{
$cache_file = $this->getCacheFileName($key);
if(file_exists($cache_file))
{
if($modified_time > 0 && filemtime($cache_file) < $modified_timed)
{
FileHandler::removeFile($cache_file);
return false;
}
return true;
}
@ -107,15 +114,19 @@ class CacheFile extends CacheBase
*/
function get($key, $modified_time = 0)
{
$cache_file = FileHandler::exists($this->getCacheFileName($key));
if(!$cache_file = FileHandler::exists($this->getCacheFileName($key)))
{
return false;
}
if($cache_file) $content = include($cache_file);
if(!$content)
if($modified_time > 0 && filemtime($cache_file) < $modified_timed)
{
FileHandler::removeFile($cache_file);
return false;
}
$content = include($cache_file);
return unserialize(stripslashes($content));
}

View file

@ -56,10 +56,11 @@ class CacheMemcache extends CacheBase
*/
function isSupport()
{
if($GLOBALS['XE_MEMCACHE_SUPPORT'])
if(isset($GLOBALS['XE_MEMCACHE_SUPPORT']))
{
return true;
}
if($this->Memcache->set('xe', 'xe', MEMCACHE_COMPRESSED, 1))
{
$GLOBALS['XE_MEMCACHE_SUPPORT'] = true;
@ -68,6 +69,7 @@ class CacheMemcache extends CacheBase
{
$GLOBALS['XE_MEMCACHE_SUPPORT'] = false;
}
return $GLOBALS['XE_MEMCACHE_SUPPORT'];
}

View file

@ -10,6 +10,8 @@
*/
class CacheWincache extends CacheBase
{
public static $isSupport = false;
/**
* Get instance of CacheWincache
*
@ -32,7 +34,6 @@ class CacheWincache extends CacheBase
*/
function CacheWincache()
{
}
/**
@ -42,7 +43,7 @@ class CacheWincache extends CacheBase
*/
function isSupport()
{
return function_exists('wincache_ucache_set');
return self::$isSupport;
}
/**
@ -150,7 +151,8 @@ class CacheWincache extends CacheBase
{
return wincache_ucache_clear();
}
}
CacheWincache::$isSupport = function_exists('wincache_ucache_set');
/* End of file CacheWincache.class.php */
/* Location: ./classes/cache/CacheWincache.class.php */

View file

@ -447,7 +447,7 @@ class DB
$log['act'] = Context::get('act');
$log['time'] = date('Y-m-d H:i:s');
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
$bt = debug_backtrace();
foreach($bt as $no => $call)
{
if($call['function'] == 'executeQuery' || $call['function'] == 'executeQueryArray')

View file

@ -30,11 +30,11 @@ class DBMssql extends DB
var $column_type = array(
'bignumber' => 'bigint',
'number' => 'int',
'varchar' => 'varchar',
'char' => 'char',
'text' => 'text',
'bigtext' => 'text',
'date' => 'varchar(14)',
'varchar' => 'nvarchar',
'char' => 'nchar',
'text' => 'ntext',
'bigtext' => 'ntext',
'date' => 'nvarchar(14)',
'float' => 'float',
);

View file

@ -85,9 +85,9 @@ class DBMysql extends DB
return;
}
// Error appears if the version is lower than 4.1
if(mysql_get_server_info($result) < "4.1")
if(version_compare(mysql_get_server_info($result), '4.1', '<'))
{
$this->setError(-1, "XE cannot be installed under the version of mysql 4.1. Current mysql version is " . mysql_get_server_info());
$this->setError(-1, 'XE cannot be installed under the version of mysql 4.1. Current mysql version is ' . mysql_get_server_info());
return;
}
// select db

View file

@ -39,12 +39,12 @@ class DisplayHandler extends Handler
// Extract contents to display by the request method
if(Context::get('xeVirtualRequestMethod') == 'xml')
{
require_once("./classes/display/VirtualXMLDisplayHandler.php");
require_once(_XE_PATH_ . "classes/display/VirtualXMLDisplayHandler.php");
$handler = new VirtualXMLDisplayHandler();
}
else if(Context::getRequestMethod() == 'XMLRPC')
{
require_once("./classes/display/XMLDisplayHandler.php");
require_once(_XE_PATH_ . "classes/display/XMLDisplayHandler.php");
$handler = new XMLDisplayHandler();
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
{
@ -53,17 +53,17 @@ class DisplayHandler extends Handler
}
else if(Context::getRequestMethod() == 'JSON')
{
require_once("./classes/display/JSONDisplayHandler.php");
require_once(_XE_PATH_ . "classes/display/JSONDisplayHandler.php");
$handler = new JSONDisplayHandler();
}
else if(Context::getRequestMethod() == 'JS_CALLBACK')
{
require_once("./classes/display/JSCallbackDisplayHandler.php");
require_once(_XE_PATH_ . "classes/display/JSCallbackDisplayHandler.php");
$handler = new JSCallbackDisplayHandler();
}
else
{
require_once("./classes/display/HTMLDisplayHandler.php");
require_once(_XE_PATH_ . "classes/display/HTMLDisplayHandler.php");
$handler = new HTMLDisplayHandler();
}
@ -164,12 +164,13 @@ class DisplayHandler extends Handler
array(
'Request / Response info >>> ' . $_SERVER['REQUEST_METHOD'] . ' / ' . Context::getResponseMethod(),
array(
array('Request URI', 'Request method', 'Response method', 'Response contents size'),
array('Request URI', 'Request method', 'Response method', 'Response contents size', 'Memory peak usage'),
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->content_size . ' byte'
$this->content_size . ' byte',
FileHandler::filesize(memory_get_peak_usage())
)
)
),

View file

@ -63,7 +63,7 @@ class HTMLDisplayHandler
// add .x div for adminitration pages
if(Context::getResponseMethod() == 'HTML')
{
if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0)
if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify')
{
$output = '<div class="x">' . $output . '</div>';
}
@ -174,7 +174,7 @@ class HTMLDisplayHandler
$output = preg_replace_callback('!<meta(.*?)(?:\/|)>!is', array($this, '_moveMetaToHeader'), $output);
// change a meta fine(widget often put the tag like <!--Meta:path--> to the content because of caching)
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@]+)-->/is', array($this, '_transMeta'), $output);
// handles a relative path generated by using the rewrite module
if(Context::isAllowRewrite())
@ -396,8 +396,8 @@ class HTMLDisplayHandler
// add common JS/CSS files
if(__DEBUG__)
{
$oContext->loadFile(array('./common/js/jquery.js', 'head', '', -110000), true);
$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -109000), true);
$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true);
$oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true);
$oContext->loadFile(array('./common/js/x.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/common.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/js_app.js', 'head', '', -100000), true);
@ -407,8 +407,8 @@ class HTMLDisplayHandler
}
else
{
$oContext->loadFile(array('./common/js/jquery.min.js', 'head', '', -110000), true);
$oContext->loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -109000), true);
$oContext->loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -111000), true);
$oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true);
$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true);
$oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true);

View file

@ -263,10 +263,6 @@ class ExtraItem
{
$values = explode('|@|', $value);
}
elseif(strpos($value, ',') !== false)
{
$values = explode(',', $value);
}
else
{
$values = array($value);
@ -462,6 +458,8 @@ class ExtraItem
}
if($this->desc)
{
$oModuleController = getController('module');
$oModuleController->replaceDefinedLangCode($this->desc);
$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';
}

View file

@ -26,9 +26,9 @@ class FileHandler
}
/**
* Copy a directory to target
* Copy a directory to target
*
* If target directory does not exist, this function creates it
* If target directory does not exist, this function creates it
*
* @param string $source_dir Path of source directory
* @param string $target_dir Path of target dir
@ -94,7 +94,7 @@ class FileHandler
}
/**
* Copy a file to target
* Copy a file to target
*
* @param string $source Path of source file
* @param string $target Path of target file
@ -119,7 +119,7 @@ class FileHandler
}
/**
* Returns the content of the file
* Returns the content of the file
*
* @param string $filename Path of target file
* @return string The content of the file. If target file does not exist, this function returns nothing.
@ -201,7 +201,7 @@ class FileHandler
}
/**
* Move a directory
* Move a directory
*
* This function just wraps rename function.
*
@ -223,16 +223,16 @@ class FileHandler
* @param string $filter If specified, return only files matching with the filter
* @param bool $to_lower If TRUE, file names will be changed into lower case.
* @param bool $concat_prefix If TRUE, return file name as absolute path
* @return string[] Array of the filenames in the path
* @return string[] Array of the filenames in the path
*/
function readDir($path, $filter = '', $to_lower = FALSE, $concat_prefix = FALSE)
{
$path = self::getRealPath($path);
$output = array();
if(substr($path, -1) != DIRECTORY_SEPARATOR)
if(substr($path, -1) != '/')
{
$path .= DIRECTORY_SEPARATOR;
$path .= '/';
}
if(!is_dir($path))
@ -263,9 +263,9 @@ class FileHandler
$file = sprintf('%s%s', str_replace(_XE_PATH_, '', $path), $file);
}
$output[] = $file;
$output[] = str_replace(array('/\\', '//'), '/', $file);
}
return $output;
}
@ -293,7 +293,7 @@ class FileHandler
else
{
static $oFtp = NULL;
$ftp_info = Context::getFTPInfo();
if($oFtp == NULL)
{
@ -327,10 +327,10 @@ class FileHandler
{
$ftp_path = DIRECTORY_SEPARATOR;
}
$path_string = str_replace(_XE_PATH_, '', $path_string);
$path_list = explode(DIRECTORY_SEPARATOR, $path_string);
$path = _XE_PATH_;
for($i = 0, $c = count($path_list); $i < $c; $i++)
{
@ -338,7 +338,7 @@ class FileHandler
{
continue;
}
$path .= $path_list[$i] . DIRECTORY_SEPARATOR;
$ftp_path .= $path_list[$i] . DIRECTORY_SEPARATOR;
if(!is_dir($path))
@ -346,7 +346,7 @@ class FileHandler
$oFtp->ftp_mkdir($ftp_path);
$oFtp->ftp_site("CHMOD 777 " . $ftp_path);
}
}
}
}
return is_dir($path_string);
@ -394,7 +394,7 @@ class FileHandler
}
/**
* Remove a directory only if it is empty
* Remove a directory only if it is empty
*
* @param string $path Path of the target directory
* @return void
@ -428,7 +428,7 @@ class FileHandler
/**
* Remove files in the target directory
*
* This function keeps the directory structure.
* This function keeps the directory structure.
*
* @param string $path Path of the target directory
* @return void
@ -505,7 +505,7 @@ class FileHandler
*
* If the target is moved (when return code is 300~399), this function follows the location specified response header.
*
* @param string $url The address of the target file
* @param string $url The address of the target file
* @param string $body HTTP request body
* @param int $timeout Connection timeout
* @param string $method GET/POST
@ -618,7 +618,7 @@ class FileHandler
}
/**
* Convert size in string into numeric value
* Convert size in string into numeric value
*
* @see self::filesize()
* @param $val Size in string (ex., 10, 10K, 10M, 10G )
@ -640,13 +640,13 @@ class FileHandler
break;
}
return (int) $val;
return $val;
}
/**
* Check available memory to load image file
* Check available memory to load image file
*
* @param array $imageInfo Image info retrieved by getimagesize function
* @param array $imageInfo Image info retrieved by getimagesize function
* @return bool TRUE: it's ok, FALSE: otherwise
*/
function checkMemoryLoadImage(&$imageInfo)
@ -672,7 +672,7 @@ class FileHandler
*
* @param string $source_file Path of the source file
* @param string $target_file Path of the target file
* @param int $resize_width Width to resize
* @param int $resize_width Width to resize
* @param int $resize_height Height to resize
* @param string $target_type If $target_type is set (gif, jpg, png, bmp), result image will be saved as target type
* @param string $thumbnail_type Thumbnail type(crop, ratio)
@ -827,7 +827,7 @@ class FileHandler
imagecopyresized($thumb, $source, $x, $y, 0, 0, $new_width, $new_height, $width, $height);
}
// create directory
// create directory
self::makeDir(dirname($target_file));
// write into the file
@ -957,13 +957,13 @@ class FileHandler
}
/**
* Returns a file object
* Returns a file object
*
* If the directory of the file does not exist, create it.
*
* @param string $filename Target file name
* @param string $mode File mode for fopen
* @return FileObject File object
* @return FileObject File object
*/
function openFile($filename, $mode)
{

View file

@ -148,7 +148,7 @@ class XEHttpRequest
$is_chunked = FALSE;
while(strlen(trim($line = fgets($sock))))
{
list($equiv, $content) = preg_split('/ *: */', rtrim($line), 1);
list($equiv, $content) = preg_split('/ *: */', rtrim($line), 2);
if(!strcasecmp($equiv, 'Transfer-Encoding') && $content == 'chunked')
{
$is_chunked = TRUE;
@ -163,7 +163,7 @@ class XEHttpRequest
$chunk_size = hexdec(fgets($sock));
if($chunk_size)
{
$body .= fread($sock, $chunk_size);
$body .= fgets($sock, $chunk_size+1);
}
}
else

View file

@ -45,8 +45,12 @@ class ModuleHandler extends Handler
$oContext = Context::getInstance();
if($oContext->isSuccessInit == FALSE)
{
$this->error = 'msg_invalid_request';
return;
$logged_info = Context::get('logged_info');
if($logged_info->is_admin != "Y")
{
$this->error = 'msg_invalid_request';
return;
}
}
// Set variables from request arguments
@ -155,13 +159,22 @@ class ModuleHandler extends Handler
{
// If it exists, compare mid based on the module information
// if mids are not matching, set it as the document's mid
if(!$this->mid || ($this->mid && $this->mid != $module_info->mid) || ($this->module_srl && $this->module_srl != $module_info->module_srl))
if(!$this->mid || ($this->mid != $module_info->mid))
{
$this->mid = $module_info->mid;
header('location:' . getNotEncodedSiteUrl($site_info->domain, 'mid', $this->mid, 'document_srl', $this->document_srl, 'module_srl',''));
return FALSE;
if(Context::getRequestMethod() == 'GET')
{
$this->mid = $module_info->mid;
header('location:' . getNotEncodedSiteUrl($site_info->domain, 'mid', $this->mid, 'document_srl', $this->document_srl));
return FALSE;
}
else
{
$this->mid = $module_info->mid;
Context::set('mid', $this->mid);
}
}
// if requested module is different from one of the document, remove the module information retrieved based on the document number
if($this->module && $module_info->module != $this->module)
{
@ -1012,7 +1025,7 @@ class ModuleHandler extends Handler
}
// Get base class name and load the file contains it
if(!class_exists($module))
if(!class_exists($module, false))
{
$high_class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module);
if(!file_exists($high_class_file))
@ -1030,7 +1043,7 @@ class ModuleHandler extends Handler
// Create an instance with eval function
require_once($class_file);
if(!class_exists($instance_name))
if(!class_exists($instance_name, false))
{
return NULL;
}

View file

@ -590,37 +590,55 @@ class EmbedFilter
/**
* Make white domain list cache file from xml config file.
* @param $whitelist array
* @return void
*/
function _makeWhiteDomainList()
function _makeWhiteDomainList($whitelist = NULL)
{
$whiteUrlXmlFile = FileHandler::getRealPath($this->whiteUrlXmlFile);
$whiteUrlCacheFile = FileHandler::getRealPath($this->whiteUrlCacheFile);
$isMake = false;
$isMake = FALSE;
if(!file_exists($whiteUrlCacheFile))
{
$isMake = true;
$isMake = TRUE;
}
if(file_exists($whiteUrlCacheFile) && filemtime($whiteUrlCacheFile) < filemtime($whiteUrlXmlFile))
{
$isMake = true;
$isMake = TRUE;
}
if(gettype($whitelist) == 'array' && gettype($whitelist['object']) == 'array' && gettype($whitelist['iframe']) == 'array')
{
$isMake = FALSE;
}
if(isset($whitelist) && gettype($whitelist) == 'object')
{
$isMake = TRUE;
}
if($isMake)
{
$xmlBuff = FileHandler::readFile($this->whiteUrlXmlFile);
$whiteUrlList = array();
$whiteIframeUrlList = array();
$xmlParser = new XmlParser();
$domainListObj = $xmlParser->parse($xmlBuff);
$embedDomainList = $domainListObj->whiteurl->embed->domain;
$iframeDomainList = $domainListObj->whiteurl->iframe->domain;
$buff = '<?php if(!defined("__XE__")) exit();';
$buff .= '$whiteUrlList = array();';
$buff .= '$whiteIframeUrlList = array();';
if(is_array($embedDomainList))
if(gettype($whitelist->object) == 'array' && gettype($whitelist->iframe) == 'array')
{
$whiteUrlList = $whitelist->object;
$whiteIframeUrlList = $whitelist->iframe;
}
else
{
$xmlBuff = FileHandler::readFile($this->whiteUrlXmlFile);
$xmlParser = new XmlParser();
$domainListObj = $xmlParser->parse($xmlBuff);
$embedDomainList = $domainListObj->whiteurl->embed->domain;
$iframeDomainList = $domainListObj->whiteurl->iframe->domain;
if(!is_array($embedDomainList)) $embedDomainList = array();
if(!is_array($iframeDomainList)) $iframeDomainList = array();
foreach($embedDomainList AS $key => $value)
{
$patternList = $value->pattern;
@ -628,16 +646,15 @@ class EmbedFilter
{
foreach($patternList AS $key => $value)
{
$buff .= sprintf('$whiteUrlList[] = \'%s\';', $value->body);
$whiteUrlList[] = $value->body;
}
}
else
$buff .= sprintf('$whiteUrlList[] = \'%s\';', $patternList->body);
{
$whiteUrlList[] = $patternList->body;
}
}
}
if(is_array($iframeDomainList))
{
foreach($iframeDomainList AS $key => $value)
{
$patternList = $value->pattern;
@ -645,20 +662,39 @@ class EmbedFilter
{
foreach($patternList AS $key => $value)
{
$buff .= sprintf('$whiteIframeUrlList[] = \'%s\';', $value->body);
$whiteIframeUrlList[] = $value->body;
}
}
else
$buff .= sprintf('$whiteIframeUrlList[] = \'%s\';', $patternList->body);
{
$whiteIframeUrlList[] = $patternList->body;
}
}
}
if(Context::getDefaultUrl())
$db_info = Context::getDBInfo();
if($db_info->embed_white_object)
{
$buff .= sprintf('$whiteIframeUrlList[] = \'%s\';', Context::getDefaultUrl());
$whiteUrlList = array_merge($whiteUrlList, $db_info->embed_white_object);
}
$buff .= '?>';
FileHandler::writeFile($this->whiteUrlCacheFile, $buff);
if($db_info->embed_white_iframe)
{
$whiteIframeUrlList = array_merge($whiteIframeUrlList, $db_info->embed_white_iframe);
}
$whiteUrlList = array_unique($whiteUrlList);
$whiteIframeUrlList = array_unique($whiteIframeUrlList);
asort($whiteUrlList);
asort($whiteIframeUrlList);
$buff = array();
$buff[] = '<?php if(!defined("__XE__")) exit();';
$buff[] = '$whiteUrlList = ' . var_export($whiteUrlList, TRUE) . ';';
$buff[] = '$whiteIframeUrlList = ' . var_export($whiteIframeUrlList, TRUE) . ';';
FileHandler::writeFile($this->whiteUrlCacheFile, implode(PHP_EOL, $buff));
}
}

View file

@ -7,22 +7,8 @@
<pattern>http://event.dn.naver.com/sbsplayer/vmplayer.xap</pattern>
</domain>
<domain name="" isNAVER="true" desc="네이버 뮤직 서비스">
<pattern>http://test-player.naver.com/naverPlayer/posting/</pattern>
<pattern>http://alpha-player.naver.com/naverPlayer/posting/</pattern>
<pattern>http://beta-player.naver.com/naverPlayer/posting/</pattern>
<pattern>http://musicplayer.naver.com/naverPlayer/posting/</pattern>
<pattern>http://player.music.naver.com/naverPlayer/posting/</pattern>
<pattern>http://dev.player.music.naver.com/</pattern>
<pattern>http://test.player.music.naver.com/</pattern>
<pattern>http://qa.player.music.naver.com/</pattern>
<pattern>http://staging.player.music.naver.com/</pattern>
<pattern>http://alpha.player.music.naver.com/</pattern>
<pattern>http://beta.player.music.naver.com/</pattern>
<pattern>http://stage.player.music.naver.com/</pattern>
</domain>
<domain name="" isNAVER="true" desc="네이버 아이두게임">
<pattern>http://dev-idogame.hangame.com/idogame/ClientBin/iDoGamePlayer.xap</pattern>
<pattern>http://idogame.hangame.com/idogame/ClientBin/iDoGamePlayer.xap</pattern>
</domain>
<domain name="http://www.daum.net" desc="다음">
<pattern>http://flvs.daum.net/flvPlayer.swf</pattern>
@ -55,101 +41,17 @@
<pattern>http://play.tagstory.com/player/</pattern>
<pattern>http://www.tagstory.com/player/basic/</pattern>
</domain>
<domain name="http://www.pullbbang.com" desc="풀빵닷컴">
<pattern>http://play.pullbbang.com/</pattern>
</domain>
<domain name="" desc="미래에셋 미디어">
<pattern>http://media.miraeasset.com/swf/</pattern>
</domain>
<domain name="" desc="서울시 인터넷방송">
<pattern>http://tv.seoul.go.kr/common/player/posting/window_media_player.asp</pattern>
<pattern>http://stream.seoul.go.kr</pattern>
</domain>
<domain name="" desc="게임스팟 동영상">
<pattern>mms://vod.gamespot.lgcdn.com/</pattern>
<pattern>http://image.com/</pattern>
</domain>
<domain name="" desc="광고정보센터">
<pattern>mms://media.adic.co.kr/</pattern>
<pattern>http://static.adwaple.net/</pattern>
</domain>
<domain name="" desc="비법닷컴">
<pattern>http://www.vipup.com/scrap/scrap.asp</pattern>
</domain>
<domain name="" desc="영상 역사관">
<pattern>mms://125.60.2.110/e_history/</pattern>
<pattern>mms://218.38.152.33/e_history/</pattern>
<pattern>http://125.60.2.110/e_history/</pattern>
<pattern>http://218.38.152.33/e_history/</pattern>
</domain>
<domain name="" desc="중소기업청">
<pattern>http://www.smba.go.kr/mov/</pattern>
</domain>
<domain name="" desc="트라트라고">
<pattern>http://ucc.tlatlago.com/html/uccPlayer/</pattern>
</domain>
<domain name="" desc="싸이월드">
<pattern>http://dbi.video.cyworld.com/v.sk/</pattern>
</domain>
<domain name="" desc="이글루스 동영상">
<pattern>http://v.egloos.com/v.sk/</pattern>
</domain>
<domain name="" desc="뮤직쉐이크">
<pattern>http://www.musicshake.com/musicshakePlayer.swf</pattern>
<pattern>http://eng.musicshake.com/musicshakePlayer.swf</pattern>
<pattern>http://us.musicshake.com/musicshakePlayer.swf</pattern>
<pattern>http://ip.musicshake.com/musicshakePlayer.swf</pattern>
</domain>
<domain name="" desc="아프리카">
<pattern>http://live.afreeca.com:8057/</pattern>
<pattern>http://afbbs.afreeca.com:8080/</pattern>
</domain>
<domain name="" desc="플레이NC">
<pattern>http://static.plaync.co.kr/plaza/</pattern>
</domain>
<domain name="" desc="XTM">
<pattern>http://img.xtmtv.com/images/</pattern>
</domain>
<domain name="" desc="아이서브">
<pattern>http://tv.co.kr/pum/tvcell_basic.swf</pattern>
<pattern>http://tv.co.kr/pum/tvcell_mini.swf</pattern>
</domain>
<domain name="" desc="UC씽">
<pattern>http://ucsing.mnet.com/L_swf/ucsing_player.swf</pattern>
<pattern>http://flvfile.mnet.com</pattern>
</domain>
<domain name="http://www.snaps.co.kr" desc="SNAPS">
<pattern>http://www.snaps.co.kr/swf/LinkedApp.swf</pattern>
</domain>
<domain name="http://www.nate.com" desc="네이트">
<pattern>http://v.nate.com/v.sk/</pattern>
<pattern>http://w.blogdoc.nate.com/</pattern>
<pattern>http://blogdoc.nate.com/flash/blogdoc_widget_reco.swf</pattern>
</domain>
<domain name="http://www.paoin.com" desc="파오인 신문지면 뷰어">
<pattern>http://www.paoin.com/Common/swf/ArticleViewer02.swf</pattern>
<pattern>http://thumb.paoin.com/paoweb/common/flash/ArticleViewer02.swf</pattern>
<pattern>http://thumb.paoin.com/paoweb/common/flash/ArticleShare.swf</pattern>
</domain>
<domain name="http://www.atzine.com" desc="엣진 서비스">
<pattern>http://www.atzine.com/swf/TakeOutWrapper.swf?</pattern>
</domain>
<domain name="http://www.ohmynews.com" desc="오마이뉴스">
<pattern>http://www.ohmynews.com/</pattern>
</domain>
<domain name="http://www.jjanglive.com" desc="짱라이브 위젯">
<pattern>http://www.jjanglive.com/flash/webClient.swf</pattern>
<pattern>http://www.jjanglive.com/flash/AdShowClient.swf</pattern>
</domain>
<domain name="http://www.pmang.com" desc="피망">
<pattern>http://file.pmang.com/images/pmang/fifaonline/season2/img/squad/squadmaker_ot.swf</pattern>
<pattern>http://fifaonline.pmang.com/squad/t.nwz</pattern>
<pattern>http://file.pmang.com/images/pmang/gamepub/player/pm_player.swf</pattern>
<pattern>http://www.pmang.com/gamepub/media/player.nwz</pattern>
</domain>
<domain name="http://www.ccmpia.com" desc="CCMPIA">
<pattern>http://www.ccmpia.com/scripts/bgm2.php</pattern>
</domain>
<domain name="http://www.kbs.co.kr" desc="KBS">
<pattern>http://www.kbs.co.kr/zzim/vmplayer/vmplayer.xap</pattern>
<pattern>http://vmark.kbs.co.kr/zzim/vmplayer/vmplayer.xap</pattern>
@ -163,35 +65,6 @@
<domain name="http://www.imbc.com" desc="MBC">
<pattern>http://onemore.imbc.com/ClientBin/oneplus.xap</pattern>
</domain>
<domain name="http://www.xtmtv.com" desc="XTM">
<pattern>http://www.xtmtv.com/xtmPlayer/javascript/XTM_Scrap_Player.swf</pattern>
</domain>
<domain name="http://www.chtvn.com" desc="TVN">
<pattern>http://player.chtvn.com/tvN_Scrap_Player.swf?</pattern>
</domain>
<domain name="http://www.detailview.co.kr" desc="디테일뷰">
<pattern>http://storage.detailview.co.kr/</pattern>
<pattern>http://beta.detailview.co.kr/</pattern>
</domain>
<domain name="http://www.brightcove.com" desc="Brightcove">
<pattern>http://c.brightcove.com/services/viewer</pattern>
</domain>
<domain name="http://www.hyundai-kiamotors.com" desc="현대기아자동차">
<pattern>http://vod.hyundai-kiamotors.com/Flash/PlayerTest/WebPlayer.swf</pattern>
</domain>
<domain name="http://www.techdays.co.kr" desc="techdays">
<pattern>http://www.techdays.co.kr/2010spring/remix10/ClientBin/MediaPlayerTemplate.xap</pattern>
<pattern>http://www.microsoft.com</pattern>
</domain>
<domain name="http://www.wowplan.co.kr" desc="와우플랜">
<pattern>http://www.wowplan.co.kr/schedule/bin-debug/scheduleBlogPost.swf</pattern>
</domain>
<domain name="http://www.allblet.net" desc="allblet.net">
<pattern>http://showman.allblet.net/abp.swf</pattern>
</domain>
<domain name="http://dotsub.com" desc="dotsub.com">
<pattern>http://dotsub.com/static/players/portalplayer.swf</pattern>
</domain>
<domain name="" isNAVER="true" desc="socialsearch">
<pattern>http://static.campaign.naver.com/0/campaign/2010/10/socialsearch/swf/</pattern>
</domain>
@ -203,8 +76,8 @@
<pattern>http://www.youtube-nocookie.com/</pattern>
<pattern>https://www.youtube-nocookie.com/</pattern>
<pattern>//www.youtube.com/v/</pattern>
<pattern>//www.youtube-nocookie.com/</pattern>
<pattern>//www.youtube.com/embed/</pattern>
<pattern>//www.youtube-nocookie.com/</pattern>
</domain>
<domain name="http://maps.google.com" desc="구글맵스" mobile="true">
<pattern>http://maps.google.com/</pattern>
@ -213,25 +86,9 @@
<domain name="http://flvs.daum.net" desc="다음 TV 팟 동영상" mobile="false">
<pattern>http://flvs.daum.net/</pattern>
</domain>
<domain name="http://play.pullbbang.com" desc="풀빵 동영상" mobile="false">
<pattern>http://play.pullbbang.com/#.swf</pattern>
</domain>
<domain name="" desc="게임스팟 동영상">
<pattern>http://www.gamespot.com</pattern>
</domain>
<domain name="http://www.sbs.co.kr" desc="SBS">
<pattern>http://sbsplayer.sbs.co.kr/</pattern>
</domain>
<domain name="http://www.techdays.co.kr" desc="techdays">
<pattern>http://www.techdays.co.kr/2010spring/remix10/ClientBin/MediaPlayerTemplate.xap</pattern>
<pattern>http://www.microsoft.com</pattern>
</domain>
<domain name="http://dotsub.com" desc="dotsub.com">
<pattern>http://dotsub.com/</pattern>
</domain>
<domain name="http://www.travelro.co.kr" desc="트래블로">
<pattern>http://www.travelro.co.kr/</pattern>
</domain>
<domain name="http://www.vimeo.com" desc="vimeo.com">
<pattern>http://player.vimeo.com/</pattern>
</domain>

View file

@ -116,7 +116,7 @@ class TemplateHandler
*/
public function compile($tpl_path, $tpl_filename, $tpl_file = '')
{
$buff = '';
$buff = false;
// store the starting time for debug information
if(__DEBUG__ == 3)
@ -159,7 +159,7 @@ class TemplateHandler
}
}
if(!$buff)
if($buff === FALSE)
{
$buff = $this->parse();
if($oCacheHandler->isSupport())

View file

@ -667,7 +667,7 @@ class Validator
}
// current language
$lang_type = class_exists('Context') ? Context::getLangType() : 'en';
$lang_type = class_exists('Context', false) ? Context::getLangType() : 'en';
// check the file
$filepath = $dir . '/' . md5($this->_version . ' ' . $this->_xml_path) . ".{$lang_type}.js";
@ -706,7 +706,7 @@ class Validator
list($ruleset) = explode('.', $ruleset);
// current language
$lang_type = class_exists('Context') ? Context::getLangType() : 'en';
$lang_type = class_exists('Context', false) ? Context::getLangType() : 'en';
// custom rulesets
$addrules = array();

View file

@ -45,6 +45,10 @@ a img {
}
}
.xe-widget-wrapper {
overflow: hidden;
}
/* Popup Menu Area */
#popup_menu_area {
position: absolute;

View file

@ -59,9 +59,9 @@ if(jQuery) jQuery.noConflict();
if(typeof(options.wrap) == "string") options.wrap ='#'+options.wrap;
if(options.wrap) {
obj = $(options.wrap).find('input[name='+itemName+']:checkbox');
obj = $(options.wrap).find('input[name="'+itemName+'"]:checkbox');
} else {
obj = $('input[name='+itemName+']:checkbox');
obj = $('input[name="'+itemName+'"]:checkbox');
}
if(options.checked == 'toggle') {

2
common/js/x.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -58,9 +58,9 @@ if(jQuery) jQuery.noConflict();
if(typeof(options.wrap) == "string") options.wrap ='#'+options.wrap;
if(options.wrap) {
obj = $(options.wrap).find('input[name='+itemName+']:checkbox');
obj = $(options.wrap).find('input[name="'+itemName+'"]:checkbox');
} else {
obj = $('input[name='+itemName+']:checkbox');
obj = $('input[name="'+itemName+'"]:checkbox');
}
if(options.checked == 'toggle') {

2
common/js/xe.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@
</block>
<!-- JS -->
<block loop="$js_files=>$key,$js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block>
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--></block></block>
<script src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><![endif]--></block>
</block>

View file

@ -9,11 +9,11 @@
*/
if(version_compare(PHP_VERSION, '5.4.0', '<'))
{
@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING);
}
else
{
@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT);
@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING ^ E_STRICT);
}
if(!defined('__XE__'))
@ -29,7 +29,7 @@ define('__ZBXE__', __XE__);
/**
* Display XE's full version.
*/
define('__XE_VERSION__', '1.7.4-beta.6');
define('__XE_VERSION__', '1.7.5-beta1');
/**
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
@ -45,11 +45,6 @@ define('_XE_PATH_', str_replace('config/config.inc.php', '', str_replace('\\', '
// Set can use other method instead cookie to store session id(for file upload)
ini_set('session.use_only_cookies', 0);
// Set Real IP Address of Client.
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
if(file_exists(_XE_PATH_ . 'config/package.inc.php'))
{

View file

@ -758,7 +758,7 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
}
static $firephp;
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
$bt = debug_backtrace();
if(is_array($bt))
{
$bt_debug_print = array_shift($bt);
@ -776,7 +776,7 @@ function debugPrint($debug_output = NULL, $display_option = TRUE, $file = '_debu
}
$type = FirePHP::INFO;
$label = sprintf('[%s:%d] %s() (m:%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()));
$label = sprintf('[%s:%d] %s() (Memory usage: current=%s, peak=%s)', $file_name, $line_num, $function, FileHandler::filesize(memory_get_usage()), FileHandler::filesize(memory_get_peak_usage()));
// Check a FirePHP option
if($display_option === 'TABLE')

View file

@ -98,8 +98,9 @@ class addonAdminModel extends addon
// Add the path (files/addons precedence)
$path = $this->getAddonPath($addon_name);
// Wanted information on the add-on
unset($info);
$info = $this->getAddonInfoXml($addon_name, $site_srl, $gtype);
if(!$info) $info = new stdClass();
$info->addon = $addon_name;
$info->path = $path;
@ -255,7 +256,16 @@ class addonAdminModel extends addon
foreach($extra_vars as $key => $val)
{
if(!$val)
{
continue;
}
$obj = new stdClass();
if(!$val->attrs)
{
$val->attrs = new stdClass();
}
if(!$val->attrs->type)
{
$val->attrs->type = 'text';
@ -341,6 +351,11 @@ class addonAdminModel extends addon
$addon_info->extra_vars = array();
foreach($extra_vars as $key => $val)
{
if(!$val)
{
continue;
}
$obj = new stdClass();
$obj->group = $group->title->body;

View file

@ -490,7 +490,7 @@ class adminAdminController extends admin
$db_info->use_sitelock = ($vars->use_sitelock) ? $vars->use_sitelock : 'N';
$db_info->sitelock_title = $vars->sitelock_title;
$db_info->sitelock_message = $vars->sitelock_message;
$whitelist = $vars->sitelock_whitelist;
$whitelist = preg_replace("/[\r|\n|\r\n]+/",",",$whitelist);
$whitelist = preg_replace("/\s+/","",$whitelist);
@ -498,23 +498,22 @@ class adminAdminController extends admin
{
$whitelist = '';
}
$whitelist .= ',127.0.0.1';
$whitelist .= ',127.0.0.1,' . $_SERVER['REMOTE_ADDR'];
$whitelist = explode(',',trim($whitelist, ','));
$whitelist = array_unique($whitelist);
if(!IpFilter::validate($whitelist)) {
return new Object(-1, 'msg_invalid_ip');
}
$db_info->sitelock_whitelist = $whitelist;
$oInstallController = getController('install');
if(!$oInstallController->makeConfigFile())
{
return new Object(-1, 'msg_invalid_request');
}
if(!in_array(Context::getRequestMethod(), array('XMLRPC','JSON')))
{
$returnUrl = Context::get('success_return_url');
@ -522,12 +521,50 @@ class adminAdminController extends admin
header('location:' . $returnUrl);
return;
}
}
function procAdminUpdateEmbedWhitelist()
{
$vars = Context::getRequestVars();
$db_info = Context::getDbInfo();
$white_object = $vars->embed_white_object;
$white_object = preg_replace("/[\r\n|\r|\n]+/", '|@|', $white_object);
$white_object = preg_replace("/[\s\'\"]+/", '', $white_object);
$white_object = explode('|@|', $white_object);
$white_object = array_unique($white_object);
$white_iframe = $vars->embed_white_iframe;
$white_iframe = preg_replace("/[\r\n|\r|\n]+/", '|@|', $white_iframe);
$white_iframe = preg_replace("/[\s\'\"]+/", '', $white_iframe);
$white_iframe = explode('|@|', $white_iframe);
$white_iframe = array_unique($white_iframe);
$whitelist = new stdClass;
$whitelist->object = $white_object;
$whitelist->iframe = $white_iframe;
$db_info->embed_white_object = $white_object;
$db_info->embed_white_iframe = $white_iframe;
$oInstallController = getController('install');
if(!$oInstallController->makeConfigFile())
{
return new Object(-1, 'msg_invalid_request');
}
require_once(_XE_PATH_ . 'classes/security/EmbedFilter.class.php');
$oEmbedFilter = EmbedFilter::getInstance();
$oEmbedFilter->_makeWhiteDomainList($whitelist);
if(!in_array(Context::getRequestMethod(), array('XMLRPC','JSON')))
{
$returnUrl = Context::get('success_return_url');
if(!$returnUrl) $returnUrl = getNotEncodedUrl('', 'act', 'dispAdminConfigGeneral');
header('location:' . $returnUrl);
return;
}
}
}

View file

@ -95,6 +95,81 @@ class adminAdminModel extends admin
}
}
function getFTPPath()
{
$ftp_info = Context::getRequestVars();
if(!$ftp_info->ftp_host)
{
$ftp_info->ftp_host = "127.0.0.1";
}
if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port))
{
$ftp_info->ftp_port = '22';
}
$connection = ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port);
if(!$connection)
{
return new Object(-1, sprintf(Context::getLang('msg_ftp_not_connected'), $ftp_host));
}
$login_result = @ftp_login($connection, $ftp_info->ftp_user, $ftp_info->ftp_password);
if(!$login_result)
{
ftp_close($connection);
return new Object(-1, 'msg_ftp_invalid_auth_info');
}
// create temp file
$pin = $_SERVER['REQUEST_TIME'];
FileHandler::writeFile('./files/cache/ftp_check', $pin);
// create path candidate
$xe_path = _XE_PATH_;
$path_info = array_reverse(explode('/', _XE_PATH_));
array_pop($path_info); // remove last '/'
$path_candidate = array();
$temp = '';
foreach($path_info as $path)
{
$temp = '/' . $path . $temp;
$path_candidate[] = $temp;
}
// try
foreach($path_candidate as $path)
{
// upload check file
if(!ftp_put($connection, $path . 'ftp_check.html', FileHandler::getRealPath('./files/cache/ftp_check'), FTP_BINARY))
{
continue;
}
// get check file
$result = FileHandler::getRemoteResource(getNotencodedFullUrl() . 'ftp_check.html');
// delete temp check file
ftp_delete($connection, $path . 'ftp_check.html');
// found
if($result == $pin)
{
$found_path = $path;
break;
}
}
FileHandler::removeFile('./files/cache/ftp_check', $pin);
if($found_path)
{
$this->add('found_path', $found_path);
}
}
/**
* Find XE installed path on ftp
*/
@ -130,6 +205,15 @@ class adminAdminModel extends admin
return $this->getSFTPPath();
}
if($ftp_info->ftp_pasv == 'N')
{
if(function_exists('ftp_connect'))
{
return $this->getFTPPath();
}
$ftp_info->ftp_pasv = "Y";
}
$oFTP = new ftp();
if(!$oFTP->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port))
{
@ -350,7 +434,7 @@ class adminAdminModel extends admin
$info['module'] = '';
$oModuleModel = getModel('module');
$module_list = $oModuleModel->getModuleList();
foreach($module_list as $module)
if($module_list) foreach($module_list as $module)
{
if(in_array($module->module, $skip['module']))
{
@ -363,7 +447,7 @@ class adminAdminModel extends admin
$info['addon'] = '';
$oAddonAdminModel = getAdminModel('addon');
$addon_list = $oAddonAdminModel->getAddonList();
foreach($addon_list as $addon)
if($addon_list) foreach($addon_list as $addon)
{
if(in_array($addon->addon, $skip['addon']))
{
@ -376,7 +460,7 @@ class adminAdminModel extends admin
$info['layout'] = "";
$oLayoutModel = getModel('layout');
$layout_list = $oLayoutModel->getDownloadedLayoutList();
foreach($layout_list as $layout)
if($layout_list) foreach($layout_list as $layout)
{
if(in_array($layout->layout, $skip['layout']))
{
@ -389,7 +473,7 @@ class adminAdminModel extends admin
$info['widget'] = "";
$oWidgetModel = getModel('widget');
$widget_list = $oWidgetModel->getDownloadedWidgetList();
foreach($widget_list as $widget)
if($widget_list) foreach($widget_list as $widget)
{
if(in_array($widget->widget, $skip['widget']))
{
@ -402,7 +486,7 @@ class adminAdminModel extends admin
$info['widgetstyle'] = "";
$oWidgetModel = getModel('widget');
$widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList();
foreach($widgetstyle_list as $widgetstyle)
if($widgetstyle_list) foreach($widgetstyle_list as $widgetstyle)
{
if(in_array($widgetstyle->widgetStyle, $skip['widgetstyle']))
{

View file

@ -138,19 +138,15 @@ class adminAdminView extends admin
$lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
$result = $oAdminAdminModel->checkAdminMenu();
if(!$result->php_file)
{
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
Context::close();
exit;
}
include $result->php_file;
$oModuleModel = getModel('module');
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
// get current menu's subMenuTitle
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
$currentAct = Context::get('act');
$subMenuTitle = '';
foreach((array) $moduleActionInfo->menu as $key => $value)
{
if(isset($value->acts) && is_array($value->acts) && in_array($currentAct, $value->acts))
@ -159,48 +155,26 @@ class adminAdminView extends admin
break;
}
}
// get current menu's srl(=parentSrl)
$parentSrl = 0;
$oMenuAdminConroller = getAdminController('menu');
if(!$_SESSION['isMakeXml'])
foreach((array) $menu->list as $parentKey => $parentMenu)
{
foreach((array) $menu->list as $parentKey => $parentMenu)
if(!is_array($parentMenu['list']) || !count($parentMenu['list']))
{
if(!$parentMenu['text'])
{
$oMenuAdminConroller->makeXmlFile($result->menu_srl);
$_SESSION['isMakeXml'] = true;
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
Context::close();
exit;
}
continue;
}
if($parentMenu['href'] == '#' && count($parentMenu['list']))
{
$firstChild = current($parentMenu['list']);
$menu->list[$parentKey]['href'] = $firstChild['href'];
}
if(!is_array($parentMenu['list']) || !count($parentMenu['list']))
foreach($parentMenu['list'] as $childKey => $childMenu)
{
if($subMenuTitle == $childMenu['text'] && $parentSrl == 0)
{
continue;
}
if($parentMenu['href'] == '#' && count($parentMenu['list']))
{
$firstChild = current($parentMenu['list']);
$menu->list[$parentKey]['href'] = $firstChild['href'];
}
foreach($parentMenu['list'] as $childKey => $childMenu)
{
if(!$childMenu['text'])
{
$oMenuAdminConroller->makeXmlFile($result->menu_srl);
$_SESSION['isMakeXml'] = true;
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
Context::close();
exit;
}
if($subMenuTitle == $childMenu['text'])
{
$parentSrl = $childMenu['parent_srl'];
break;
}
$parentSrl = $childMenu['parent_srl'];
}
}
}
@ -413,8 +387,11 @@ class adminAdminView extends admin
Context::set('langs', Context::loadLangSupported());
// site lock
Context::set('IP', $_SERVER['REMOTE_ADDR']);
if(!$db_info->sitelock_title) $db_info->sitelock_title = 'Maintenance in progress...';
if(!in_array('127.0.0.1', $db_info->sitelock_whitelist)) $db_info->sitelock_whitelist[] = '127.0.0.1';
if(!in_array($_SERVER['REMOTE_ADDR'], $db_info->sitelock_whitelist)) $db_info->sitelock_whitelist[] = $_SERVER['REMOTE_ADDR'];
$db_info->sitelock_whitelist = array_unique($db_info->sitelock_whitelist);
Context::set('remote_addr', $_SERVER['REMOTE_ADDR']);
Context::set('use_sitelock', $db_info->use_sitelock);
Context::set('sitelock_title', $db_info->sitelock_title);
@ -423,6 +400,7 @@ class adminAdminView extends admin
$whitelist = implode("\r\n", $db_info->sitelock_whitelist);
Context::set('sitelock_whitelist', $whitelist);
if($db_info->admin_ip_list) $admin_ip_list = implode("\r\n", $db_info->admin_ip_list);
else $admin_ip_list = '';
Context::set('admin_ip_list', $admin_ip_list);
@ -439,13 +417,17 @@ class adminAdminView extends admin
$config = $oDocumentModel->getDocumentConfig();
Context::set('thumbnail_type', $config->thumbnail_type);
Context::set('IP', $_SERVER['REMOTE_ADDR']);
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('module');
Context::set('siteTitle', $config->siteTitle);
Context::set('htmlFooter', $config->htmlFooter);
// embed filter
require_once(_XE_PATH_ . 'classes/security/EmbedFilter.class.php');
$oEmbedFilter = EmbedFilter::getInstance();
context::set('embed_white_object', implode(PHP_EOL, $oEmbedFilter->whiteUrlList));
context::set('embed_white_iframe', implode(PHP_EOL, $oEmbedFilter->whiteIframeUrlList));
$columnList = array('modules.mid', 'modules.browser_title', 'sites.index_module_srl');
$start_module = $oModuleModel->getSiteInfo(0, $columnList);

View file

@ -91,8 +91,8 @@ class admin extends ModuleObject
if(!$output->menu_srl)
{
$oAdminClass = getClass('admin');
$oAdminClass->createXeAdminMenu();
$this->createXeAdminMenu();
$output = $oMenuAdminModel->getMenuByTitle($this->adminMenuName);
}
else
{
@ -123,10 +123,9 @@ class admin extends ModuleObject
//insert menu
$args = new stdClass();
$args->title = $this->adminMenuName;
$args->menu_srl = getNextSequence();
$menuSrl = $args->menu_srl = getNextSequence();
$args->listorder = $args->menu_srl * -1;
$output = executeQuery('menu.insertMenu', $args);
$menuSrl = $args->menu_srl;
Context::set('admin_menu_srl', $menuSrl);
unset($args);
@ -182,74 +181,70 @@ class admin extends ModuleObject
'subMenu' => array('comment'),
),
4 => array(
'module' => 'trackback',
'subMenu' => array('trackback'),
),
5 => array(
'module' => 'file',
'subMenu' => array('file'),
),
6 => array(
5 => array(
'module' => 'poll',
'subMenu' => array('poll'),
),
7 => array(
6 => array(
'module' => 'rss',
'subMenu' => array('rss'),
),
8 => array(
7 => array(
'module' => 'module',
'subMenu' => array('multilingual'),
),
9 => array(
8 => array(
'module' => 'importer',
'subMenu' => array('importer'),
),
10 => array(
9 => array(
'module' => 'trash',
'subMenu' => array('trash'),
),
11 => array(
10 => array(
'module' => 'autoinstall',
'subMenu' => array('easyInstall'),
),
12 => array(
11 => array(
'module' => 'layout',
'subMenu' => array('installedLayout'),
),
13 => array(
12 => array(
'module' => 'module',
'subMenu' => array('installedModule'),
),
14 => array(
13 => array(
'module' => 'widget',
'subMenu' => array('installedWidget'),
),
15 => array(
14 => array(
'module' => 'addon',
'subMenu' => array('installedAddon'),
),
16 => array(
15 => array(
'module' => 'editor',
'subMenu' => array('editor'),
),
17 => array(
16 => array(
'module' => 'spamfilter',
'subMenu' => array('spamFilter'),
),
18 => array(
17 => array(
'module' => 'admin',
'subMenu' => array('adminConfigurationGeneral', 'adminConfigurationFtp', 'adminMenuSetup'),
),
19 => array(
18 => array(
'module' => 'file',
'subMenu' => array('fileUpload'),
),
20 => array(
19 => array(
'module' => 'module',
'subMenu' => array('filebox'),
),
21 => array(
20 => array(
'module' => 'point',
'subMenu' => array('point')
),
@ -319,7 +314,6 @@ class admin extends ModuleObject
break;
case 'document':
case 'comment':
case 'trackback':
case 'file':
case 'poll':
case 'rss':
@ -368,7 +362,6 @@ class admin extends ModuleObject
break;
case 'document':
case 'comment':
case 'trackback':
case 'file':
case 'poll':
case 'rss':

View file

@ -19,6 +19,7 @@
<action name="procAdminDeleteLogo" type="controller" />
<action name="procAdminMenuReset" type="controller" />
<action name="procAdminUpdateSitelock" type="controller" />
<action name="procAdminUpdateEmbedWhitelist" type="controller" />
<action name="getAdminFTPList" type="model" />
<action name="getAdminFTPPath" type="model" />

View file

@ -907,7 +907,7 @@
<item name="use_mobile_view">
<value xml:lang="ko"><![CDATA[모바일 뷰 사용]]></value>
<value xml:lang="en"><![CDATA[Do you want to show the mobile page when users access the website with their mobile phone?]]></value>
<value xml:lang="jp"><![CDATA[モバイル機器で接続した際にモバイルページを表示しますか?]]></value>
<value xml:lang="jp"><![CDATA[モバイル版使用]]></value>
<value xml:lang="zh-CN"><![CDATA[当用户使用移动终端访问页面的时候是否使用移动版?]]></value>
<value xml:lang="tr"><![CDATA[Kullanıcılar mobil aygıtları ile siteye bağlandıklarında mobil sayfaı bu kullancılara göstermek istiyor musunuz?]]></value>
</item>
@ -925,7 +925,7 @@
<item name="input_footer_script">
<value xml:lang="ko"><![CDATA[하단(footer) 스크립트]]></value>
<value xml:lang="en"><![CDATA[Footer script]]></value>
<value xml:lang="jp"><![CDATA[下段footerスクリプト]]]></value>
<value xml:lang="jp"><![CDATA[下段footerスクリプト]]></value>
<value xml:lang="zh-CN"><![CDATA[输入页脚脚本]]></value>
<value xml:lang="tr"><![CDATA[Alt (footer) Script Eklemek]]></value>
</item>
@ -953,7 +953,7 @@
<item name="admin_ip_limit">
<value xml:lang="ko"><![CDATA[관리자 IP대역]]></value>
<value xml:lang="en"><![CDATA[Sepcify IP address band that can access the admin page.]]></value>
<value xml:lang="jp"><![CDATA[管理者ページへアクセス可能なIP帯域を指定します。]]></value>
<value xml:lang="jp"><![CDATA[管理者のIPアドレス帯域]]></value>
<value xml:lang="zh-CN"><![CDATA[后台IP绑定]]></value>
<value xml:lang="tr"><![CDATA[Yönetici sayfasına ulaşabileceğiniz IP aralığını belirleyiniz.]]></value>
</item>
@ -981,7 +981,7 @@
<item name="allow_use_favicon">
<value xml:lang="ko"><![CDATA[파비콘 지정]]></value>
<value xml:lang="en"><![CDATA[Do you want to use favicon?]]></value>
<value xml:lang="jp"><![CDATA[ファビコンを使用しますか?]]></value>
<value xml:lang="jp"><![CDATA[ファビコン設定]]></value>
<value xml:lang="zh-CN"><![CDATA[是否启用自定义favicon?]]></value>
<value xml:lang="tr"><![CDATA[Favicon'u kullanmak istiyor musunuz?]]></value>
</item>
@ -995,7 +995,7 @@
<item name="allow_use_mobile_icon">
<value xml:lang="ko"><![CDATA[모바일 홈 화면 아이콘]]></value>
<value xml:lang="en"><![CDATA[Do you want to use the mobile home screen icon?]]></value>
<value xml:lang="jp"><![CDATA[モバイル待ち受け画面のアイコンを使用しますか?]]></value>
<value xml:lang="jp"><![CDATA[待受画面のアイコン設定]]></value>
<value xml:lang="zh-CN"><![CDATA[是否启用移动版屏幕图标?]]></value>
<value xml:lang="tr"><![CDATA[Mobil Ana Ekran Simgesini kullanmak istiyor musunuz?]]></value>
</item>
@ -1590,8 +1590,8 @@
<value xml:lang="jp"><![CDATA[HTMLタグを使用できます。]]></value>
</item>
<item name="sitelock_warning_whitelist">
<value xml:lang="ko"><![CDATA[이곳에 관리자의 IP를 반드시 포함해야 합니다.<br />만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `$db_info->use_sitelock`를 'N'으로 변경하여 차단을 해제할 수 있습니다.]]></value>
<value xml:lang="jp"><![CDATA[ここに管理者のIPを必ず記入てください。<br />もし接近が遮断された場合、'./files/config/db.config.php' ファイルから `$db_info->use_sitelock`を 'N'へ変更すれば遮断が解除できます。]]></value>
<value xml:lang="ko"><![CDATA[이곳에 관리자의 IP를 반드시 포함해야 합니다.<br />만약 접근이 차단된 경우 './files/config/db.config.php' 파일에서 `'use_sitelock' => '<strong>Y</strong>'`를 `'use_sitelock' => '<strong>N</strong>'`으로 변경하여 차단을 해제할 수 있습니다.<br />사이트 잠금 디자인 파일의 위치는 './common/tpl/sitelock.html' 입니다.]]></value>
<value xml:lang="jp"><![CDATA[ここに管理者のIPを必ず記入てください。<br />もし接近が遮断された場合、'./files/config/db.config.php' ファイルから `'use_sitelock' => '<strong>Y</strong>'`を `'use_sitelock' => '<strong>N</strong>'`へ変更すれば遮断が解除できます。<br />サイトロックの設計ファイルの場所は、'./commo/tpl/sitelock.html' です。]]></value>
</item>
<item name="your_ip">
<value xml:lang="ko"><![CDATA[접속하신 IP]]></value>

View file

@ -131,6 +131,38 @@
</div>
</div>
</section>
<section class="section">
<h1>embed Filter {$lang->subtitle_embed_whitelist} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_embed_filter" target="_blank">{$lang->help}</a></h1>
<form action="./" method="post" class="x_form-horizontal">
<input type="hidden" name="module" value="admin" />
<input type="hidden" name="act" value="procAdminUpdateEmbedWhitelist" />
<input type="hidden" name="xe_validator_id" value="modules/admin/tpl/config_general/1" />
<div class="x_control-group">
<label class="x_control-label" for="embed_white_iframe">iFrame <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_config_embed_filter_iframe" target="_blank">{$lang->help}</a></label>
<div class="x_controls" style="margin-right:14px">
<textarea name="embed_white_iframe" id="embed_white_iframe" rows="4" style="width:100%;">{$embed_white_iframe}</textarea>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="embed_white_object">object/embed</label>
<div class="x_controls" style="margin-right:14px">
<textarea name="embed_white_object" id="embed_white_object" rows="4" cols="42" style="width:100%;">{$embed_white_object}</textarea>
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
</div>
</div>
</form>
</section>
<section class="section collapsed">
<h1>{$lang->subtitle_advanced}</h1>
<form action="./" method="post" enctype="multipart/form-data" class="x_form-horizontal">

View file

@ -1,6 +1,5 @@
@charset "utf-8";
@font-face{font-family:NG;src:url(https://themes.googleusercontent.com/static/fonts/earlyaccess/nanumgothic/v3/NanumGothic-Regular.eot);src:local(),url(https://themes.googleusercontent.com/static/fonts/earlyaccess/nanumgothic/v3/NanumGothic-Regular.woff) format('woff')}
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:,NanumGothic,NG,,Dotum,Arial,Helvetica,sans-serif}
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:Arial,Helvetica,sans-serif}
@media all and (max-width:980px){
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:sans-serif}
}

View file

@ -1,6 +1,5 @@
@charset "utf-8";
@font-face{font-family:NG;src:url(https://themes.googleusercontent.com/static/fonts/earlyaccess/nanumgothic/v3/NanumGothic-Regular.eot);src:local(),url(https://themes.googleusercontent.com/static/fonts/earlyaccess/nanumgothic/v3/NanumGothic-Regular.woff) format('woff')}
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:,NanumGothic,NG,,Dotum,Arial,Helvetica,sans-serif}
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:,NanumGothic,,Dotum,Arial,Helvetica,sans-serif}
@media all and (max-width:980px){
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:sans-serif}
}

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
function setStartModule(){var a=jQuery(".moduleIdList option:selected").text(),b=jQuery(".moduleIdList").val();jQuery("#_target_module").val(a),jQuery("#index_module_srl").val(b),jQuery(".moduleList,.moduleIdList, .site_keyword_search, #sitefind_addBtn").css("display","none")}function viewSiteSearch(){jQuery(".site_keyword_search").css("display","")}function getFTPList(a){var b=jQuery("#ftp_form").get(0);b.ftp_root_path.value="undefined"!=typeof a?a:!b.ftp_root_path.value&&"undefined"!=typeof b.sftp&&b.sftp.checked?xe_root:"/";var c=[];c.ftp_user=jQuery("#ftp_user").val(),c.ftp_password=jQuery("#ftp_password").val(),c.ftp_host=jQuery("#ftp_host").val(),c.ftp_port=jQuery("#ftp_port").val(),c.ftp_root_path=jQuery("#ftp_root_path").val(),c.sftp=jQuery("input[name=sftp]:checked").val(),exec_xml("admin","getAdminFTPList",c,completeGetFtpInfo,["list","error","message"],c,b)}function removeFTPInfo(){var a={};exec_xml("install","procInstallAdminRemoveFTPInfo",a,filterAlertMessage,["error","message"],a)}function completeGetFtpInfo(a){if(0!==a.error)return alert(a.error),alert(a.message),void 0;var b=jQuery("#ftpSuggestion").empty(),c="";jQuery.isArray(a.list.item)||(a.list.item=[a.list.item]),pwd=jQuery("#ftp_form").get(0).ftp_root_path.value,"/"!=pwd&&(arr=pwd.split("/"),arr.pop(),arr.pop(),arr.push(""),target=arr.join("/"),c=c+"<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>");for(var d=0;d<a.list.item.length;d++){var e=a.list.item[d];"../"!=e&&"./"!=e&&(c=c+"<li><button type='button' onclick=\"getFTPList('"+pwd+e+"')\">"+e+"</button></li>")}c="<ul>"+c+"</ul>",b.append(jQuery(c))}function deleteIcon(a){var b=[];b.iconname=a,exec_xml("admin","procAdminRemoveIcons",b,iconDeleteMessage,["error","message"],b),icon=a}function iconDeleteMessage(a){alert(a.message),"0"==a.error&&("favicon.ico"==icon?jQuery(".faviconPreview img").attr("src","modules/admin/tpl/img/faviconSample.png"):"mobicon.png"==icon&&jQuery(".mobiconPreview img").attr("src","modules/admin/tpl/img/mobiconSample.png"))}function doRecompileCacheFile(){if(confirm(xe.lang.confirm_run)){var a=[];exec_xml("admin","procAdminRecompileCacheFile",a,completeCacheMessage)}}function completeCacheMessage(a){alert(a.message)}function doResetAdminMenu(){if(confirm(xe.lang.confirm_reset_admin_menu)){var a=[];a.menu_srl=admin_menu_srl,exec_xml("admin","procAdminMenuReset",a,completeResetAdminMenu)}}function completeResetAdminMenu(){document.location.reload()}jQuery(function(a){a(".tgContent ul").bind("click",function(){a("#sitefind_addBtn").css("display","")})});var icon=null;
function setStartModule(){var a=jQuery(".moduleIdList option:selected").text(),b=jQuery(".moduleIdList").val();jQuery("#_target_module").val(a),jQuery("#index_module_srl").val(b),jQuery(".moduleList,.moduleIdList, .site_keyword_search, #sitefind_addBtn").css("display","none")}function viewSiteSearch(){jQuery(".site_keyword_search").css("display","")}function getFTPList(a){var b=jQuery("#ftp_form").get(0);b.ftp_root_path.value="undefined"!=typeof a?a:!b.ftp_root_path.value&&"undefined"!=typeof b.sftp&&b.sftp.checked?xe_root:"/";var c=[];c.ftp_user=jQuery("#ftp_user").val(),c.ftp_password=jQuery("#ftp_password").val(),c.ftp_host=jQuery("#ftp_host").val(),c.ftp_port=jQuery("#ftp_port").val(),c.ftp_root_path=jQuery("#ftp_root_path").val(),c.sftp=jQuery("input[name=sftp]:checked").val(),exec_xml("admin","getAdminFTPList",c,completeGetFtpInfo,["list","error","message"],c,b)}function removeFTPInfo(){var a={};exec_xml("install","procInstallAdminRemoveFTPInfo",a,filterAlertMessage,["error","message"],a)}function completeGetFtpInfo(a){if(0!==a.error)return alert(a.error),void alert(a.message);var b=jQuery("#ftpSuggestion").empty(),c="";jQuery.isArray(a.list.item)||(a.list.item=[a.list.item]),pwd=jQuery("#ftp_form").get(0).ftp_root_path.value,"/"!=pwd&&(arr=pwd.split("/"),arr.pop(),arr.pop(),arr.push(""),target=arr.join("/"),c=c+"<li><button type='button' onclick=\"getFTPList('"+target+"')\">../</button></li>");for(var d=0;d<a.list.item.length;d++){var e=a.list.item[d];"../"!=e&&"./"!=e&&(c=c+"<li><button type='button' onclick=\"getFTPList('"+pwd+e+"')\">"+e+"</button></li>")}c="<ul>"+c+"</ul>",b.append(jQuery(c))}function deleteIcon(a){var b=[];b.iconname=a,exec_xml("admin","procAdminRemoveIcons",b,iconDeleteMessage,["error","message"],b),icon=a}function iconDeleteMessage(a){alert(a.message),"0"==a.error&&("favicon.ico"==icon?jQuery(".faviconPreview img").attr("src","modules/admin/tpl/img/faviconSample.png"):"mobicon.png"==icon&&jQuery(".mobiconPreview img").attr("src","modules/admin/tpl/img/mobiconSample.png"))}function doRecompileCacheFile(){if(confirm(xe.lang.confirm_run)){var a=[];exec_xml("admin","procAdminRecompileCacheFile",a,completeCacheMessage)}}function completeCacheMessage(a){alert(a.message)}function doResetAdminMenu(){if(confirm(xe.lang.confirm_reset_admin_menu)){var a=[];a.menu_srl=admin_menu_srl,exec_xml("admin","procAdminMenuReset",a,completeResetAdminMenu)}}function completeResetAdminMenu(){document.location.reload()}jQuery(function(a){a(".tgContent ul").bind("click",function(){a("#sitefind_addBtn").css("display","")})});var icon=null;

View file

@ -1 +1 @@
jQuery(function(a){function b(b){var c;if(moduleList=b.menuList){var d=a("#menuNameList");for(var e in moduleList){var f=moduleList[e];c=a('<optgroup label="'+e+'" />').appendTo(d);for(var g in f)c.append('<option value="'+e+":"+g+'">'+f[g].title+"</option>")}}}var c,d,e=a("#editForm"),f=a("#listForm");a("a._add").click(function(){if(d=a(this).parent().prevAll("._item_key").val(),e.find("input[name=parent_srl]").val(d),!c){var f=[],g=["menuList"];exec_xml("menu","procMenuAdminAllActList",f,b,g)}}),a("a._parent_delete").click(function(){var b=a(this).parent().prevAll("._parent_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()}),a("a._child_delete").click(function(){var b=a(this).parents("li").find("._item_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()})}),jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}a("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var b,c,d=a(this);b=d.find(">input._parent_key"),c=!!d.parent("ul").parent("li").length,c?b.val(d.parent("ul").parent("li").find(">input._item_key").val()):b.val("0")});var c=!1,d=a('<li class="placeholder">');a("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(e){var f,g,h,i,j,k,l,m,n,o;if(!a(e.target).is("a,input,label,textarea")&&1==e.which){for(c=!0,f=a(this),j=f.height(),i=f.width(),g=f.parentsUntil(".adminMap").filter("ul"),h=g.eq(-1),l={x:e.pageX,y:e.pageY},k=b(this,h.get(0)),$clone=f.clone(!0).attr("target",!0),n=g.length-1;n;n--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return m=[],h.find("li").each(function(){if(f[0]===this||f.has(this).length)return!0;var c=b(this,h.get(0));m.push({top:c.top,bottom:c.top+32,$item:a(this)})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:i,height:j,left:k.left,top:k.top,zIndex:100}).appendTo(h.eq(0)),d.css({position:"absolute",opacity:.6,width:i,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(h.eq(0)),f.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f,g;for(o=null,b={x:l.x-a.pageX,y:l.y-a.pageY},c=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],g.top>c||g.bottom<c||(o={element:g.$item},g.$item.hasClass("parent")?(o.state="prepend",d.css("top",g.bottom-5)):g.top>c-12?(o.state="before",d.css("top",g.top-5)):(o.state="after",d.css("top",g.bottom-5)));$clone.css({top:c})}).bind("mouseup.st",function(){var b,e;c=!1,a(document).unbind("mousemove.st mouseup.st"),f.css("opacity",""),$clone.remove(),d.remove(),e=a("<li />").height(f.height()),o&&(b=a(o.element),f.before(e),"prepend"==o.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(f.hide())):b[o.state](f.hide()),f.slideDown(100,function(){f.removeClass("active")}),e.slideUp(100,function(){var a=e.parent();e.remove(),a.children("li").length||a.remove()}),f.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return c||a(this).addClass("active"),!1},"mouseout.st":function(){return c||a(this).removeClass("active"),!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end(),a('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:.7}).appendTo("body")});
jQuery(function(a){function b(b){var c;if(moduleList=b.menuList){var d=a("#menuNameList");for(var e in moduleList){var f=moduleList[e];c=a('<optgroup label="'+e+'" />').appendTo(d);for(var g in f)c.append('<option value="'+e+":"+g+'">'+f[g].title+"</option>")}}}var c,d,e=a("#editForm"),f=a("#listForm");a("a._add").click(function(){if(d=a(this).parent().prevAll("._item_key").val(),e.find("input[name=parent_srl]").val(d),!c){var f=[],g=["menuList"];exec_xml("menu","procMenuAdminAllActList",f,b,g)}}),a("a._parent_delete").click(function(){var b=a(this).parent().prevAll("._parent_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()}),a("a._child_delete").click(function(){var b=a(this).parents("li").find("._item_key").val();f.find("input[name=menu_item_srl]").val(b),f.submit()})}),jQuery(function(a){function b(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}a("form.adminMap").delegate("li:not(.placeholder)","dropped.st",function(){var b,c,d=a(this);b=d.find(">input._parent_key"),c=!!d.parent("ul").parent("li").length,b.val(c?d.parent("ul").parent("li").find(">input._item_key").val():"0")});var c=!1,d=a('<li class="placeholder">');a("form.adminMap>ul").delegate("li:not(.placeholder,.parent)",{"mousedown.st":function(e){var f,g,h,i,j,k,l,m,n,o;if(!a(e.target).is("a,input,label,textarea")&&1==e.which){for(c=!0,f=a(this),j=f.height(),i=f.width(),g=f.parentsUntil(".adminMap").filter("ul"),h=g.eq(-1),l={x:e.pageX,y:e.pageY},k=b(this,h.get(0)),$clone=f.clone(!0).attr("target",!0),n=g.length-1;n;n--)$clone=$clone.wrap("<li><ul /></li>").parent().parent();return m=[],h.find("li").each(function(){if(f[0]===this||f.has(this).length)return!0;var c=b(this,h.get(0));m.push({top:c.top,bottom:c.top+32,$item:a(this)})}),$clone.find(".side,input").remove().end().addClass("draggable").css({position:"absolute",opacity:.6,width:i,height:j,left:k.left,top:k.top,zIndex:100}).appendTo(h.eq(0)),d.css({position:"absolute",opacity:.6,width:i,height:"10px",left:k.left,top:k.top,zIndex:99}).appendTo(h.eq(0)),f.css("opacity",.6),a(document).unbind("mousemove.st mouseup.st").bind("mousemove.st",function(a){var b,c,e,f,g;for(o=null,b={x:l.x-a.pageX,y:l.y-a.pageY},c=k.top-b.y,e=0,f=m.length;f>e;e++)g=m[e],g.top>c||g.bottom<c||(o={element:g.$item},g.$item.hasClass("parent")?(o.state="prepend",d.css("top",g.bottom-5)):g.top>c-12?(o.state="before",d.css("top",g.top-5)):(o.state="after",d.css("top",g.bottom-5)));$clone.css({top:c})}).bind("mouseup.st",function(){var b,e;c=!1,a(document).unbind("mousemove.st mouseup.st"),f.css("opacity",""),$clone.remove(),d.remove(),e=a("<li />").height(f.height()),o&&(b=a(o.element),f.before(e),"prepend"==o.state?(b.find(">ul").length||b.find(">.side").after("<ul>"),b.find(">ul").prepend(f.hide())):b[o.state](f.hide()),f.slideDown(100,function(){f.removeClass("active")}),e.slideUp(100,function(){var a=e.parent();e.remove(),a.children("li").length||a.remove()}),f.trigger("dropped.st"))}),!1}},"mouseover.st":function(){return c||a(this).addClass("active"),!1},"mouseout.st":function(){return c||a(this).removeClass("active"),!1}}).find("li li").prepend('<button type="button" class="moveTo">Move to</button>').end().end(),a('<div id="dropzone-marker" />').css({display:"none",position:"absolute",backgroundColor:"#000",opacity:.7}).appendTo("body")});

View file

@ -55,7 +55,7 @@ class boardAdminView extends board {
// install order (sorting) options
foreach($this->order_target as $key) $order_target[$key] = Context::getLang($key);
$order_target['list_order'] = Context::getLang('document_srl');
$order_target['list_order'] = Context::getLang('regdate');
$order_target['update_order'] = Context::getLang('last_update');
Context::set('order_target', $order_target);
}

View file

@ -11,7 +11,7 @@ class board extends ModuleObject
{
var $search_option = array('title','content','title_content','comment','user_name','nick_name','user_id','tag'); ///< 검색 옵션
var $order_target = array('list_order', 'update_order', 'regdate', 'voted_count', 'blamed_count', 'readed_count', 'comment_count', 'title'); // 정렬 옵션
var $order_target = array('list_order', 'update_order', 'voted_count', 'blamed_count', 'readed_count', 'comment_count', 'title'); // 정렬 옵션
var $skin = "default"; ///< skin name
var $list_count = 20; ///< the number of documents displayed in a page

View file

@ -96,6 +96,13 @@ class boardController extends board
$obj->title_color = $oDocument->get('title_color');
$obj->title_bold = $oDocument->get('title_bold');
}
// modify list_order if document status is temp
if($oDocument->get('status') == 'TEMP')
{
$obj->last_update = $obj->regdate = date('YmdHis');
$obj->update_order = $obj->list_order = (getNextSequence() * -1);
}
$output = $oDocumentController->updateDocument($oDocument, $obj);
$msg_code = 'success_updated';

View file

@ -24,11 +24,29 @@ class boardMobile extends boardView
$this->module_info->secret = 'Y';
}
//If category are exsist, set value 'use_category' to 'Y'
if(count($oDocumentModel->getCategoryList($this->module_info->module_srl)))
$this->module_info->use_category = 'Y';
// use_category <=1.5.x, hide_category >=1.7.x
$count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
if($count_category)
{
if($this->module_info->hide_category)
{
$this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y';
}
else if($this->module_info->use_category)
{
$this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y';
}
else
{
$this->module_info->hide_category = 'N';
$this->module_info->use_category = 'Y';
}
}
else
{
$this->module_info->hide_category = 'Y';
$this->module_info->use_category = 'N';
}
/**
* check the consultation function, if the user is admin then swich off consultation function

View file

@ -25,7 +25,7 @@ class boardModel extends module
// get the list config value, if it is not exitsted then setup the default value
$list_config = $oModuleModel->getModulePartConfig('board', $module_srl);
if(!$list_config || !count($list_config))
if(!$list_config || count($list_config) <= 0)
{
$list_config = array( 'no', 'title', 'nick_name','regdate','readed_count');
}

View file

@ -47,27 +47,27 @@ class boardView extends board
}
// use_category <=1.5.x, hide_category >=1.7.x
$count_category = count($oDocumentModel->getCategoryList($module_srl));
$count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
if($count_category)
{
if($config->hide_category)
if($this->module_info->hide_category)
{
$config->use_category = ($config->hide_category == 'Y') ? 'N' : 'Y';
$this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y';
}
else if($config->use_category)
else if($this->module_info->use_category)
{
$config->hide_category = ($config->use_category == 'Y') ? 'N' : 'Y';
$this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y';
}
else
{
$config->hide_category = 'N';
$config->use_category = 'Y';
$this->module_info->hide_category = 'N';
$this->module_info->use_category = 'Y';
}
}
else
{
$config->hide_category = 'Y';
$config->use_category = 'N';
$this->module_info->hide_category = 'Y';
$this->module_info->use_category = 'N';
}
/**
@ -184,6 +184,7 @@ class boardView extends board
// list config, columnList setting
$oBoardModel = getModel('board');
$this->listConfig = $oBoardModel->getListConfig($this->module_info->module_srl);
if(!$this->listConfig) $this->listConfig = array();
$this->_makeListColumnList();
// display the notice list

View file

@ -18,8 +18,8 @@
<description xml:lang="ru">Модуль для функционирования форума. Также включает в себя функции администратора такие как создание/управление форумами.</description>
<description xml:lang="zh-TW">提供用戶相對應的討論板功能,包含建立/新增及管理等功能。</description>
<description xml:lang="tr">Pano yapılandırmaları için kullanılan modüldür. Ayrıca oluşturma/yönetme gibi yönetici özellikleri de içerir.</description>
<version>1.7.2-beta.3</version>
<date>2014-01-09</date>
<version>1.7.2</version>
<date>2014-03-20</date>
<category>service</category>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">

View file

@ -11,9 +11,9 @@
<th scope="col" cond="$val->type=='nick_name' && $val->idx==-1"><span>{$lang->writer}</span></th>
<th scope="col" cond="$val->type=='user_id' && $val->idx==-1"><span>{$lang->user_id}</span></th>
<th scope="col" cond="$val->type=='user_name' && $val->idx==-1"><span>{$lang->user_name}</span></th>
<th scope="col" cond="$val->type=='regdate' && $val->idx==-1"><span><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}</a></span></th>
<th scope="col" cond="$val->type=='last_update' && $val->idx==-1"><span><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_update}</a></span></th>
<th scope="col" cond="$val->type=='last_post' && $val->idx==-1"><span><a href="{getUrl('sort_index','last_update','order_type',$order_type)}">{$lang->last_post}</a></span></th>
<th scope="col" cond="$val->type=='regdate' && $val->idx==-1"><span><a href="{getUrl('sort_index','list_order','order_type',$order_type)}">{$lang->date}</a></span></th>
<th scope="col" cond="$val->type=='last_update' && $val->idx==-1"><span><a href="{getUrl('sort_index','update_order','order_type',$order_type)}">{$lang->last_update}</a></span></th>
<th scope="col" cond="$val->type=='last_post' && $val->idx==-1"><span><a href="{getUrl('sort_index','update_order','order_type',$order_type)}">{$lang->last_post}</a></span></th>
<th scope="col" cond="$val->type=='readed_count' && $val->idx==-1"><span><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}</a></span></th>
<th scope="col" cond="$val->type=='voted_count' && $val->idx==-1"><span><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}</a></span></th>
<th scope="col" cond="$val->type=='blamed_count' && $val->idx==-1"><span><a href="{getUrl('sort_index','blamed_count','order_type',$order_type)}">{$lang->blamed_count}</a></span></th>

View file

@ -340,6 +340,35 @@ class commentAdminController extends comment
}
}
/**
* @fn procCommentAdminMoveToTrash
* @brief move a comment to trash
* @see commentModel::getCommentMenu
*/
function procCommentAdminMoveToTrash()
{
$oDB = DB::getInstance();
$oDB->begin();
$comment_srl = Context::get('comment_srl');
$oCommentModel = getModel('comment');
$oCommentController = getController('comment');
$oComment = $oCommentModel->getComment($comment_srl, false);
if(!$oComment->isGranted()) return $this->stop('msg_not_permitted');
$message_content = "";
$this->_moveCommentToTrash(array($comment_srl), $oCommentController, $oDB, $message_content);
$isTrash = true;
$output = $oCommentController->deleteComment($comment_srl, TRUE, $isTrash);
$oDB->commit();
$returnUrl = Context::get('cur_url');
$this->add('redirect_url', $returnUrl);
}
/**
* Cancel the blacklist of abused comments reported by other users
* @return void|object

View file

@ -52,21 +52,45 @@ class commentAdminView extends comment
// get a list by using comment->getCommentList.
$oCommentModel = getModel('comment');
$secretNameList = $oCommentModel->getSecretNameList();
$columnList = array('comment_srl', 'document_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
$columnList = array('comment_srl', 'document_srl','module_srl','is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
$output = $oCommentModel->getTotalCommentList($args, $columnList);
$oCommentModel = getModel("comment");
$modules = $oCommentModel->getDistinctModules();
$modules_list = $modules;
// $modules = $oCommentModel->getDistinctModules();
// $modules_list = $modules;
// set values in the return object of comment_model:: getTotalCommentList() in order to use a template.
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('comment_list', $output->data);
Context::set('modules_list', $modules_list);
// Context::set('modules_list', $modules_list);
Context::set('page_navigation', $output->page_navigation);
Context::set('secret_name_list', $secretNameList);
$oModuleModel = getModel('module');
$module_list = array();
$mod_srls = array();
foreach($output->data as $val)
{
$mod_srls[] = $val->module_srl;
}
$mod_srls = array_unique($mod_srls);
// Module List
$mod_srls_count = count($mod_srls);
if($mod_srls_count)
{
$columnList = array('module_srl', 'mid', 'browser_title');
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
if($module_output && is_array($module_output))
{
foreach($module_output as $module)
{
$module_list[$module->module_srl] = $module;
}
}
}
Context::set('module_list', $module_list);
// set the template
$this->setTemplatePath($this->module_path . 'tpl');
$this->setTemplateFile('comment_list');

View file

@ -266,9 +266,13 @@ class commentController extends comment
return new Object(-1, 'msg_invalid_request');
}
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i', $obj->homepage))
if($obj->homepage)
{
$obj->homepage = 'http://' . $obj->homepage;
$obj->homepage = removeHackTag($obj->homepage);
if(!preg_match('/^[a-z]+:\/\//i',$obj->homepage))
{
$obj->homepage = 'http://'.$obj->homepage;
}
}
// input the member's information if logged-in
@ -469,16 +473,6 @@ class commentController extends comment
$output->add('comment_srl', $obj->comment_srl);
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
$oCacheHandler->delete('object:' . $document_srl);
}
return $output;
}
@ -665,9 +659,13 @@ class commentController extends comment
$obj->password = md5($obj->password);
}
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i', $obj->homepage))
if($obj->homepage)
{
$obj->homepage = 'http://' . $obj->homepage;
$obj->homepage = removeHackTag($obj->homepage);
if(!preg_match('/^[a-z]+:\/\//i',$obj->homepage))
{
$obj->homepage = 'http://'.$obj->homepage;
}
}
// set modifier's information if logged-in and posting author and modifier are matched.
@ -736,14 +734,6 @@ class commentController extends comment
$output->add('comment_srl', $obj->comment_srl);
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $obj->document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
}
return $output;
}
@ -853,18 +843,27 @@ class commentController extends comment
// call a trigger (after)
if($output->toBool())
{
$comment->isMoveToTrash = $isMoveToTrash;
$trigger_output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
unset($comment->isMoveToTrash);
}
if(!$isMoveToTrash)
{
$this->_deleteDeclaredComments($args);
$this->_deleteVotedComments($args);
}
else
{
$args = new stdClass();
$args->upload_target_srl = $comment_srl;
$args->isvalid = 'N';
$output = executeQuery('file.updateFileValid', $args);
}
// commit
@ -872,16 +871,6 @@ class commentController extends comment
$output->add('document_srl', $document_srl);
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
$oCacheHandler->delete('object:' . $document_srl);
}
return $output;
}
@ -970,14 +959,6 @@ class commentController extends comment
$this->_deleteVotedComments($args);
}
//remove from cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
$oCacheHandler->invalidateGroupKey('newestCommentsList');
}
return $output;
}

View file

@ -76,6 +76,13 @@ class commentModel extends comment
// call a trigger (after)
ModuleHandler::triggerCall('comment.getCommentMenu', 'after', $menu_list);
if($this->grant->manager){
$str_confirm = Context::getLang('confirm_move');
$url = sprintf("if(!confirm('%s')) return; var params = new Array(); params['comment_srl']='%s'; params['mid']=current_mid;params['cur_url']=current_url; exec_xml('comment', 'procCommentAdminMoveToTrash', params)", $str_confirm, $comment_srl);
$oCommentController->addCommentPopupMenu($url,'cmd_trash','','javascript');
}
// find a comment by IP matching if an administrator.
if($logged_info->is_admin == 'Y')
{
@ -326,6 +333,9 @@ class commentModel extends comment
*/
function getDistinctModules()
{
return array();
/*
$output = executeQueryArray('comment.getDistinctModules');
$module_srls = $output->data;
$oModuleModel = getModel('module');
@ -339,6 +349,7 @@ class commentModel extends comment
}
}
return $result;
*/
}
/**
@ -441,96 +452,78 @@ class commentModel extends comment
return;
}
// cache controll
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
// get the number of comments on the document module
$oDocumentModel = getModel('document');
$columnList = array('document_srl', 'module_srl', 'comment_count');
$oDocument = $oDocumentModel->getDocument($document_srl, FALSE, TRUE, $columnList);
// return if no doc exists.
if(!$oDocument->isExists())
{
$object_key = 'object:' . $document_srl . '_' . $page . '_' . ($is_admin ? 'Y' : 'N') . '_' . $count;
$cache_key = $oCacheHandler->getGroupKey('commentList_' . $document_srl, $object_key);
$output = $oCacheHandler->get($cache_key);
return;
}
if(!$output)
// return if no comment exists
if($oDocument->getCommentCount() < 1)
{
// get the number of comments on the document module
$oDocumentModel = getModel('document');
$columnList = array('document_srl', 'module_srl', 'comment_count');
$oDocument = $oDocumentModel->getDocument($document_srl, FALSE, TRUE, $columnList);
return;
}
// return if no doc exists.
if(!$oDocument->isExists())
// get a list of comments
$module_srl = $oDocument->get('module_srl');
if(!$count)
{
$comment_config = $this->getCommentConfig($module_srl);
$comment_count = $comment_config->comment_count;
if(!$comment_count)
{
return;
$comment_count = 50;
}
}
else
{
$comment_count = $count;
}
// return if no comment exists
if($oDocument->getCommentCount() < 1)
{
return;
}
// get a very last page if no page exists
if(!$page)
{
$page = (int) ( ($oDocument->getCommentCount() - 1) / $comment_count) + 1;
}
// get a list of comments
$module_srl = $oDocument->get('module_srl');
// get a list of comments
$args = new stdClass();
$args->document_srl = $document_srl;
$args->list_count = $comment_count;
$args->page = $page;
$args->page_count = 10;
if(!$count)
{
$comment_config = $this->getCommentConfig($module_srl);
$comment_count = $comment_config->comment_count;
if(!$comment_count)
{
$comment_count = 50;
}
}
else
{
$comment_count = $count;
}
//check if module is using validation system
$oCommentController = getController('comment');
$using_validation = $oCommentController->isModuleUsingPublishValidation($module_srl);
if($using_validation)
{
$args->status = 1;
}
// get a very last page if no page exists
if(!$page)
{
$page = (int) ( ($oDocument->getCommentCount() - 1) / $comment_count) + 1;
}
$output = executeQueryArray('comment.getCommentPageList', $args);
// get a list of comments
$args = new stdClass();
$args->document_srl = $document_srl;
$args->list_count = $comment_count;
$args->page = $page;
$args->page_count = 10;
//check if module is using validation system
$oCommentController = getController('comment');
$using_validation = $oCommentController->isModuleUsingPublishValidation($module_srl);
if($using_validation)
{
$args->status = 1;
}
// return if an error occurs in the query results
if(!$output->toBool())
{
return;
}
// insert data into CommentPageList table if the number of results is different from stored comments
if(!$output->data)
{
$this->fixCommentList($oDocument->get('module_srl'), $document_srl);
$output = executeQueryArray('comment.getCommentPageList', $args);
// return if an error occurs in the query results
if(!$output->toBool())
{
return;
}
// insert data into CommentPageList table if the number of results is different from stored comments
if(!$output->data)
{
$this->fixCommentList($oDocument->get('module_srl'), $document_srl);
$output = executeQueryArray('comment.getCommentPageList', $args);
if(!$output->toBool())
{
return;
}
}
//insert in cache
if($oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, $output);
}
}
return $output;

View file

@ -4,6 +4,7 @@
<permissions>
<permission action="procCommentAdminAddCart" target="manager" />
<permission action="procCommentGetList" target="manager" />
<permission action="procCommentAdminMoveToTrash" target="manager" />
</permissions>
<actions>
<action name="getCommentMenu" type="model" />
@ -21,6 +22,7 @@
<action name="procCommentAdminCancelDeclare" type="controller" />
<action name="procCommentAdminAddCart" type="controller" />
<action name="procCommentGetList" type="controller" />
<action name="procCommentAdminMoveToTrash" type="controller" />
</actions>
<menus>
<menu name="comment">

View file

@ -47,7 +47,12 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
<tbody>
<tr loop="$comment_list => $no, $val">
{@ $comment = $val->getContentText(200)}
<td><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a></td>
<td>
<block cond="isset($module_list[$val->module_srl])">
<a href="{getUrl('', 'mid', $module_list[$val->module_srl]->mid)}" target="_blank">{$module_list[$val->module_srl]->browser_title}</a> -
</block>
<a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a>
</td>
<td class="nowr"><a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->getNickName()}</a></td>
<td class="nowr">{number_format($val->get('voted_count'))}/{number_format($val->get('blamed_count'))}</td>
<td class="nowr">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>

View file

@ -24,7 +24,7 @@ class communicationAdminController extends communication
function procCommunicationAdminInsertConfig()
{
// get the default information
$args = Context::gets('skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl');
$args = Context::gets('skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_write_default','grant_write_group');
$args->editor_colorset = $args->sel_editor_colorset;
unset($args->sel_editor_colorset);
@ -53,6 +53,11 @@ class communicationAdminController extends communication
$args->layout_srl = NULL;
}
$oCommunicationModel = getModel('communication');
$args->grant_write = $oCommunicationModel->getGrantArray($args->grant_write_default, $args->grant_write_group);
unset($args->grant_write_default);
unset($args->grant_write_group);
// create the module module Controller object
$oModuleController = getController('module');
$output = $oModuleController->insertModuleConfig('communication', $args);

View file

@ -58,6 +58,10 @@ class communicationAdminView extends communication
$security->encodeHTML('communication_skin_list..title');
$security->encodeHTML('communication_mobile_skin_list..title');
$oMemberModel = getModel('member');
$group_list = $oMemberModel->getGroups($this->site_srl);
Context::set('group_list', $group_list);
// specify a template
$this->setTemplatePath($this->module_path . 'tpl');
$this->setTemplateFile('index');

View file

@ -88,6 +88,12 @@ class communicationController extends communication
// Check if there is a member to receive a message
$oMemberModel = getModel('member');
$oCommunicationModel = getModel('communication');
$config = $oCommunicationModel->getConfig();
if(!$oCommunicationModel->checkGrant($config->grant_write))
{
return new Object(-1, 'msg_not_permitted');
}
$receiver_member_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
if($receiver_member_info->member_srl != $receiver_srl)

View file

@ -51,10 +51,102 @@ class communicationModel extends communication
{
$communication_config->mskin = 'default';
}
if(!$communication_config->grant_write)
{
$communication_config->grant_write = array('default_grant'=>'member');
}
return $communication_config;
}
/**
* @brief get grant array for insert to database. table module_config's config field
* @param string $default
* @param array $group
* @return array
*/
function getGrantArray($default, $group)
{
$grant = array();
if($default!="")
{
switch($default)
{
case "-2":
$grant = array("default_grant"=>"site");
break;
case "-3":
$grant = array("default_grant"=>"manager");
break;
default :
$grant = array("default_grant"=>"member");
break;
}
}
else if(is_array($group))
{
$oMemberModel = getModel('member');
$group_list = $oMemberModel->getGroups($this->site_srl);
$group_grant = array();
foreach($group as $group_srl)
{
$group_grant[$group_srl] = $group_list[$group_srl]->title;
}
$grant = array('group_grant'=>$group_grant);
}
return $grant;
}
/**
* @brief check member's grant
* @param object $member_info
* @param array $arrGrant
* @return boolean
*/
function checkGrant($arrGrant)
{
if(!$arrGrant)
return false;
$logged_info = Context::get('logged_info');
if(!$logged_info)
return false;
if($logged_info->is_admin == "Y")
return true;
if($arrGrant['default_grant'])
{
if($arrGrant['default_grant'] == "member" && $logged_info)
return true;
if($arrGrant['default_grant'] == "site" && $this->site_srl == $logged_info->site_srl)
return true;
if($arrGrant['default_grant'] == "manager" && $logged_info->is_admin == "Y")
return true;
}
if($arrGrant['group_grant'])
{
$group_grant = $arrGrant['group_grant'];
if(!is_array($group_grant))
return false;
foreach($logged_info->group_list as $group_srl=>$title)
{
if(isset($group_grant[$group_srl])&&$group_grant[$group_srl]==$title)
return true;
}
}
return false;
}
/**
* get the message contents
* @param int $message_srl

View file

@ -376,4 +376,12 @@
<value xml:lang="en"><![CDATA[Friends in a mobile environment is not supported. Please go to the PC page.]]></value>
<value xml:lang="jp"><![CDATA[モバイル環境では友達リストページをサポートしません。PC画面へ移動してください。]]></value>
</item>
<item name="cmd_write_communication">
<value xml:lang="ko"><![CDATA[작성 권한]]></value>
<value xml:lang="en"><![CDATA[Write Grant]]></value>
</item>
<item name="cmd_manage_base">
<value xml:lang="ko"><![CDATA[기본 정보]]></value>
<value xml:lang="en"><![CDATA[Basic infomation]]></value>
</item>
</lang>

View file

@ -1,6 +1,6 @@
<query id="getNewMessage" action="select">
<tables>
<table name="message" />
<table name="member_message" alias="message" />
<table name="member" />
</tables>
<columns>

View file

@ -1,4 +1,5 @@
<load target="js/communication_admin.js" usecdn="true" />
<load target="../../module/tpl/js/module_admin.js" />
<load target="../../editor/tpl/js/editor_module_config.js" usecdn="true" />
<div class="x_page-header">
@ -81,6 +82,24 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="mlayout_srl">{$lang->cmd_write_communication}</label>
<div class="x_controls">
<select name="grant_write_default" class="grant_default">
<option value="-1" selected="selected"|cond="$communication_config->grant_write['default_grant']=='member'">{$lang->grant_to_login_user}</option>
<option value="-2" selected="selected"|cond="$communication_config->grant_write['default_grant']=='site'">{$lang->grant_to_site_user}</option>
<option value="-3" selected="selected"|cond="$communication_config->grant_write['default_grant']=='manager'">{$lang->grant_to_admin}</option>
<option value="" selected="selected"|cond="$communication_config->grant_write['default_grant']==''">{$lang->grant_to_group}</option>
</select>
<div id="zone_grant_write" hidden style="margin:8px 0 0 0">
<label loop="$group_list => $group_srl, $group_item" for="grant_write_group_{$group_srl}">
<input type="checkbox" class="checkbox" name="grant_write_group[]" value="{$group_item->group_srl}" id="grant_write_group_{$group_item->group_srl}" checked="checked"|cond="isset($communication_config->grant_write['group_grant'][$group_srl])&&$communication_config->grant_write['group_grant'][$group_srl]==$group_item->title"/>
{$group_item->title}
</label>
</div>
</div>
</div>
<div class="btnArea">
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
</div>
@ -89,5 +108,7 @@
jQuery(function() {
doGetSkinColorset("{$communication_config->skin}", 'P');
doGetSkinColorset("{$communication_config->mskin}", 'M');
jQuery('.grant_default').change( function(event) { doShowGrantZone(); } );
doShowGrantZone()
});
</script>

View file

@ -8,7 +8,6 @@
*/
class counterModel extends counter
{
/**
* Initialization
*
@ -16,7 +15,6 @@ class counterModel extends counter
*/
function init()
{
}
/**
@ -32,26 +30,27 @@ class counterModel extends counter
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
$args->site_srl = $site_srl;
$iplogged = false;
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$object_key = 'counter:' . $site_srl . '_' . str_replace(array('.', ':'), '-', $args->ipaddress);
$cache_key = $oCacheHandler->getGroupKey('counterIpLogged_' . $args->regdate, $object_key);
if($oCacheHandler->isValid($cache_key))
{
return $oCacheHandler->get($cache_key);
}
$iplogged = $oCacheHandler->get($cache_key);
}
$output = executeQuery('counter.getCounterLog', $args);
$result = $output->data->count ? TRUE : FALSE;
if($result && $oCacheHandler->isSupport())
if($iplogged === false)
{
$oCacheHandler->put($cache_key, TRUE);
$output = executeQuery('counter.getCounterLog', $args);
if($output->data->count) $iplogged = TRUE;
}
return $result;
if($iplogged && $oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, $iplogged);
}
return $iplogged;
}
/**
@ -65,35 +64,37 @@ class counterModel extends counter
$args = new stdClass;
$args->regdate = date('Ymd');
$insertedTodayStatus = false;
$oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE);
if($oCacheHandler->isSupport())
{
$cache_key = 'counter:insertedTodayStatus:' . $site_srl . '_' . $args->regdate;
if($oCacheHandler->isValid($cache_key))
$insertedTodayStatus = $oCacheHandler->get($cache_key);
}
if($insertedTodayStatus === false)
{
if($site_srl)
{
return $oCacheHandler->get($cache_key);
$args->site_srl = $site_srl;
$output = executeQuery('counter.getSiteTodayStatus', $args);
}
else
{
$output = executeQuery('counter.getTodayStatus', $args);
}
$insertedTodayStatus = !!$output->data->count;
if($insertedTodayStatus && $oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, TRUE);
$_old_date = date('Ymd', strtotime('-1 day'));
$oCacheHandler->delete('counter:insertedTodayStatus:' . $site_srl . '_' . $_old_date);
}
}
if($site_srl)
{
$args->site_srl = $site_srl;
$output = executeQuery('counter.getSiteTodayStatus', $args);
}
else
{
$output = executeQuery('counter.getTodayStatus', $args);
}
$result = $output->data->count ? TRUE : FALSE;
if($result && $oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, TRUE);
$_old_date = date('Ymd', strtotime('-1 day'));
$oCacheHandler->delete('counter:insertedTodayStatus:' . $site_srl . '_' . $_old_date);
}
return $result;
return $insertedTodayStatus;
}
/**

View file

@ -14,6 +14,7 @@
<permission action="procDocumentMoveCategory" target="member" />
<permission action="procDocumentDeleteCategory" target="member" />
<permission action="procDocumentMakeXmlFile" target="member" />
<permission action="procDocumentAdminMoveToTrash" target="member" />
</permissions>
<actions>
<action name="dispDocumentPrint" type="view" />
@ -58,6 +59,7 @@
<action name="procDocumentAdminInsertConfig" type="controller" />
<action name="procDocumentAdminDeleteAllThumbnail" type="controller" />
<action name="procDocumentAdminCancelDeclare" type="controller" />
<action name="procDocumentAdminMoveToTrash" type="controller" />
</actions>
<menus>

View file

@ -140,7 +140,6 @@ class documentAdminController extends document
$oDB->rollback();
return $output;
}
// Set 0 if a new category doesn't exist after catergory change
if($source_category_srl != $category_srl)
{
@ -166,13 +165,18 @@ class documentAdminController extends document
$oDB->rollback();
return $output;
}
// move the trackback
$output = executeQuery('trackback.updateTrackbackModule', $args);
if(!$output->toBool())
if(getClass('trackback'))
{
$oDB->rollback();
return $output;
$output = executeQuery('trackback.updateTrackbackModule', $args);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
}
// Tags
$output = executeQuery('tag.updateTagModule', $args);
if(!$output->toBool())
@ -195,7 +199,7 @@ class documentAdminController extends document
{
foreach($document_srl_list as $document_srl)
{
$cache_key_item = 'document_item:'.$document_srl;
$cache_key_item = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key_item);
}
}
@ -451,9 +455,8 @@ class documentAdminController extends document
{
foreach($document_srl_list as $document_srl)
{
$cache_key_item = 'document_item:'.$document_srl;
$cache_key_item = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key_item);
$oCacheHandler->invalidateGroupKey('commentList_' . $document_srl);
}
}
}
@ -709,6 +712,81 @@ class documentAdminController extends document
return $this->setRedirectUrl($returnUrl, $output);
}
/**
* @fn procDocumentAdminMoveToTrash
* @brief move a document to trash.
* @see documentModel::getDocumentMenu
*/
function procDocumentAdminMoveToTrash()
{
$document_srl = Context::get('document_srl');
$oDocumentModel = getModel('document');
$oDocumentController = getController('document');
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
if(!$oDocument->isGranted()) return $this->stop('msg_not_permitted');
$oModuleModel = getModel('module');
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
$args = new stdClass();
$args->description = $message_content;
$args->document_srl = $document_srl;
$oDocumentController->moveDocumentToTrash($args);
$returnUrl = Context::get('success_return_url');
if(!$returnUrl)
{
$arrUrl = parse_url(Context::get('cur_url'));
$query = "";
if($arrUrl['query'])
{
parse_str($arrUrl['query'], $arrQuery);
// set query
if(isset($arrQuery['document_srl']))
unset($arrQuery['document_srl']);
$searchArgs = new stdClass;
foreach($arrQuery as $key=>$val)
{
$searchArgs->{$key} = $val;
}
if(!isset($searchArgs->sort_index))
$searchArgs->sort_index = $module_info->order_target;
foreach($module_info as $key=>$val)
{
if(!isset($searchArgs->{$key}))
$searchArgs->{$key} = $val;
}
$oDocumentModel = getModel('document');
$output = $oDocumentModel->getDocumentList($searchArgs, $module_info->except_notice, TRUE, array('document_srl'));
$cur_page = 1;
if(isset($arrQuery['page'])) {
$cur_page = (int)$arrQuery['page'];
}
if($cur_page>1 && count($output->data) == 0)
$arrQuery['page'] = $cur_page - 1;
$query = "?";
foreach($arrQuery as $key=>$val)
$query .= sprintf("%s=%s&", $key, $val);
$query = substr($query, 0, -1);
}
$returnUrl = $arrUrl['path'] . $query;
}
$this->add('redirect_url', $returnUrl);
}
/**
* Restor document from trash
* @return void|object
@ -797,6 +875,7 @@ class documentAdminController extends document
// If the post was not temorarily saved, set the attachment's status to be valid
if($oDocument->hasUploadedFiles() && $originObject->member_srl != $originObject->module_srl)
{
$args = new stdClass();
$args->upload_target_srl = $oDocument->document_srl;
$args->isvalid = 'Y';
$output = executeQuery('file.updateFileValid', $args);

View file

@ -50,7 +50,7 @@ class documentAdminView extends document
// get a list
$oDocumentModel = getModel('document');
$columnList = array('document_srl', 'title', 'member_srl', 'nick_name', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
$columnList = array('document_srl', 'module_srl', 'title', 'member_srl', 'nick_name', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
$output = $oDocumentModel->getDocumentList($args, false, true, $columnList);
// get Status name list
@ -72,6 +72,30 @@ class documentAdminView extends document
}
Context::set('search_option', $search_option);
$oModuleModel = getModel('module');
$module_list = array();
$mod_srls = array();
foreach($output->data as $oDocument)
{
$mod_srls[] = $oDocument->get('module_srl');
}
$mod_srls = array_unique($mod_srls);
// Module List
$mod_srls_count = count($mod_srls);
if($mod_srls_count)
{
$columnList = array('module_srl', 'mid', 'browser_title');
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
if($module_output && is_array($module_output))
{
foreach($module_output as $module)
{
$module_list[$module->module_srl] = $module;
}
}
}
Context::set('module_list', $module_list);
// Specify a template
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('document_list');

View file

@ -398,7 +398,15 @@ class documentController extends document
if(!$obj->commentStatus) $obj->commentStatus = 'DENY';
if($obj->commentStatus == 'DENY') $this->_checkCommentStatusForOldVersion($obj);
if($obj->allow_trackback!='Y') $obj->allow_trackback = 'N';
if($obj->homepage && !preg_match('/^[a-z]+:\/\//i',$obj->homepage)) $obj->homepage = 'http://'.$obj->homepage;
if($obj->homepage)
{
$obj->homepage = removeHackTag($obj->homepage);
if(!preg_match('/^[a-z]+:\/\//i',$obj->homepage))
{
$obj->homepage = 'http://'.$obj->homepage;
}
}
if($obj->notify_message != 'Y') $obj->notify_message = 'N';
// can modify regdate only manager
@ -555,7 +563,7 @@ class documentController extends document
if($oCacheHandler->isSupport())
{
//remove document item from cache
$cache_key = 'document_item:'.$obj->document_srl;
$cache_key = 'document_item:'. getNumberingPath($obj->document_srl) . $obj->document_srl;
$oCacheHandler->delete($cache_key);
}
@ -646,7 +654,7 @@ class documentController extends document
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$cache_key = 'document_item:'.$document_srl;
$cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key);
}
@ -793,6 +801,8 @@ class documentController extends document
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$cache_key = 'document_item:'. getNumberingPath($oDocument->document_srl) . $oDocument->document_srl;
$oCacheHandler->delete($cache_key);
}
return $output;
@ -808,9 +818,10 @@ class documentController extends document
$document_srl = $oDocument->document_srl;
$member_srl = $oDocument->get('member_srl');
$logged_info = Context::get('logged_info');
// Call a trigger when the read count is updated (after)
$output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
if(!$output->toBool()) return $output;
// Call a trigger when the read count is updated (before)
$trigger_output = ModuleHandler::triggerCall('document.updateReadedCount', 'before', $oDocument);
if(!$trigger_output->toBool()) return $trigger_output;
// Pass if read count is increaded on the session information
if($_SESSION['readed_document'][$document_srl]) return false;
@ -827,11 +838,33 @@ class documentController extends document
$_SESSION['readed_document'][$document_srl] = true;
return false;
}
$oDB = DB::getInstance();
$oDB->begin();
// Update read counts
$args = new stdClass;
$args->document_srl = $document_srl;
$output = executeQuery('document.updateReadedCount', $args);
// Call a trigger when the read count is updated (after)
$outptrigger_outputut = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
$oDB->commit();
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
//remove document item from cache
$cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key);
}
// Register session
$_SESSION['readed_document'][$document_srl] = true;
@ -1097,6 +1130,14 @@ class documentController extends document
$oDB->commit();
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
//remove document item from cache
$cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key);
}
// Leave in the session information
$_SESSION['voted_document'][$document_srl] = true;
@ -1238,6 +1279,14 @@ class documentController extends document
{
$args->update_order = -1*getNextSequence();
$args->last_updater = $last_updater;
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
//remove document item from cache
$cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key);
}
}
return executeQuery('document.updateCommentCount', $args);
@ -1255,6 +1304,14 @@ class documentController extends document
$args->document_srl = $document_srl;
$args->trackback_count = $trackback_count;
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
//remove document item from cache
$cache_key = 'document_item:'. getNumberingPath($document_srl) . $document_srl;
$oCacheHandler->delete($cache_key);
}
return executeQuery('document.updateTrackbackCount', $args);
}
@ -1358,6 +1415,30 @@ class documentController extends document
if(!$output->toBool()) return $output;
$this->makeCategoryFile($category_info->module_srl);
// remvove cache
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$page = 0;
while(true) {
$args = new stdClass();
$args->category_srl = $category_srl;
$args->list_count = 100;
$args->page = ++$page;
$output = executeQuery('document.getDocumentList', $args, array('document_srl'));
if($output->data == array())
break;
foreach($output->data as $val)
{
//remove document item from cache
$cache_key = 'document_item:'. getNumberingPath($val->document_srl) . $val->document_srl;
$oCacheHandler->delete($cache_key);
}
}
}
// Update category_srl of the documents in the same category to 0
$args = new stdClass();
$args->target_category_srl = 0;

View file

@ -76,30 +76,36 @@ class documentItem extends Object
{
if(!$this->document_srl) return;
$document_item = false;
$cache_put = false;
$columnList = array();
$this->columnList = array();
// cache controll
$oCacheHandler = CacheHandler::getInstance('object');
if($oCacheHandler->isSupport())
{
$cache_key = 'document_item:' . $this->document_srl;
$cache_key = 'document_item:' . getNumberingPath($this->document_srl) . $this->document_srl;
$document_item = $oCacheHandler->get($cache_key);
if($document_item)
if($document_item !== false)
{
$document_item = (object)$document_item->getVariables();
$this->columnList = array('readed_count', 'voted_count', 'blamed_count', 'comment_count', 'trackback_count');
}
else
{
$this->columnList = array();
$columnList = array('readed_count', 'voted_count', 'blamed_count', 'comment_count', 'trackback_count');
}
}
$args = new stdClass();
$args->document_srl = $this->document_srl;
$output = executeQuery('document.getDocument', $args, $this->columnList);
$output = executeQuery('document.getDocument', $args, $columnList);
if(!$document_item)
if($document_item === false)
{
$document_item = $output->data;
//insert in cache
if($document_item && $oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, $document_item);
}
}
else
{
@ -111,12 +117,6 @@ class documentItem extends Object
}
$this->setAttribute($document_item, $load_extra_vars);
//insert in cache
if($this->document_srl && $oCacheHandler->isSupport())
{
$oCacheHandler->put($cache_key, $this);
}
}
function setAttribute($attribute, $load_extra_vars=true)
@ -139,13 +139,12 @@ class documentItem extends Object
}
$oDocumentModel = getModel('document');
$GLOBALS['XE_DOCUMENT_LIST'][$this->document_srl] = $this;
if($load_extra_vars)
{
$GLOBALS['XE_DOCUMENT_LIST'][$attribute->document_srl] = $this;
$oDocumentModel->setToAllDocumentExtraVars();
$this->add('title', $GLOBALS['XE_DOCUMENT_LIST'][$this->document_srl]->get('title'));
$this->add('content', $GLOBALS['XE_DOCUMENT_LIST'][$this->document_srl]->get('content'));
}
$GLOBALS['XE_DOCUMENT_LIST'][$this->document_srl] = $this;
}
function isExists()
@ -194,22 +193,33 @@ class documentItem extends Object
static $allow_trackback_status = null;
if(is_null($allow_trackback_status))
{
// If the trackback module is configured to be disabled, do not allow. Otherwise, check the setting of each module.
$oModuleModel = getModel('module');
$trackback_config = $oModuleModel->getModuleConfig('trackback');
if(!$trackback_config)
// Check the tarckback module exist
if(!getClass('trackback'))
{
$trackback_config = new stdClass();
$allow_trackback_status = false;
}
if(!isset($trackback_config->enable_trackback)) $trackback_config->enable_trackback = 'Y';
if($trackback_config->enable_trackback != 'Y') $allow_trackback_status = false;
else
{
$module_srl = $this->get('module_srl');
// Check settings of each module
$module_config = $oModuleModel->getModulePartConfig('trackback', $module_srl);
if($module_config->enable_trackback == 'N') $allow_trackback_status = false;
else if($this->get('allow_trackback')=='Y' || !$this->isExists()) $allow_trackback_status = true;
// If the trackback module is configured to be disabled, do not allow. Otherwise, check the setting of each module.
$oModuleModel = getModel('module');
$trackback_config = $oModuleModel->getModuleConfig('trackback');
if(!$trackback_config)
{
$trackback_config = new stdClass();
}
if(!isset($trackback_config->enable_trackback)) $trackback_config->enable_trackback = 'Y';
if($trackback_config->enable_trackback != 'Y') $allow_trackback_status = false;
else
{
$module_srl = $this->get('module_srl');
// Check settings of each module
$module_config = $oModuleModel->getModulePartConfig('trackback', $module_srl);
if($module_config->enable_trackback == 'N') $allow_trackback_status = false;
else if($this->get('allow_trackback')=='Y' || !$this->isExists()) $allow_trackback_status = true;
}
}
}
return $allow_trackback_status;

View file

@ -53,11 +53,14 @@ class documentModel extends document
function setToAllDocumentExtraVars()
{
static $checked_documents = array();
$_document_list = &$GLOBALS['XE_DOCUMENT_LIST'];
// XE XE_DOCUMENT_LIST all documents that the object referred to the global variable settings
if(!count($GLOBALS['XE_DOCUMENT_LIST'])) return;
if(count($_document_list) <= 0) return;
// Find all called the document object variable has been set extension
$document_srls = array();
foreach($GLOBALS['XE_DOCUMENT_LIST'] as $key => $val)
foreach($_document_list as $key => $val)
{
if(!$val->document_srl || $checked_documents[$val->document_srl]) continue;
$checked_documents[$val->document_srl] = true;
@ -84,12 +87,11 @@ class documentModel extends document
$document_srl = $document_srls[$i];
unset($vars);
if(!$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] || !is_object($GLOBALS['XE_DOCUMENT_LIST'][$document_srl]) || !$GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->isExists()) continue;
$module_srl = $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->get('module_srl');
if(!$_document_list[$document_srl] || !is_object($_document_list[$document_srl]) || !$_document_list[$document_srl]->isExists()) continue;
$module_srl = $_document_list[$document_srl]->get('module_srl');
$extra_keys = $this->getExtraKeys($module_srl);
$vars = $extra_vars[$document_srl];
$document_lang_code = $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->get('lang_code');
$document_lang_code = $_document_list[$document_srl]->get('lang_code');
// Expand the variable processing
if(count($extra_keys))
{
@ -109,9 +111,9 @@ class documentModel extends document
$evars = new ExtraVar($module_srl);
$evars->setExtraVarKeys($extra_keys);
// Title Processing
if($vars[-1][$user_lang_code]) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->add('title',$vars[-1][$user_lang_code]);
if($vars[-1][$user_lang_code]) $_document_list[$document_srl]->add('title',$vars[-1][$user_lang_code]);
// Information processing
if($vars[-2][$user_lang_code]) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->add('content',$vars[-2][$user_lang_code]);
if($vars[-2][$user_lang_code]) $_document_list[$document_srl]->add('content',$vars[-2][$user_lang_code]);
if($vars[-1][$user_lang_code] || $vars[-2][$user_lang_code])
{
@ -134,12 +136,11 @@ class documentModel extends document
{
if(!$document_srl) return new documentItem();
if(!isset($GLOBALS['XE_DOCUMENT_LIST'][$document_srl]) || $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->columnListKey != serialize($columnList))
if(!$GLOBALS['XE_DOCUMENT_LIST'][$document_srl])
{
$oDocument = new documentItem($document_srl, $load_extra_vars, $columnList);
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;
if($load_extra_vars) $this->setToAllDocumentExtraVars();
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->columnListKey = serialize($columnList);
}
if($is_admin) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->setGrant();
@ -361,8 +362,9 @@ class documentModel extends document
*/
function getExtraKeys($module_srl)
{
if(is_null($GLOBALS['XE_EXTRA_KEYS'][$module_srl]))
if(!isset($GLOBALS['XE_EXTRA_KEYS'][$module_srl]))
{
$keys = false;
$oCacheHandler = CacheHandler::getInstance('object', null, true);
if($oCacheHandler->isSupport())
{
@ -371,8 +373,9 @@ class documentModel extends document
$keys = $oCacheHandler->get($cache_key);
}
$oExtraVar = &ExtraVar::getInstance($module_srl);
if(!$keys)
$oExtraVar = ExtraVar::getInstance($module_srl);
if($keys === false)
{
$obj = new stdClass();
$obj->module_srl = $module_srl;
@ -517,6 +520,13 @@ class documentModel extends document
$oDocumentController->addDocumentPopupMenu($url,'cmd_print','','printDocument');
// Call a trigger (after)
ModuleHandler::triggerCall('document.getDocumentMenu', 'after', $menu_list);
if($this->grant->manager)
{
$str_confirm = Context::getLang('confirm_move');
$url = sprintf("if(!confirm('%s')) return; var params = new Array(); params['document_srl']='%s'; params['mid']=current_mid;params['cur_url']=current_url; exec_xml('document', 'procDocumentAdminMoveToTrash', params)", $str_confirm, $document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_trash','','javascript');
}
// If you are managing to find posts by ip
if($logged_info->is_admin == 'Y')
{

View file

@ -160,6 +160,7 @@ class documentView extends document
if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
// Get the saved document (module_srl is set to member_srl instead)
$logged_info = Context::get('logged_info');
$args = new stdClass();
$args->member_srl = $logged_info->member_srl;
$args->statusList = array($this->getConfigStatus('temp'));
$args->page = (int)Context::get('page');

View file

@ -9,6 +9,7 @@
<conditions>
<condition operation="in" column="documents.module_srl" var="module_srl" filter="number" />
<condition operation="in" column="documents.category_srl" var="category_srl" filter="number" pipe="and" />
<condition operation="equal" column="documents.member_srl" var="member_srl" filter="number" pipe="and" />
<condition operation="equal" column="extra_vars.module_srl" default="documents.module_srl" pipe="and" />
<condition operation="equal" column="extra_vars.document_srl" default="documents.document_srl" pipe="and" />
<condition operation="equal" column="extra_vars.var_idx" var="var_idx" notnull="notnull" pipe="and" />

View file

@ -9,6 +9,7 @@
<conditions>
<condition operation="in" column="documents.module_srl" var="module_srl" filter="number" />
<condition operation="in" column="documents.category_srl" var="category_srl" filter="number" pipe="and" />
<condition operation="equal" column="documents.member_srl" var="member_srl" filter="number" pipe="and" />
<condition operation="equal" column="extra_vars.module_srl" default="documents.module_srl" pipe="and" />
<condition operation="equal" column="extra_vars.document_srl" default="documents.document_srl" pipe="and" />
<condition operation="equal" column="extra_vars.var_idx" var="var_idx" notnull="notnull" pipe="and" />

View file

@ -48,7 +48,11 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
</thead>
<tbody>
<tr loop="$document_list => $no, $oDocument">
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
<td class="title">
<block cond="isset($module_list[$oDocument->get('module_srl')])">
<a href="{getUrl('', 'mid', $module_list[$oDocument->get('module_srl')]->mid)}" target="_blank">{$module_list[$oDocument->get('module_srl')]->browser_title}</a> -
</block>
<a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
<td class="nowr">{$oDocument->get('readed_count')}</td>
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
function getSlideShow(){var a,b,c,d,e,f,g,h,i="";if("undefined"!=typeof opener){a=opener.editorPrevNode,b=jQuery(a),b.is("img")&&(selected_node=a,c=b.width(),d=b.attr("gallery_style"),e=b.attr("gallery_align")||"center",f=b.attr("border_color"),g=b.attr("bg_color"),h=b.attr("border_thickness")||1,get_by_id("width").value=c,get_by_id("gallery_style").selectedIndex="list"==d?1:0,get_by_id("gallery_align").selectedIndex="left"==e?1:"right"==e?2:0,get_by_id("border_thickness").value=h,get_by_id("border_color_input").value=f,get_by_id("bg_color_input").value=g,i=b.attr("images_list"));var j=get_by_id("fo"),k=j.editor_sequence.value,l=opener.get_by_id("uploaded_file_list_"+k);if(l)for(var m=get_by_id("image_list"),n=0;n<l.length;n++){var o=l.options[n],p=o.value;if(!p)return;var q=opener.uploadedFiles[p],r=q.download_url.replace(request_uri,"");if(/(jpg|jpeg|gif|png)$/i.test(r)){var s=!1;-1!=i.indexOf(r)&&(s=!0);var o=new Option(o.text,o.value,!1,s);m.options.add(o)}}}}function insertSlideShow(){if("undefined"!=typeof opener){for(var a=new Array,b=get_by_id("image_list"),c=0;c<b.length;c++){var d=b.options[c];if(d.selected){var e=d.value,f=opener.uploadedFiles[e],g=f.download_url.replace(request_uri,"");a[a.length]=g}}if(!a.length)return window.close(),void 0;for(var h=get_by_id("width").value,i=get_by_id("gallery_style").options[get_by_id("gallery_style").selectedIndex].value,j=get_by_id("gallery_align").options[get_by_id("gallery_align").selectedIndex].value,k=get_by_id("border_thickness").value,l=get_by_id("border_color_input").value,m=get_by_id("bg_color_input").value,n="",c=0;c<a.length;c++)n+=a[c].trim()+" ";if(selected_node)selected_node.setAttribute("width",h),selected_node.setAttribute("gallery_style",i),selected_node.setAttribute("align",j),selected_node.setAttribute("gallery_align",j),selected_node.setAttribute("border_thickness",k),selected_node.setAttribute("border_color",l),selected_node.setAttribute("bg_color",m),selected_node.setAttribute("images_list",n),selected_node.style.width=h+"px";else{var o='<img src="../../../../common/img/blank.gif" editor_component="image_gallery" width="'+h+'" gallery_style="'+i+'" align="'+j+'" gallery_align="'+j+'" border_thickness="'+k+'" border_color="'+l+'" bg_color="'+m+'" style="width:'+h+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/image_gallery/tpl/image_gallery_component.gif) no-repeat center;" images_list="'+n+'" />';opener.editorFocus(opener.editorPrevSrl);var p=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(p,o)}opener.editorFocus(opener.editorPrevSrl),window.close()}}function select_color(a,b){get_by_id(a+"_preview_color").style.backgroundColor="#"+b,get_by_id(a+"_color_input").value=b}var selected_node=null;jQuery(function(){getSlideShow()});
function getSlideShow(){var a,b,c,d,e,f,g,h,i="";if("undefined"!=typeof opener){a=opener.editorPrevNode,b=jQuery(a),b.is("img")&&(selected_node=a,c=b.width(),d=b.attr("gallery_style"),e=b.attr("gallery_align")||"center",f=b.attr("border_color"),g=b.attr("bg_color"),h=b.attr("border_thickness")||1,get_by_id("width").value=c,get_by_id("gallery_style").selectedIndex="list"==d?1:0,get_by_id("gallery_align").selectedIndex="left"==e?1:"right"==e?2:0,get_by_id("border_thickness").value=h,get_by_id("border_color_input").value=f,get_by_id("bg_color_input").value=g,i=b.attr("images_list"));var j=get_by_id("fo"),k=j.editor_sequence.value,l=opener.get_by_id("uploaded_file_list_"+k);if(l)for(var m=get_by_id("image_list"),n=0;n<l.length;n++){var o=l.options[n],p=o.value;if(!p)return;var q=opener.uploadedFiles[p],r=q.download_url.replace(request_uri,"");if(/(jpg|jpeg|gif|png)$/i.test(r)){var s=!1;-1!=i.indexOf(r)&&(s=!0);var o=new Option(o.text,o.value,!1,s);m.options.add(o)}}}}function insertSlideShow(){if("undefined"!=typeof opener){for(var a=new Array,b=get_by_id("image_list"),c=0;c<b.length;c++){var d=b.options[c];if(d.selected){var e=d.value,f=opener.uploadedFiles[e],g=f.download_url.replace(request_uri,"");a[a.length]=g}}if(!a.length)return void window.close();for(var h=get_by_id("width").value,i=get_by_id("gallery_style").options[get_by_id("gallery_style").selectedIndex].value,j=get_by_id("gallery_align").options[get_by_id("gallery_align").selectedIndex].value,k=get_by_id("border_thickness").value,l=get_by_id("border_color_input").value,m=get_by_id("bg_color_input").value,n="",c=0;c<a.length;c++)n+=a[c].trim()+" ";if(selected_node)selected_node.setAttribute("width",h),selected_node.setAttribute("gallery_style",i),selected_node.setAttribute("align",j),selected_node.setAttribute("gallery_align",j),selected_node.setAttribute("border_thickness",k),selected_node.setAttribute("border_color",l),selected_node.setAttribute("bg_color",m),selected_node.setAttribute("images_list",n),selected_node.style.width=h+"px";else{var o='<img src="../../../../common/img/blank.gif" editor_component="image_gallery" width="'+h+'" gallery_style="'+i+'" align="'+j+'" gallery_align="'+j+'" border_thickness="'+k+'" border_color="'+l+'" bg_color="'+m+'" style="width:'+h+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/image_gallery/tpl/image_gallery_component.gif) no-repeat center;" images_list="'+n+'" />';opener.editorFocus(opener.editorPrevSrl);var p=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(p,o)}opener.editorFocus(opener.editorPrevSrl),window.close()}}function select_color(a,b){get_by_id(a+"_preview_color").style.backgroundColor="#"+b,get_by_id(a+"_color_input").value=b}var selected_node=null;jQuery(function(){getSlideShow()});

View file

@ -1 +1 @@
!function(a){var b=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={},this._thumbs={},this._current={}},API_SHOW_SLIDE:function(b,c){var d,e,f,g,h,i,j=this,k=c[0],l="@"+k;if(d=this.cast("GET_IMAGES",[k]),d.length){for(var h=0,m=d.length;m>h;h++)if(!d[h].loaded)return setTimeout(function(){j.cast("SHOW_SLIDE",c)},200),void 0;for(e=a("#zone_slide_gallery_"+k),g=e.find(".slide_gallery_placeholder").css("overflow","hidden"),e.find(".slide_gallery_loading_text").remove(),f=e.find(".slide_gallery_thumbnail_image_box").show(),h=0,i=d.length;i>h;h++)d[h].$obj.clone().css({cursor:"pointer",width:"60px",height:"60px",margin:"5px",opacity:.5}).click({idx:h},function(a){j.cast("SET_SLIDE",[k,a.data.idx])}).appendTo(f);a("#zone_gallery_navigator_status_"+k).click(function(){f.toggle()}),e.find(".__prev").click(function(){return j.cast("PREV_SLIDE",[k]),!1}).end().find(".__next").click(function(){return j.cast("NEXT_SLIDE",[k]),!1}),this._holders[l]=g,this._thumbs[l]=f,this._current[l]=0,this.cast("SET_SLIDE",[k,0])}},_showSideSlide:function(a,b){var c,d,e;c=this.cast("GET_IMAGES",[a]),c.length&&(d=this._current["@"+a],e=d+b,0>e?e=c.length-1:e>=c.length&&(e=0),this.cast("SET_SLIDE",[a,e]))},API_NEXT_SLIDE:function(a,b){this._showSideSlide(b[0],1)},API_PREV_SLIDE:function(a,b){this._showSideSlide(b[0],-1)},API_SET_SLIDE:function(b,c){var d,e,f,g,h,i,j,k,l,m=c[0],n=c[1];d=this.cast("GET_IMAGES",[m]),d.length&&is_def(e=d[n])&&(this._current["@"+m]=n,a("#zone_gallery_navigator_status_"+m).text(n+1+"/"+d.length),this._thumbs["@"+m].find("img").eq(n).animate({opacity:1}).end().not(":eq("+n+")").animate({opacity:.5}),f=this._holders["@"+m],g=f.parent().innerWidth(),h=e.$obj.prop("width"),j=e.$obj.prop("height"),0==h&&(h=e.$obj.attr("width")),0==j&&(j=e.$obj.attr("height")),h>g-20&&(i=g-20,l=i/h,k=Math.floor(j*l),h=i,j=k,e.$obj.css("cursor","pointer"),e.$obj.attr("rel","xe_gallery")),e.$obj.css({width:h,height:j,margin:"0 10px"}),f.empty().append(e.$obj))}}),c=xe.getApp("Gallery")[0];c&&c.registerPlugin(new b)}(jQuery);
!function(a){var b=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={},this._thumbs={},this._current={}},API_SHOW_SLIDE:function(b,c){var d,e,f,g,h,i,j=this,k=c[0],l="@"+k;if(d=this.cast("GET_IMAGES",[k]),d.length){for(var h=0,m=d.length;m>h;h++)if(!d[h].loaded)return void setTimeout(function(){j.cast("SHOW_SLIDE",c)},200);for(e=a("#zone_slide_gallery_"+k),g=e.find(".slide_gallery_placeholder").css("overflow","hidden"),e.find(".slide_gallery_loading_text").remove(),f=e.find(".slide_gallery_thumbnail_image_box").show(),h=0,i=d.length;i>h;h++)d[h].$obj.clone().css({cursor:"pointer",width:"60px",height:"60px",margin:"5px",opacity:.5}).click({idx:h},function(a){j.cast("SET_SLIDE",[k,a.data.idx])}).appendTo(f);a("#zone_gallery_navigator_status_"+k).click(function(){f.toggle()}),e.find(".__prev").click(function(){return j.cast("PREV_SLIDE",[k]),!1}).end().find(".__next").click(function(){return j.cast("NEXT_SLIDE",[k]),!1}),this._holders[l]=g,this._thumbs[l]=f,this._current[l]=0,this.cast("SET_SLIDE",[k,0])}},_showSideSlide:function(a,b){var c,d,e;c=this.cast("GET_IMAGES",[a]),c.length&&(d=this._current["@"+a],e=d+b,0>e?e=c.length-1:e>=c.length&&(e=0),this.cast("SET_SLIDE",[a,e]))},API_NEXT_SLIDE:function(a,b){this._showSideSlide(b[0],1)},API_PREV_SLIDE:function(a,b){this._showSideSlide(b[0],-1)},API_SET_SLIDE:function(b,c){var d,e,f,g,h,i,j,k,l,m=c[0],n=c[1];d=this.cast("GET_IMAGES",[m]),d.length&&is_def(e=d[n])&&(this._current["@"+m]=n,a("#zone_gallery_navigator_status_"+m).text(n+1+"/"+d.length),this._thumbs["@"+m].find("img").eq(n).animate({opacity:1}).end().not(":eq("+n+")").animate({opacity:.5}),f=this._holders["@"+m],g=f.parent().innerWidth(),h=e.$obj.prop("width"),j=e.$obj.prop("height"),0==h&&(h=e.$obj.attr("width")),0==j&&(j=e.$obj.attr("height")),h>g-20&&(i=g-20,l=i/h,k=Math.floor(j*l),h=i,j=k,e.$obj.css("cursor","pointer"),e.$obj.attr("rel","xe_gallery")),e.$obj.css({width:h,height:j,margin:"0 10px"}),f.empty().append(e.$obj))}}),c=xe.getApp("Gallery")[0];c&&c.registerPlugin(new b)}(jQuery);

View file

@ -681,107 +681,93 @@ class editorModel extends editor
function getComponentXmlInfo($component)
{
$lang_type = Context::getLangType();
// Get xml file path of the requested components
$component_path = sprintf('%s/components/%s/', $this->module_path, $component);
$xml_file = sprintf('%sinfo.xml', $component_path);
$cache_file = sprintf('./files/cache/editor/%s.%s.php', $component, $lang_type);
// Include and return xml file information if cached file exists
if(file_exists($cache_file) && file_exists($xml_file) && filemtime($cache_file) > filemtime($xml_file))
{
include($cache_file);
return $xml_info;
}
// Parse, cache and then return if the cached file doesn't exist
$oParser = new XmlParser();
$xml_doc = $oParser->loadXmlFile($xml_file);
// Component information listed
if($xml_doc->component->version && $xml_doc->component->attrs->version == '0.2')
$component_info = new stdClass;
$component_info->author = array();
$component_info->extra_vars = new stdClass;
$component_info->component_name = $component;
$component_info->title = $xml_doc->component->title->body;
if($xml_doc->component->version)
{
$component_info = new stdClass();
$component_info->component_name = $component;
$component_info->title = $xml_doc->component->title->body;
$component_info->description = str_replace('\n', "\n", $xml_doc->component->description->body);
$component_info->version = $xml_doc->component->version->body;
$component_info->date = $xml_doc->component->date->body;
$component_info->homepage = $xml_doc->component->link->body;
$component_info->license = $xml_doc->component->license->body;
$component_info->license_link = $xml_doc->component->license->attrs->link;
$buff = '<?php if(!defined("__XE__")) exit(); ';
$buff .= '$xml_info = new stdClass();';
$buff .= sprintf('$xml_info->component_name = "%s";', $component_info->component_name);
$buff .= sprintf('$xml_info->title = "%s";', $component_info->title);
$buff .= sprintf('$xml_info->description = "%s";', $component_info->description);
$buff .= sprintf('$xml_info->version = "%s";', $component_info->version);
$buff .= sprintf('$xml_info->date = "%s";', $component_info->date);
$buff .= sprintf('$xml_info->homepage = "%s";', $component_info->homepage);
$buff .= sprintf('$xml_info->license = "%s";', $component_info->license);
$buff .= sprintf('$xml_info->license_link = "%s";', $component_info->license_link);
// Author information
if(!is_array($xml_doc->component->author)) $author_list[] = $xml_doc->component->author;
else $author_list = $xml_doc->component->author;
for($i=0; $i < count($author_list); $i++)
{
$buff .= '$xml_info->author[' . $i .']= new stdClass();';
$buff .= sprintf('$xml_info->author['.$i.']->name = "%s";', $author_list[$i]->name->body);
$buff .= sprintf('$xml_info->author['.$i.']->email_address = "%s";', $author_list[$i]->attrs->email_address);
$buff .= sprintf('$xml_info->author['.$i.']->homepage = "%s";', $author_list[$i]->attrs->link);
}
}
else
{
sscanf($xml_doc->component->author->attrs->date, '%d. %d. %d', $date_obj->y, $date_obj->m, $date_obj->d);
$date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d);
$xml_info = new stdClass();
$xml_info->component_name = $component;
$xml_info->title = $xml_doc->component->title->body;
$xml_info->description = str_replace('\n', "\n", $xml_doc->component->author->description->body);
$xml_info->version = $xml_doc->component->attrs->version;
$xml_info->date = $date;
$xml_info->author->name = $xml_doc->component->author->name->body;
$xml_info->author->email_address = $xml_doc->component->author->attrs->email_address;
$xml_info->author->homepage = $xml_doc->component->author->attrs->link;
$buff = '<?php if(!defined("__XE__")) exit(); ';
$buff .= '$xml_info = new stdClass();';
$buff .= sprintf('$xml_info->component_name = "%s";', $xml_info->component_name);
$buff .= sprintf('$xml_info->title = "%s";', $xml_info->title);
$buff .= sprintf('$xml_info->description = "%s";', $xml_info->description);
$buff .= sprintf('$xml_info->version = "%s";', $xml_info->version);
$buff .= sprintf('$xml_info->date = "%s";', $xml_info->date);
$buff .= sprintf('$xml_info->author[0]->name = "%s";', $xml_info->author->name);
$buff .= sprintf('$xml_info->author[0]->email_address = "%s";', $xml_info->author->email_address);
$buff .= sprintf('$xml_info->author[0]->homepage = "%s";', $xml_info->author->homepage);
$component_info->description = str_replace('\n', "\n", $xml_doc->component->author->description->body);
$component_info->version = $xml_doc->component->attrs->version;
$component_info->date = $date;
$component_info->author = array();
$component_info->author[0]->name = $xml_doc->component->author->name->body;
$component_info->author[0]->email_address = $xml_doc->component->author->attrs->email_address;
$component_info->author[0]->homepage = $xml_doc->component->author->attrs->link;
}
// Author information
$author_list = array();
if(!is_array($xml_doc->component->author)) $author_list[] = $xml_doc->component->author;
else $author_list = $xml_doc->component->author;
for($i = 0; $i < count($author_list); $i++)
{
$author = new stdClass;
$author->name = $author_list[$i]->name->body;
$author->email_address = $author_list[$i]->attrs->email_address;
$author->homepage = $author_list[$i]->attrs->link;
$component_info->author[] = $author;
}
// List extra variables (text type only for editor component)
$extra_vars = $xml_doc->component->extra_vars->var;
if($extra_vars)
{
if(!is_array($extra_vars)) $extra_vars = array($extra_vars);
foreach($extra_vars as $key => $val)
{
unset($obj);
$key = $val->attrs->name;
$title = $val->title->body;
$description = $val->description->body;
$xml_info->extra_vars->{$key}->title = $title;
$xml_info->extra_vars->{$key}->description = $description;
$buff .= sprintf('$xml_info->extra_vars->%s = new stdClass();', $key);
$buff .= sprintf('$xml_info->extra_vars->%s->%s = "%s";', $key, 'title', $title);
$buff .= sprintf('$xml_info->extra_vars->%s->%s = "%s";', $key, 'description', $description);
$extra_var = new stdClass;
$extra_var->title = $val->title->body;
$extra_var->description = $val->description->body;
$component_info->extra_vars->{$key} = $extra_var;
}
}
$buff .= ' ?>';
$buff = array();
$buff[] = '<?php if(!defined(\'__XE__\')) exit();';
$buff[] = '$xml_info = ' . var_export($component_info, TRUE) . ';';
$buff = str_replace('stdClass::__set_state', '(object)', implode(PHP_EOL, $buff));
FileHandler::writeFile($cache_file, $buff, "w");
FileHandler::writeFile($cache_file, $buff, 'w');
unset($xml_info);
include($cache_file);
return $xml_info;
return $component_info;
}
}
/* End of file editor.model.php */

View file

@ -3,7 +3,7 @@
<item name="editor_now">
<value xml:lang="ko"><![CDATA[현재 설정 상태]]></value>
<value xml:lang="en"><![CDATA[현재 설정 상태]]></value>
<value xml:lang="jp"><![CDATA[현재 설정 상태]]></value>
<value xml:lang="jp"><![CDATA[現在の設定状況]]></value>
<value xml:lang="zh-CN"><![CDATA[현재 설정 상태]]></value>
<value xml:lang="zh-TW"><![CDATA[현재 설정 상태]]></value>
<value xml:lang="ru"><![CDATA[현재 설정 상태]]></value>
@ -93,7 +93,7 @@
<item name="guide_choose_text_formatting">
<value xml:lang="ko"><![CDATA[본문 서식]]></value>
<value xml:lang="en"><![CDATA[Text formatting]]></value>
<value xml:lang="jp"><![CDATA[本文のスタイル]]></value>
<value xml:lang="jp"><![CDATA[本文の書式]]></value>
<value xml:lang="zh-CN"><![CDATA[Text formatting.]]></value>
<value xml:lang="zh-TW"><![CDATA[Text formatting.]]></value>
<value xml:lang="ru"><![CDATA[Text formatting.]]></value>
@ -183,7 +183,7 @@
<item name="component_author">
<value xml:lang="ko"><![CDATA[제작자]]></value>
<value xml:lang="en"><![CDATA[Developer]]></value>
<value xml:lang="jp"><![CDATA[作者]]></value>
<value xml:lang="jp"><![CDATA[作者]]></value>
<value xml:lang="zh-CN"><![CDATA[作者]]></value>
<value xml:lang="zh-TW"><![CDATA[作者]]></value>
<value xml:lang="fr"><![CDATA[Développeur]]></value>
@ -227,7 +227,7 @@
<item name="component_history">
<value xml:lang="ko"><![CDATA[변경 이력]]></value>
<value xml:lang="en"><![CDATA[Updates]]></value>
<value xml:lang="jp"><![CDATA[更履歴]]></value>
<value xml:lang="jp"><![CDATA[履歴]]></value>
<value xml:lang="zh-CN"><![CDATA[更新日志]]></value>
<value xml:lang="zh-TW"><![CDATA[更新紀錄]]></value>
<value xml:lang="fr"><![CDATA[Histoire]]></value>
@ -374,7 +374,7 @@
<item name="msg_load_saved_doc">
<value xml:lang="ko"><![CDATA[자동 저장된 글이 있습니다. 복구하시겠습니까? 글을 다 쓰신 후 저장하면 자동 저장 본은 사라집니다.]]></value>
<value xml:lang="en"><![CDATA[There is a draft automatically saved. Do you want to restore it? The auto-saved draft will be discarded when you write and save it.]]></value>
<value xml:lang="jp"><![CDATA[自動保存された書き込みがあります。復しますか?書き終わってから登録すると前の自動保存データは削除されます。]]></value>
<value xml:lang="jp"><![CDATA[自動保存された書き込みがあります。復しますか?書き終わってから登録すると前の自動保存データは削除されます。]]></value>
<value xml:lang="zh-CN"><![CDATA[有自动保存的内容, 确定要恢复吗?发布主题后,自动保存的文本将会被删除。]]></value>
<value xml:lang="zh-TW"><![CDATA[有自動儲存的內容,確定要恢復嗎? 儲存內容後,自動儲存的內容將會被刪除。]]></value>
<value xml:lang="fr"><![CDATA[Il y a un article conservé automatiquement. Voulez-vous le réstaurer? L'esquisse conservé automatiquement va être débarrasser après conserver l'article courant.]]></value>
@ -641,7 +641,7 @@
<item name="header">
<value xml:lang="ko"><![CDATA[형식]]></value>
<value xml:lang="en"><![CDATA[Style]]></value>
<value xml:lang="jp"><![CDATA[スタイル]]></value>
<value xml:lang="jp"><![CDATA[書式]]></value>
<value xml:lang="zh-CN"><![CDATA[样式]]></value>
<value xml:lang="zh-TW"><![CDATA[樣式]]></value>
<value xml:lang="ru"><![CDATA[Стиль]]></value>
@ -864,7 +864,7 @@
<item name="add_indent">
<value xml:lang="ko"><![CDATA[들여쓰기]]></value>
<value xml:lang="en"><![CDATA[Indent]]></value>
<value xml:lang="jp"><![CDATA[インデント増]]></value>
<value xml:lang="jp"><![CDATA[字下げ]]></value>
<value xml:lang="zh-CN"><![CDATA[增加缩进]]></value>
<value xml:lang="zh-TW"><![CDATA[縮排]]></value>
<value xml:lang="tr"><![CDATA[Girinti]]></value>
@ -873,7 +873,7 @@
<item name="remove_indent">
<value xml:lang="ko"><![CDATA[내어쓰기]]></value>
<value xml:lang="en"><![CDATA[Outdent]]></value>
<value xml:lang="jp"><![CDATA[インデント減]]></value>
<value xml:lang="jp"><![CDATA[字上げ]]></value>
<value xml:lang="zh-CN"><![CDATA[减少缩进]]></value>
<value xml:lang="zh-TW"><![CDATA[凸排]]></value>
<value xml:lang="tr"><![CDATA[Çıkıntı]]></value>
@ -910,7 +910,7 @@
<item name="help_remove_format">
<value xml:lang="ko"><![CDATA[선택된 영역 내의 태그를 지웁니다.]]></value>
<value xml:lang="en"><![CDATA[Tags in selected area will be removed.]]></value>
<value xml:lang="jp"><![CDATA[選択領域の中のタグを消します。]]></value>
<value xml:lang="jp"><![CDATA[選択範囲内のタグを消します。]]></value>
<value xml:lang="zh-CN"><![CDATA[清除格式。]]></value>
<value xml:lang="zh-TW"><![CDATA[移除格式]]></value>
<value xml:lang="fr"><![CDATA[Supprimer les balises dans l'endroit sélectionné]]></value>
@ -1104,7 +1104,7 @@
<item name="help_add_indent">
<value xml:lang="ko"><![CDATA[단락의 들여쓰기 수준을 높입니다.]]></value>
<value xml:lang="en"><![CDATA[Add indent]]></value>
<value xml:lang="jp"><![CDATA[インデントを増やします。]]></value>
<value xml:lang="jp"><![CDATA[字上げします。]]></value>
<value xml:lang="zh-CN"><![CDATA[增加缩进]]></value>
<value xml:lang="zh-TW"><![CDATA[縮排]]></value>
<value xml:lang="fr"><![CDATA[Ajouter un Rentré]]></value>
@ -1116,7 +1116,7 @@
<item name="help_remove_indent">
<value xml:lang="ko"><![CDATA[단락의 들여쓰기 수준을 낮춥니다.]]></value>
<value xml:lang="en"><![CDATA[Remove indent]]></value>
<value xml:lang="jp"><![CDATA[インデントを減らします。]]></value>
<value xml:lang="jp"><![CDATA[字下げします。]]></value>
<value xml:lang="zh-CN"><![CDATA[减少缩进]]></value>
<value xml:lang="zh-TW"><![CDATA[凸排]]></value>
<value xml:lang="fr"><![CDATA[Enlever un Rentré]]></value>
@ -1240,7 +1240,7 @@
<item name="link_file">
<value xml:lang="ko"><![CDATA[본문 삽입]]></value>
<value xml:lang="en"><![CDATA[Insert to Content]]></value>
<value xml:lang="jp"><![CDATA[テキスト挿入]]></value>
<value xml:lang="jp"><![CDATA[テキスト挿入]]></value>
<value xml:lang="zh-CN"><![CDATA[插入附件]]></value>
<value xml:lang="zh-TW"><![CDATA[插入檔案]]></value>
<value xml:lang="fr"><![CDATA[Insérer dans le Texte]]></value>
@ -1966,7 +1966,7 @@
<item name="confirm_submit_without_saving">
<value xml:lang="ko"><![CDATA[저장하지 않은 단락이 있습니다.\n그냥 전송하시겠습니까?]]></value>
<value xml:lang="en"><![CDATA[There are paragraphs which were not saved.\nProceed anyway?]]></value>
<value xml:lang="jp"><![CDATA[まだ保存してない内容があります。\nそのまま転送してよろしいでしょうか?]]></value>
<value xml:lang="jp"><![CDATA[まだ保存してない内容があります。\nそのまま転送してよろしいでしょうか?]]></value>
<value xml:lang="zh-CN"><![CDATA[尚有未保存的段落。\n确定要提交吗]]></value>
<value xml:lang="zh-TW"><![CDATA[有內容尚未儲存。\n是否要繼續進行?]]></value>
<value xml:lang="ru"><![CDATA[Есть несохраненные параграфы\nПродолжить?]]></value>
@ -1997,7 +1997,7 @@
<item name="about_dblclick_in_editor">
<value xml:lang="ko"><![CDATA[배경, 글자, 이미지, 인용문등에서 더블클릭을 하면 상세한 컴포넌트 설정이 가능합니다.]]></value>
<value xml:lang="en"><![CDATA[You may set the component's detailed configurations by double-clicking background, text, images, or quotations.]]></value>
<value xml:lang="jp"><![CDATA[背景、文字、イメージ、引用文の上にカーソルを合わせ、ダブルクリックすると詳細設定できるコンポーネントを表示します。]]></value>
<value xml:lang="jp"><![CDATA[背景、文字、イメージ、引用文の上ダブルクリックすると詳細設定できるコンポーネントを表示します。]]></value>
<value xml:lang="zh-CN"><![CDATA[双击背景, 文本, 图片, 引用即可对其相关组件进行详细设置。]]></value>
<value xml:lang="zh-TW"><![CDATA[對背景,文字,圖片,引用等組件按兩下,即可對其相關組件進行詳細設置。]]></value>
<value xml:lang="fr"><![CDATA[Vous pouvez configurer en détail des composants par double-clic sur un arrière-plan, un texte, une image ou une citation]]></value>

File diff suppressed because one or more lines are too long

View file

@ -1,10 +1,12 @@
<!--%import("filter/insert_editor_module_config.xml")-->
<load target="js/editor_module_config.js" />
<form action="./" method="post" class="section">
<input type="hidden" name="act" value="procEditorInsertModuleConfig" />
<input type="hidden" name="module" value="editor" />
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="xe_validator_id" value="modules/editor/addition_setup/1" />
<h1>{$lang->editor}</h1>
<table class="x_table x_table-striped x_table-hover">
<thead>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
function getEditorSkinColorList(a,b,c,d){if(a.length>0){c=c||"document";var e=new Array("error","message","colorset");exec_xml("editor","dispEditorSkinColorset",{skin:a},resultGetEditorSkinColorList,e,{selected_colorset:b,type:c,testid:d})}}function resultGetEditorSkinColorList(a,b,c){var d=null;jQuery(function(b){if(d=c.testid?b("#"+c.testid).next("label").children("select"):"document"==c.type?b("select[name=sel_editor_colorset]"):b("select[name=sel_comment_editor_colorset]"),d.html(""),"document"==c.type?(b("select[name=sel_editor_colorset]").hide().removeAttr("name"),d.attr("name","sel_editor_colorset")):(b("select[name=sel_comment_editor_colorset]").hide().removeAttr("name"),d.attr("name","sel_comment_editor_colorset")),0==a.error&&a.colorset){var e=[],f=a.colorset.item;"undefined"==typeof f[0]?e[0]=f:e=f;for(var g=0;g<e.length;g++){var h=b('<option value="'+e[g].name+'" >'+e[g].title+"</option>");c.selected_colorset==e[g].name&&h.attr("selected","selected"),d.append(h)}d.show()}else d.hide(),d.html("")})}
function getEditorSkinColorList(a,b,c,d){if(a.length>0){c=c||"document";var e=new Array("error","message","colorset");exec_xml("editor","dispEditorSkinColorset",{skin:a},resultGetEditorSkinColorList,e,{selected_colorset:b,type:c,testid:d})}}function resultGetEditorSkinColorList(a,b,c){var d=null;jQuery(function(b){if(d=c.testid?b("#"+c.testid).next("label").children("select"):b("document"==c.type?"select[name=sel_editor_colorset]":"select[name=sel_comment_editor_colorset]"),d.html(""),"document"==c.type?(b("select[name=sel_editor_colorset]").hide().removeAttr("name"),d.attr("name","sel_editor_colorset")):(b("select[name=sel_comment_editor_colorset]").hide().removeAttr("name"),d.attr("name","sel_comment_editor_colorset")),0==a.error&&a.colorset){var e=[],f=a.colorset.item;"undefined"==typeof f[0]?e[0]=f:e=f;for(var g=0;g<e.length;g++){var h=b('<option value="'+e[g].name+'" >'+e[g].title+"</option>");c.selected_colorset==e[g].name&&h.attr("selected","selected"),d.append(h)}d.show()}else d.hide(),d.html("")})}

File diff suppressed because one or more lines are too long

View file

@ -36,7 +36,7 @@
<title xml:lang="en">File Upload</title>
<title xml:lang="ko">파일 업로드</title>
<title xml:lang="zh-CN">File Upload</title>
<title xml:lang="jp">ファイルアップロード</title>
<title xml:lang="jp">ファイル添付</title>
<title xml:lang="es">File Upload</title>
<title xml:lang="ru">File Upload</title>
<title xml:lang="fr">File Upload</title>

View file

@ -92,6 +92,7 @@ class fileAdminController extends file
function procFileAdminInsertConfig()
{
// Get configurations (using module model object)
$config = new stdClass();
$config->allowed_filesize = Context::get('allowed_filesize');
$config->allowed_attach_size = Context::get('allowed_attach_size');
$config->allowed_filetypes = str_replace(' ', '', Context::get('allowed_filetypes'));
@ -121,6 +122,7 @@ class fileAdminController extends file
$download_grant = Context::get('download_grant');
$file_config = new stdClass;
$file_config->allow_outlink = Context::get('allow_outlink');
$file_config->allow_outlink_format = Context::get('allow_outlink_format');
$file_config->allow_outlink_site = Context::get('allow_outlink_site');

View file

@ -302,7 +302,7 @@ class fileController extends file
$file_size = $file_obj->file_size;
$filename = $file_obj->source_filename;
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE || (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'rv') !== FALSE))
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE || (strpos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== FALSE && strpos($_SERVER['HTTP_USER_AGENT'], 'rv:') !== FALSE))
{
$filename = rawurlencode($filename);
$filename = preg_replace('/\./', '%2e', $filename, substr_count($filename, '.') - 1);
@ -518,6 +518,8 @@ class fileController extends file
$comment_srl = $obj->comment_srl;
if(!$comment_srl) return new Object();
if($obj->isMoveToTrash) return new Object();
$output = $this->deleteFiles($comment_srl);
return $output;
}

View file

@ -226,24 +226,21 @@ class fileModel extends file
function getUploadConfig()
{
$logged_info = Context::get('logged_info');
$file_config = new stdClass();
$module_srl = Context::get('module_srl');
// Get the current module if module_srl doesn't exist
if(!$module_srl)
{
$current_module_info = Context::get('current_module_info');
$module_srl = $current_module_info->module_srl;
}
$file_config = $this->getFileConfig($module_srl);
if($logged_info->is_admin == 'Y')
{
$file_config->allowed_filesize = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
$file_config->allowed_attach_size = preg_replace("/[a-z]/is","",ini_get('upload_max_filesize'));
$file_config->allowed_filetypes = '*.*';
}
else
{
$module_srl = Context::get('module_srl');
// Get the current module if module_srl doesn't exist
if(!$module_srl)
{
$current_module_info = Context::get('current_module_info');
$module_srl = $current_module_info->module_srl;
}
$file_config = $this->getFileConfig($module_srl);
}
return $file_config;
}

Some files were not shown because too many files have changed in this diff Show more