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

@ -71,7 +71,7 @@
$url = getUrl('','module','admin','act','dispCommentAdminList','search_target','ipaddress','search_keyword',$oComment->getIpAddress());
$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');
}
}

View file

@ -474,7 +474,7 @@
$url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','ipaddress','search_keyword',$oDocument->getIpAddress());
$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');
}
}

View file

@ -482,7 +482,11 @@
$layout_config = $oModuleModel->getModulePartConfig('layout', $layout_srl);
$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.' ?>';
FileHandler::writeFile($cache_file, $buff);

View file

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

View file

@ -1,5 +1,5 @@
<h1>{$oDocument->getTitle()}</h1>
{$oDocument->getContent()}
<h1 cond="$module_info->display_title != 'hide'">{$oDocument->getTitle()}</h1>
{$oDocument->getContent($module_info->display_popupmenu != 'hide')}
<block cond="$grant->manager">
<load target="../../tpl/js/page_admin.js" />
<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="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>
</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(){
//스팸IP 추가
$ipaddressList = Context::get('ipaddressList');
$ipaddress_list = Context::get('ipaddress_list');
$oSpamfilterController = &getController('spamfilter');
if($ipaddressList){
$insertIPOutput = $oSpamfilterController->insertIP($ipaddressList);
if($ipaddress_list){
$insertIPOutput = $oSpamfilterController->insertIP($ipaddress_list);
if(!$insertIPOutput->toBool()) return $insertIPOutput;
}
@ -45,9 +45,9 @@
}
function procSpamfilterAdminInsertDeniedWord(){
//스팸 키워드 추가
$wordList = Context::get('wordList');
if($wordList){
$insertWordOutput = $this->insertWord($wordList);
$word_list = Context::get('word_list');
if($word_list){
$insertWordOutput = $this->insertWord($word_list);
if(!$insertWordOutput->toBool()) return $insertWordOutput;
}
@ -93,10 +93,10 @@
* @brief Register the spam word
* The post, which contains the newly registered spam word, should be considered as a spam
**/
function insertWord($wordList) {
$wordList = str_replace("\r","",$wordList);
$wordList = explode("\n",$wordList);
foreach($wordList as $wordKey => $word) {
function insertWord($word_list) {
$word_list = str_replace("\r","",$word_list);
$word_list = explode("\n",$word_list);
foreach($word_list as $word) {
if(trim($word)) $args->word = $word;
$output = executeQuery('spamfilter.insertDeniedWord', $args);
if(!$output->toBool()) return $output;

View file

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

View file

@ -1,5 +1,3 @@
<script>
</script>
<load target="js/spamfilter_admin.js" usecdn="true" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
@ -55,7 +53,7 @@
</ul>
</div>
<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="desc">{$lang->about_denied_ip}</span>
</p>
@ -70,7 +68,7 @@
</ul>
</div>
<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="desc">{$lang->about_denied_word}</span>
</p>