merge from 1.5.3.2 (r11105 ~ r11111)

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11112 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-08-29 05:45:24 +00:00
commit e388c5d72a
16 changed files with 98 additions and 38 deletions

View file

@ -503,7 +503,11 @@
$_SESSION['XE_VALIDATOR_ERROR'] = $error; $_SESSION['XE_VALIDATOR_ERROR'] = $error;
if ($message != 'success') $_SESSION['XE_VALIDATOR_MESSAGE'] = $message; if ($message != 'success') $_SESSION['XE_VALIDATOR_MESSAGE'] = $message;
$_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType; $_SESSION['XE_VALIDATOR_MESSAGE_TYPE'] = $messageType;
$_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
if(Context::get('xeVirtualRequestMethod') != 'xml')
{
$_SESSION['XE_VALIDATOR_RETURN_URL'] = $redirectUrl;
}
} }
unset($logged_info); unset($logged_info);

View file

@ -42,7 +42,7 @@ var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block> <block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}"; var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}"; var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',$ssl_actions)}"</block>); var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',array_keys($ssl_actions))}"</block>);
var default_url = "{Context::getDefaultUrl()}"; var default_url = "{Context::getDefaultUrl()}";
<block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block> <block cond="Context::get('_http_port')">var http_port = {Context::get("_http_port")};</block>
<block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block> <block cond="Context::get('_https_port')">var https_port = {Context::get("_https_port")};</block>

View file

@ -43,7 +43,7 @@
<!--@if($vid)-->var xeVid = "{$vid}";<!--@end--> <!--@if($vid)-->var xeVid = "{$vid}";<!--@end-->
var current_mid = "{$mid}"; var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}"; var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',$ssl_actions)}"<!--@end-->); var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',array_keys($ssl_actions))}"<!--@end-->);
var default_url = "{Context::getDefaultUrl()}"; var default_url = "{Context::getDefaultUrl()}";
<!--@if(Context::get("_http_port"))-->var http_port = {Context::get("_http_port")};<!--@end--> <!--@if(Context::get("_http_port"))-->var http_port = {Context::get("_http_port")};<!--@end-->
<!--@if(Context::get("_https_port"))-->var https_port = {Context::get("_https_port")};<!--@end--> <!--@if(Context::get("_https_port"))-->var https_port = {Context::get("_https_port")};<!--@end-->

View file

@ -71,7 +71,7 @@
$url = getUrl('','module','admin','act','dispCommentAdminList','search_target','ipaddress','search_keyword',$oComment->getIpAddress()); $url = getUrl('','module','admin','act','dispCommentAdminList','search_target','ipaddress','search_keyword',$oComment->getIpAddress());
$oCommentController->addCommentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress'); $oCommentController->addCommentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress');
$url = sprintf("var params = new Array(); params['ipaddress']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oComment->getIpAddress()); $url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oComment->getIpAddress());
$oCommentController->addCommentPopupMenu($url,'cmd_add_ip_to_spamfilter','','javascript'); $oCommentController->addCommentPopupMenu($url,'cmd_add_ip_to_spamfilter','','javascript');
} }
} }

View file

@ -474,7 +474,7 @@
$url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','ipaddress','search_keyword',$oDocument->getIpAddress()); $url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','ipaddress','search_keyword',$oDocument->getIpAddress());
$oDocumentController->addDocumentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress'); $oDocumentController->addDocumentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress');
$url = sprintf("var params = new Array(); params['ipaddress']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oDocument->getIpAddress()); $url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oDocument->getIpAddress());
$oDocumentController->addDocumentPopupMenu($url,'cmd_add_ip_to_spamfilter','','javascript'); $oDocumentController->addDocumentPopupMenu($url,'cmd_add_ip_to_spamfilter','','javascript');
} }
} }

View file

@ -482,7 +482,11 @@
$layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl); $layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl);
$header_script = trim($layout_config->header_script); $header_script = trim($layout_config->header_script);
if($header_script) $buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('"','\\"',$header_script)); if($header_script)
{
$header_script = str_replace('"','\\"',$header_script);
$buff .= sprintf(' $layout_info->header_script = "%s"; ', str_replace('$','\$',$header_script));
}
$buff = '<?php if(!defined("__ZBXE__")) exit(); '.$buff.' ?>'; $buff = '<?php if(!defined("__ZBXE__")) exit(); '.$buff.' ?>';
FileHandler::writeFile($cache_file, $buff); FileHandler::writeFile($cache_file, $buff);

View file

@ -86,6 +86,8 @@
} }
Context::set('oDocument', $oDocument); Context::set('oDocument', $oDocument);
Context::set('module_info', $this->module_info);
if ($this->module_info->skin) if ($this->module_info->skin)
$this->setTemplatePath(sprintf($this->module_path.'skins/%s', $this->module_info->skin)); $this->setTemplatePath(sprintf($this->module_path.'skins/%s', $this->module_info->skin));
else else

View file

@ -1,5 +1,5 @@
<h1>{$oDocument->getTitle()}</h1> <h1 cond="$module_info->display_title != 'hide'">{$oDocument->getTitle()}</h1>
{$oDocument->getContent()} {$oDocument->getContent($module_info->display_popupmenu != 'hide')}
<block cond="$grant->manager"> <block cond="$grant->manager">
<load target="../../tpl/js/page_admin.js" /> <load target="../../tpl/js/page_admin.js" />
<div class="btnArea"> <div class="btnArea">

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<skin version="0.2">
<title xml:lang="ko">Default Page Skin</title>
<title xml:lang="en">Default Page Skin</title>
<description xml:lang="ko">
문서형 페이지의 기본 스킨입니다.
</description>
<version>0.2</version>
<date>2012-08-28</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NHN</name>
<name xml:lang="jp">NHN</name>
<name xml:lang="zh-CN">NHN</name>
<name xml:lang="en">NHN</name>
<name xml:lang="vi">NHN</name>
<name xml:lang="es">NHN</name>
<name xml:lang="zh-TW">NHN</name>
<name xml:lang="tr">NHN</name>
</author>
<extra_vars>
<var name="display_title" type="radio" default="show">
<title xml:lang="ko">제목표시</title>
<title xml:lang="en">Display title</title>
<description xml:lang="ko">
문서의 제목을 표시 할지 결정합니다.
</description>
<options value="show">
<title xml:lang="ko">출력</title>
<title xml:lang="en">Show</title>
</options>
<options value="hide">
<title xml:lang="ko">출력하지 않음</title>
<title xml:lang="en">Hide</title>
</options>
</var>
<var name="display_popupmenu" type="radio" default="show">
<title xml:lang="ko">팝업메뉴 표시</title>
<title xml:lang="en">Display popup menu</title>
<description xml:lang="ko">
문서 하단의 팝업 메뉴를 표시 할지 선택합니다.
</description>
<options value="show">
<title xml:lang="ko">출력</title>
<title xml:lang="en">Show</title>
</options>
<options value="hide">
<title xml:lang="ko">출력하지 않음</title>
<title xml:lang="en">Hide</title>
</options>
</var>
</extra_vars>
</skin>

View file

@ -0,0 +1,3 @@
<!--#include("./header.html")-->
{$skin_content}

View file

@ -25,7 +25,7 @@
<action name="procSpamfilterAdminDeleteDeniedIP" type="controller" standalone="true" ruleset="deleteDeniedIp" /> <action name="procSpamfilterAdminDeleteDeniedIP" type="controller" standalone="true" ruleset="deleteDeniedIp" />
<action name="procSpamfilterAdminDeleteDeniedWord" type="controller" standalone="true" ruleset="deleteDeniedWord" /> <action name="procSpamfilterAdminDeleteDeniedWord" type="controller" standalone="true" ruleset="deleteDeniedWord" />
<action name="procSpamfilterAdminInsertConfig" type="controller" standalone="true" ruleset="insertSetting" /> <action name="procSpamfilterAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
</actions> </actions>
</module> </module>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<fields>
<field name="limits" required="true" />
<field name="check_trackback" required="true" />
</fields>
</ruleset>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ruleset version="1.5.0">
<customrules>
<rule name="ip" type="regex" test="/^(\d{1,3}(?:.(\d{1,3}|\*)){3}\s*(\/\/.*)?[^.]*)*$/" />
<rule name="word" type="regex" test="/^((.{2,40}[\r\n]+)*.{2,40})*$/" />
</customrules>
<fields>
<field name="act" required="true" default="procSpamfilterAdminInsertSetting" />
</fields>
</ruleset>

View file

@ -33,10 +33,10 @@
function procSpamfilterAdminInsertDeniedIP(){ function procSpamfilterAdminInsertDeniedIP(){
//스팸IP 추가 //스팸IP 추가
$ipaddressList = Context::get('ipaddressList'); $ipaddress_list = Context::get('ipaddress_list');
$oSpamfilterController = &getController('spamfilter'); $oSpamfilterController = &getController('spamfilter');
if($ipaddressList){ if($ipaddress_list){
$insertIPOutput = $oSpamfilterController->insertIP($ipaddressList); $insertIPOutput = $oSpamfilterController->insertIP($ipaddress_list);
if(!$insertIPOutput->toBool()) return $insertIPOutput; if(!$insertIPOutput->toBool()) return $insertIPOutput;
} }
@ -45,9 +45,9 @@
} }
function procSpamfilterAdminInsertDeniedWord(){ function procSpamfilterAdminInsertDeniedWord(){
//스팸 키워드 추가 //스팸 키워드 추가
$wordList = Context::get('wordList'); $word_list = Context::get('word_list');
if($wordList){ if($word_list){
$insertWordOutput = $this->insertWord($wordList); $insertWordOutput = $this->insertWord($word_list);
if(!$insertWordOutput->toBool()) return $insertWordOutput; if(!$insertWordOutput->toBool()) return $insertWordOutput;
} }
@ -93,10 +93,10 @@
* @brief Register the spam word * @brief Register the spam word
* The post, which contains the newly registered spam word, should be considered as a spam * The post, which contains the newly registered spam word, should be considered as a spam
**/ **/
function insertWord($wordList) { function insertWord($word_list) {
$wordList = str_replace("\r","",$wordList); $word_list = str_replace("\r","",$word_list);
$wordList = explode("\n",$wordList); $word_list = explode("\n",$word_list);
foreach($wordList as $wordKey => $word) { foreach($word_list as $word) {
if(trim($word)) $args->word = $word; if(trim($word)) $args->word = $word;
$output = executeQuery('spamfilter.insertDeniedWord', $args); $output = executeQuery('spamfilter.insertDeniedWord', $args);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;

View file

@ -136,11 +136,10 @@
* @brief IP registration * @brief IP registration
* The registered IP address is considered as a spammer * The registered IP address is considered as a spammer
**/ **/
function insertIP($ipaddressList, $description = null) { function insertIP($ipaddress_list, $description = null) {
//리눅스시.. 변환부분 체크하는 것 다시 봐야할 듯. $ipaddress_list = str_replace("\r","",$ipaddress_list);
$ipaddressList = str_replace("\r","",$ipaddressList); $ipaddress_list = explode("\n",$ipaddress_list);
$ipaddressList = explode("\n",$ipaddressList); foreach($ipaddress_list as $ipaddressValue) {
foreach($ipaddressList as $ipaddressKey => $ipaddressValue) {
preg_match("/(\d{1,3}(?:.(\d{1,3}|\*)){3})\s*(\/\/\s*(.*))?/",$ipaddressValue,$matches); preg_match("/(\d{1,3}(?:.(\d{1,3}|\*)){3})\s*(\/\/\s*(.*))?/",$ipaddressValue,$matches);
if($ipaddress=trim($matches[1])) { if($ipaddress=trim($matches[1])) {
$args->ipaddress = $ipaddress; $args->ipaddress = $ipaddress;

View file

@ -1,5 +1,3 @@
<script>
</script>
<load target="js/spamfilter_admin.js" usecdn="true" /> <load target="js/spamfilter_admin.js" usecdn="true" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}"> <div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p> <p>{$XE_VALIDATOR_MESSAGE}</p>
@ -55,7 +53,7 @@
</ul> </ul>
</div> </div>
<p class="a"> <p class="a">
<textarea rows="8" cols="42" name="ipaddressList" title="스팸 IP 추가"></textarea> <textarea rows="8" cols="42" name="ipaddress_list" title="스팸 IP 추가"></textarea>
<span class="btn small"><button type="button" onclick="doInsertDeniedIP('{$lang->msg_invalid_format}')">{$lang->cmd_insert}</button></span> <span class="btn small"><button type="button" onclick="doInsertDeniedIP('{$lang->msg_invalid_format}')">{$lang->cmd_insert}</button></span>
<span class="desc">{$lang->about_denied_ip}</span> <span class="desc">{$lang->about_denied_ip}</span>
</p> </p>
@ -70,7 +68,7 @@
</ul> </ul>
</div> </div>
<p class="a"> <p class="a">
<textarea rows="8" cols="42" name="wordList" title="스팸 키워드 추가"></textarea> <textarea rows="8" cols="42" name="word_list" title="스팸 키워드 추가"></textarea>
<span class="btn small"><button type="button" onclick="doInsertDeniedWord('{$lang->msg_invalid_format}')">{$lang->add}</button></span> <span class="btn small"><button type="button" onclick="doInsertDeniedWord('{$lang->msg_invalid_format}')">{$lang->add}</button></span>
<span class="desc">{$lang->about_denied_word}</span> <span class="desc">{$lang->about_denied_word}</span>
</p> </p>