Merge pull request #2 from rhymix/develop

Develop
This commit is contained in:
YJSoft 2016-03-04 21:25:48 +09:00
commit 80baa76d0e
64 changed files with 704 additions and 322 deletions

1
.gitignore vendored
View file

@ -22,4 +22,5 @@ composer.phar
*.sublime-workspace
*.sublime-project
.codeintel
error_log

View file

@ -5,12 +5,12 @@
<title xml:lang="zh-CN">会员交流</title>
<title xml:lang="en">Communication</title>
<title xml:lang="vi">Truyền thông</title>
<title xml:lang="ge">커뮤니케이션</title>
<title xml:lang="es">커뮤니케이션</title>
<title xml:lang="ge">Communication</title>
<title xml:lang="es">Communication</title>
<title xml:lang="ru">Общение</title>
<title xml:lang="zh-TW">交流</title>
<description xml:lang="ko">
이 애드온은 더 이상 역활을 하지 않습니다. 이 애드온의 기능은 커뮤니케이션 모듈로 흡수되었습니다.
이 애드온은 빈 애드온입니다. 모든 기능은 커뮤니케이션 모듈로 이전되었습니다.
</description>
<version>1.7</version>
<date>2013-11-27</date>

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/* 이 애드온은 communication 모둘로 흡수 되었습니다. */
/* 이 애드온의 기능은 communication 모듈로 이전되었습니다. */
/* End of file member_communication.addon.php */
/* Location: ./addons/member_communication/member_communication.addon.php */

View file

@ -59,4 +59,19 @@
<name xml:lang="ru">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
<extra_vars>
<var name="icon_duplication" type="select">
<title xml:lang="ko">아이콘 중복 방지</title>
<description xml:lang="ko">그룹아이콘이 있을 경우 중복으로 레벨 아이콘을 달지 않습니다.</description>
<options value="">
<title xml:lang="ko">사용함</title>
<title xml:lang="en">Enabled</title>
</options>
<options value="N">
<title xml:lang="ko">사용하지 않음</title>
<title xml:lang="en">Disabled</title>
</options>
</var>
</extra_vars>
</addon>

View file

@ -19,7 +19,9 @@ if($called_position != "before_display_content" || Context::get('act') == 'dispP
require_once(_XE_PATH_ . 'addons/point_level_icon/point_level_icon.lib.php');
$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'pointLevelIconTrans', $output);
$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', function($matches) use($addon_info) {
return pointLevelIconTrans($matches, $addon_info);
}, $output);
if($temp_output)
{
$output = $temp_output;

View file

@ -4,7 +4,7 @@
/**
* @brief Function to change point icon.
*/
function pointLevelIconTrans($matches)
function pointLevelIconTrans($matches, $addon_info)
{
$member_srl = $matches[3];
// If anonymous or not member_srl go to Hide Point Icon
@ -13,16 +13,18 @@ function pointLevelIconTrans($matches)
return $matches[0];
}
$orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);
$oMemberModel = getModel('member');
// Check Group Image Mark
if($oMemberModel->getGroupImageMark($member_srl))
if($addon_info->icon_duplication != 'N')
{
return $orig_text . $matches[5] . '</' . $matches[6] . '>';
// Check Group Image Mark
$oMemberModel = getModel('member');
if($oMemberModel->getGroupImageMark($member_srl))
{
return $matches[0];
}
}
$orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
{
// Get point configuration

View file

@ -157,6 +157,11 @@ class Context
*/
public $isSuccessInit = TRUE;
/**
* Plugin blacklist cache
*/
private static $_blacklist = null;
/**
* Singleton instance
* @var object
@ -222,7 +227,6 @@ class Context
// Set global variables for backward compatibility.
$GLOBALS['__Context__'] = $this;
$GLOBALS['lang'] = &$this->lang;
$this->_COOKIE = $_COOKIE;
// Set information about the current request.
@ -299,6 +303,7 @@ class Context
$this->lang = Rhymix\Framework\Lang::getInstance($this->lang_type);
$this->lang->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
$this->lang->loadDirectory(RX_BASEDIR . 'modules/module/lang', 'module');
$GLOBALS['lang'] = $this->lang;
// set session handler
if(self::isInstalled() && config('session.use_db'))
@ -476,12 +481,13 @@ class Context
}
if (!count($config))
{
self::$_instance->db_info = self::$_instance->db_info ?: new stdClass;
return;
}
// Copy to old format for backward compatibility.
self::$_instance->db_info = self::convertDBInfo($config);
self::$_instance->allow_rewrite = self::$_instance->db_info->use_rewrite;
self::$_instance->allow_rewrite = self::$_instance->db_info->use_rewrite === 'Y';
self::set('_http_port', self::$_instance->db_info->http_port ?: null);
self::set('_https_port', self::$_instance->db_info->https_port ?: null);
self::set('_use_ssl', self::$_instance->db_info->use_ssl);
@ -871,7 +877,14 @@ class Context
{
$plugin_name = null;
}
return self::$_instance->lang->loadDirectory($path, $plugin_name);
if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
{
$GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(self::$_instance->lang_type ?: config('locale.default_lang') ?: 'ko');
$GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
}
return $GLOBALS['lang']->loadDirectory($path, $plugin_name);
}
/**
@ -914,14 +927,13 @@ class Context
*/
public static function getLang($code)
{
if (self::$_instance->lang)
if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
{
return self::$_instance->lang->get($code);
}
else
{
return $code;
$GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(self::$_instance->lang_type ?: config('locale.default_lang') ?: 'ko');
$GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
}
return $GLOBALS['lang']->get($code);
}
/**
@ -933,10 +945,13 @@ class Context
*/
public static function setLang($code, $val)
{
if (self::$_instance->lang)
if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang)
{
self::$_instance->lang->set($code, $val);
$GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance(self::$_instance->lang_type ?: config('locale.default_lang') ?: 'ko');
$GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
}
$GLOBALS['lang']->set($code, $val);
}
/**
@ -1172,7 +1187,7 @@ class Context
{
continue;
}
$key = htmlentities($key);
$key = escape($key);
$val = $this->_filterRequestVar($key, $val);
if($requestMethod == 'GET' && isset($_GET[$key]))
@ -1348,7 +1363,7 @@ class Context
$result = array();
foreach($val as $k => $v)
{
$k = htmlentities($k);
$k = escape($k);
if($key === 'page' || $key === 'cpage' || substr_compare($key, 'srl', -3) === 0)
{
$result[$k] = !preg_match('/^[0-9,]+$/', $v) ? (int) $v : $v;
@ -1367,10 +1382,21 @@ class Context
if($do_stripslashes && version_compare(PHP_VERSION, '5.4.0', '<') && get_magic_quotes_gpc())
{
$result[$k] = stripslashes($result[$k]);
if (is_array($result[$k]))
{
array_walk_recursive($result[$k], function(&$val) { $val = stripslashes($val); });
}
else
{
$result[$k] = stripslashes($result[$k]);
}
}
if(!is_array($result[$k]))
if(is_array($result[$k]))
{
array_walk_recursive($result[$k], function(&$val) { $val = trim($val); });
}
else
{
$result[$k] = trim($result[$k]);
}
@ -1874,7 +1900,7 @@ class Context
self::$_user_vars->{$key} = $val;
self::$_instance->{$key} = $val;
if($set_to_get_vars)
if($set_to_get_vars || isset(self::$_instance->get_vars->{$key}))
{
if($val === NULL || $val === '')
{
@ -2032,6 +2058,10 @@ class Context
{
return self::$_instance->ssl_actions;
}
else
{
return array();
}
}
/**
@ -2541,6 +2571,26 @@ class Context
return self::$_instance->allow_rewrite;
}
/**
* Check whether an addon, module, or widget is blacklisted
*
* @param string $plugin_name
* @return bool
*/
public static function isBlacklistedPlugin($plugin_name)
{
if (self::$_blacklist === null)
{
self::$_blacklist = (include RX_BASEDIR . 'common/defaults/blacklist.php');
if (!is_array(self::$_blacklist))
{
self::$_blacklist = array();
}
}
return isset(self::$_blacklist[$plugin_name]);
}
/**
* Converts a local path into an URL
*

View file

@ -223,17 +223,17 @@ class HTMLDisplayHandler
// convert the final layout
Context::set('content', $output);
Context::set('m', $is_mobile = Mobile::isFromMobilePhone() ? 1 : 0);
$oTemplate = TemplateHandler::getInstance();
if(Mobile::isFromMobilePhone())
if($is_mobile)
{
$this->_loadMobileJSCSS();
$output = $oTemplate->compile('./common/tpl', 'mobile_layout');
}
else
{
$this->_loadDesktopJSCSS();
$output = $oTemplate->compile('./common/tpl', 'common_layout');
}
$output = $oTemplate->compile('./common/tpl', 'common_layout');
// replace the user-defined-language
$oModuleController = getController('module');
@ -394,7 +394,6 @@ class HTMLDisplayHandler
if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
{
Context::loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
Context::loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
Context::loadFile(array("./modules/admin/tpl/css/admin.iefix.css", '', 'ie', 10), true);
Context::loadFile('./modules/admin/tpl/js/admin.js', true);
Context::loadFile(array('./modules/admin/tpl/css/admin.bootstrap.css', '', '', 1), true);

View file

@ -15,20 +15,41 @@ class JSONDisplayHandler
$variables['error'] = $oModule->getError();
$variables['message'] = $oModule->getMessage();
$temp = array();
foreach ($variables as $key => $value)
self::_convertCompat($variables, Context::getRequestMethod());
return json_encode($variables);
}
/**
* Convert arrays in a format that is compatible with XE.
*
* @param array $array
* @param string $compat_type
* @return array
*/
protected static function _convertCompat(&$array, $compat_type = 'JSON')
{
foreach ($array as $key => &$value)
{
if (self::_isNumericArray($value))
if (is_object($value))
{
$temp[$key] = array_values($value);
$value = get_object_vars($value);
}
else
if (is_array($value))
{
$temp[$key] = $value;
self::_convertCompat($value, $compat_type);
if (self::_isNumericArray($value))
{
if ($compat_type === 'XMLRPC')
{
$value = array('item' => array_values($value));
}
else
{
$value = array_values($value);
}
}
}
}
return json_encode($temp);
}
/**

View file

@ -24,11 +24,6 @@ class VirtualXMLDisplayHandler
if($error === 0)
{
if($message != 'success')
{
$output->message = $message;
}
if($redirect_url)
{
$output->url = $redirect_url;
@ -40,29 +35,32 @@ class VirtualXMLDisplayHandler
}
else
{
if($message != 'fail')
{
$output->message = $message;
}
$output->message = $message;
}
$html = array();
$html[] = '<script type="text/javascript">';
$html[] = '//<![CDATA[';
$html[] = '<html>';
$html[] = '<head>';
$html[] = '<script>';
if($output->message)
{
$html[] = 'alert("' . $output->message . '");';
$html[] = 'alert(' . json_encode($output->message) . ');';
}
if($output->url)
{
$url = preg_replace('/#(.+)$/i', '', $output->url);
$html[] = 'self.location.href = "' . $request_url . 'common/tpl/redirect.html?redirect_url=' . urlencode($url) . '";';
$output->url = preg_replace('/#(.+)$/', '', $output->url);
$html[] = 'if (opener) {';
$html[] = ' opener.location.href = ' . json_encode($output->url) . ';';
$html[] = '} else {';
$html[] = ' parent.location.href = ' . json_encode($output->url) . ';';
$html[] = '}';
}
$html[] = '//]]>';
$html[] = '</script>';
$html[] = '</head><body></body></html>';
return join(PHP_EOL, $html);
}

View file

@ -224,6 +224,10 @@ class ExtraItem
{
$values = explode(',', $value);
}
else
{
$values = array($value);
}
$values = array_values($values);
for($i = 0, $c = count($values); $i < $c; $i++)

View file

@ -1191,6 +1191,12 @@ class ModuleHandler extends Handler
$type = $item->type;
$called_method = $item->called_method;
// do not call if module is blacklisted
if (Context::isBlacklistedPlugin($module))
{
continue;
}
// todo why don't we call a normal class object ?
$oModule = getModule($module, $type);
if(!$oModule || !method_exists($oModule, $called_method))

View file

@ -3,7 +3,7 @@
/**
* RX_VERSION is the version number of the Rhymix CMS.
*/
define('RX_VERSION', '1.8.15');
define('RX_VERSION', '1.8.17');
/**
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.

View file

@ -0,0 +1,12 @@
<?php
/**
* Rhymix Default Blacklist for Deprecated Plugins
*
* Copyright (c) Rhymix Developers and Contributors
*/
return array(
'member_communication' => true,
'smartphone' => true,
'zipperupper' => true,
);

View file

@ -70,7 +70,7 @@ class LangParser
unset($xml);
// Save the array as a cache file.
$buff = "<?php\n";
$buff = "<?php\n// $filename\n";
foreach ($lang as $key => $value)
{
if (is_array($value))

View file

@ -137,7 +137,7 @@ class Debug
$entry = (object)array(
'type' => 'Debug',
'time' => microtime(true),
'message' => $message,
'message' => unserialize(serialize($message)),
'file' => isset($backtrace[0]['file']) ? $backtrace[0]['file'] : null,
'line' => isset($backtrace[0]['line']) ? $backtrace[0]['line'] : 0,
'backtrace' => $backtrace,

View file

@ -102,25 +102,21 @@ class Lang
{
$filename = $dir . '/' . $this->_language . '.php';
}
elseif (file_exists($dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php'))
{
$filename = $dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php';
}
elseif (($hyphen = strpos($this->_language, '-')) !== false)
{
if (file_exists($dir . '/' . substr($this->_language, 0, $hyphen) . '.php'))
{
$filename = $dir . '/' . substr($this->_language, 0, $hyphen) . '.php';
}
elseif (file_exists($dir . '/' . substr($this->_language, 0, $hyphen) . '.lang.php'))
{
$filename = $dir . '/' . substr($this->_language, 0, $hyphen) . '.lang.php';
}
}
elseif (file_exists("$dir/lang.xml"))
{
$filename = Compat\LangParser::compileXMLtoPHP("$dir/lang.xml", $this->_language === 'ja' ? 'jp' : $this->_language);
}
elseif (file_exists($dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php'))
{
$filename = $dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php';
}
// Load the language file.
if ($filename)

View file

@ -933,7 +933,7 @@ function getCookie(name) {
}
function is_def(v) {
return (typeof(v)!='undefined');
return typeof(v) != 'undefined' && v !== null;
}
function ucfirst(str) {

View file

@ -54,7 +54,7 @@
waiting_obj.css("opacity", 0.0);
var wfsr_timeout = setTimeout(function() {
if (show_waiting_message) {
waiting_obj.css("opacity", "").html(waiting_message).show();
waiting_obj.css("opacity", "").show();
}
}, 1000);
@ -69,11 +69,7 @@
var result = {};
$.each(data, function(key, val) {
if ($.inArray(key, ["error", "message", "act", "redirect_url"]) >= 0 || $.inArray(key, return_fields) >= 0) {
if ($.isArray(val)) {
result[key] = { item: val };
} else {
result[key] = val;
}
result[key] = val;
}
});
@ -134,8 +130,15 @@
// Hide the waiting message and display an error notice.
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
var error_info;
if ($(".x_modal-body").size()) {
error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "<br><br><pre>" + xhr.responseText + "</pre>";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "<br><br>" + error_info);
} else {
error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "\n\n" + xhr.responseText;
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
}
};
// Send the AJAX request.
@ -175,7 +178,7 @@
waiting_obj.css("opacity", 0.0);
var wfsr_timeout = setTimeout(function() {
if (show_waiting_message) {
waiting_obj.css("opacity", "").html(waiting_message).show();
waiting_obj.css("opacity", "").show();
}
}, 1000);
@ -227,8 +230,15 @@
var errorHandler = function(xhr, textStatus) {
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
var error_info;
if ($(".x_modal-body").size()) {
error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "<br><br><pre>" + xhr.responseText + "</pre>";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "<br><br>" + error_info);
} else {
error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "\n\n" + xhr.responseText;
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
}
};
// Send the AJAX request.
@ -270,7 +280,7 @@
waiting_obj.css("opacity", 0.0);
var wfsr_timeout = setTimeout(function() {
if (show_waiting_message) {
waiting_obj.css("opacity", "").html(waiting_message).show();
waiting_obj.css("opacity", "").show();
}
}, 1000);

View file

@ -203,10 +203,10 @@ $lang->about_tag = '쉼표(,)를 이용하여 복수 등록';
$lang->about_layout = '레이아웃은 콘텐츠의 겉모습을 꾸며줍니다. 상단 레이아웃 메뉴에서 관리할 수 있습니다.';
$lang->about_ipaddress_input = 'IP주소 입력형식<br />1. 와일드카드(*) 사용가능(예: 192.168.0.*)<br />2. 하이픈(-)을 사용하여 대역으로 입력가능<br />(단, 대역폭으로 입력할 경우 와일드카드 사용불가. 예: 192.168.0.1-192.168.0.254)<br />3.여러개의 항목은 줄을 바꾸어 입력하세요';
$lang->msg_invalid_ip = '잘못된 IP주소 형식입니다.';
$lang->msg_no_root = '루트는 선택 할 수 없습니다.';
$lang->msg_no_shortcut = '바로가기는 선택 할 수 없습니다.';
$lang->msg_no_root = '루트는 선택할 수 없습니다.';
$lang->msg_no_shortcut = '바로가기는 선택할 수 없습니다.';
$lang->msg_select_menu = '대상 메뉴 선택';
$lang->msg_call_server = '서버에 요청 중입니다. 잠시만 기다려주세요.';
$lang->msg_call_server = '서버에 요청 중입니다. 잠시만 기다려 주십시오...';
$lang->msg_db_not_setted = 'DB 설정이 되어 있지 않습니다.';
$lang->msg_dbconnect_failed = 'DB 접속 오류가 발생했습니다. DB정보를 다시 확인해주세요.';
$lang->msg_invalid_queryid = 'Query ID값이 잘못 지정되었습니다.';

View file

@ -1,33 +1,31 @@
{@
$db_info = Context::getDBInfo();
$lang_type = Context::getLangType();
$ssl_actions = Context::getSSLActions();
$css_files = Context::getCssFile();
$js_files = Context::getJsFile();
}
<!DOCTYPE html>
<html lang="{str_replace('jp','ja',$lang_type)}">
<html lang="{$lang_type = Context::getLangType()}" class="xe-mobilelayout"|cond="$m">
<head>
<!-- META -->
<meta charset="utf-8">
<meta name="Generator" content="Rhymix">
<meta name="generator" content="Rhymix">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes" cond="$m" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<block loop="Context::getMetaTag() => $no, $val">
<meta http-equiv="{$val['name']}"|cond="$val['is_http_equiv']" name="{$val['name']}"|cond="!$val['is_http_equiv']" content="{$val['content']}">
</block>
<!-- TITLE -->
<title>{Context::getBrowserTitle()}</title>
<!-- CSS -->
<block loop="$css_files=>$key,$css_file">
<block loop="Context::getCssFile() => $key, $css_file">
<block cond="$css_file['targetie']"><!--[if {$css_file['targetie']}]><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--></block></block>
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
<block cond="$css_file['targetie']"><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
<block cond="$css_file['targetie']"><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--</block><![endif]-->{"\n"}</block>
</block>
<!-- JS -->
<block loop="$js_files=>$key,$js_file">
<block loop="Context::getJsFile() => $key, $js_file">
<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']"><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
<block cond="$js_file['targetie']"><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--</block><![endif]-->{"\n"}</block>
</block>
<!-- RSS -->
@ -35,48 +33,47 @@
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{$general_rss_url}" cond="$general_rss_url" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" cond="$rss_url" />
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" cond="$general_rss_url" />
<!-- ICON -->
<!-- ICONS -->
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />
{Context::getHtmlHeader()}
<script>
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<block cond="count($ssl_actions)">"{implode('","',array_keys($ssl_actions))}"</block>);
var default_url = "{Context::getDefaultUrl()}";
<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('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
xe.current_lang = "{$lang_type}";
xe.cmd_find = "{$lang->cmd_find}";
xe.cmd_cancel = "{$lang->cmd_cancel}";
xe.cmd_confirm = "{$lang->cmd_confirm}";
xe.msg_no_root = "{$lang->msg_no_root}";
xe.msg_no_shortcut = "{$lang->msg_no_shortcut}";
xe.msg_select_menu = "{$lang->msg_select_menu}";
//]]>
<!-- OTHER HEADERS -->
{Context::getHtmlHeader()}
<!-- COMMON JS VARIABLES -->
<script>
var default_url = "{Context::getDefaultUrl()}";
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
var current_lang = xe.current_lang = "{$lang_type}";
var current_mid = {json_encode($mid ?: null)};
var http_port = {Context::get("_http_port") ?: 'null'};
var https_port = {Context::get("_https_port") ?: 'null'};
var enforce_ssl = {Context::get('_use_ssl') === 'always' ? 'true' : 'false'};
var ssl_actions = {json_encode(array_keys(Context::getSSLActions()))};
var xeVid = {json_encode($vid ?: null)};
</script>
</head>
{@$isAdminKind = false}
<!--@if(stripos(Context::get('act'),'admin') || Context::get('module') == 'admin')-->
{@$isAdminKind = true}
<!--@end-->
<!-- BODY START -->
<body{Context::getBodyClass()}>
<!-- PAGE CONTENT -->
{Context::getBodyHeader()}
{$content}
{Context::getHtmlFooter()}
<!-- ETC -->
<div id="rhymix_waiting" class="wfsr"></div>
<div id="rhymix_waiting" class="wfsr" cond="!$m">{$lang->msg_call_server}</div>
<div id="rhymix_debug_panel"></div>
<div id="rhymix_debug_button"></div>
{@ $js_body_files = Context::getJsFile('body') }
<block loop="$js_body_files => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block><script src="{$js_file['file']}"></script><block cond="$js_file['targetie']"><![endif]--></block>
<!-- BODY JS -->
<block loop="Context::getJsFile('body') => $key, $js_file">
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block>
<script src="{$js_file['file']}"></script>
<block cond="$js_file['targetie']"><![endif]-->{"\n"}</block>
</block>
</body>

View file

@ -1,73 +0,0 @@
{@
$lang_type = Context::getLangType();
$ssl_actions = Context::getSSLActions();
$css_files=Context::getCssFile();
$js_files=Context::getJsFile();
}
<!DOCTYPE html>
<html lang="{str_replace('jp','ja',$lang_type)}" class="xe-mobilelayout">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<block loop="Context::getMetaTag() => $no, $val">
<meta http-equiv="{$val['name']}"|cond="$val['is_http_equiv']" name="{$val['name']}"|cond="!$val['is_http_equiv']" content="{$val['content']}">
</block>
<!--// TITLE -->
<title>{Context::getBrowserTitle()}</title>
<!-- CSS -->
<block loop="$css_files=>$key,$css_file">
<block cond="$css_file['targetie']"><!--[if {$css_file['targetie']}]><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--></block></block>
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
<block cond="$css_file['targetie']"><block cond="stripos($css_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
</block>
<!-- JS -->
<block loop="$js_files=>$key,$js_file">
<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']"><block cond="stripos($js_file['targetie'], 'gt') === 0"><!--</block><![endif]--></block>
</block>
<!--// RSS -->
<!--@if($rss_url)-->
<link rel="alternate" type="application/rss+xml" title="RSS" href="{$rss_url}" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" />
<!--@end-->
<!--@if($general_rss_url)-->
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{$general_rss_url}" />
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" />
<!--@end-->
<!--// ICON-->
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />
{Context::getHtmlHeader()}
<script>
//<![CDATA[
var current_url = "{$current_url}";
var request_uri = "{$request_uri}";
<block cond="$vid">var xeVid = "{$vid}";</block>
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
var ssl_actions = new Array(<!--@if(count($ssl_actions))-->"{implode('","',array_keys($ssl_actions))}"<!--@end-->);
var default_url = "{Context::getDefaultUrl()}";
<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('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
//]]>
</script>
</head>
<body{Context::getBodyClass()}>
{Context::getBodyHeader()}
{$content}
{Context::getHtmlFooter()}
<div id="rhymix_debug_panel"></div>
<div id="rhymix_debug_button"></div>
<!--// ETC -->
{@ $js_body_files = Context::getJsFile('body') }
<!--@foreach($js_body_files as $key => $js_file)-->
<!--@if($js_file['targetie'])--><!--[if {$js_file['targetie']}]><!--@end-->
<script src="{$js_file['file']}"></script>
<!--@if($js_file['targetie'])--><![endif]--><!--@end-->
<!--@end-->
</body>
</html>

View file

@ -1,48 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo _XE_SITELOCK_TITLE_?></title>
<style>
html,
body {
min-height: 100%;
}
body {
font-size: 12px;
}
h1 {
margin: 0;
font: bold 24px Arial, Helvetica, sans-serif;
color: #666;
}
section {
position: relative;
max-width: 500px;
margin: 100px auto 0 auto;
overflow: hidden;
}
div {
height: 100%;
}
p {
line-height: 1.5;
color: #666;
}
@media only all and (max-width: 480px) {
section {
margin-top: 20px;
}
}
</style>
</head>
<body>
<section>
<div>
<h1><?php echo _XE_SITELOCK_TITLE_?></h1>
<p><?php echo _XE_SITELOCK_MESSAGE_?>&nbsp;</p>
</div>
</section>
</body>
</html>

View file

@ -227,7 +227,7 @@ class addonAdminController extends addonController
* @param string $isUsed Whether to use
* @return Object
*/
function doInsert($addon, $site_srl = 0, $gtype = 'site', $isUsed = 'N', $extra_vars)
function doInsert($addon, $site_srl = 0, $gtype = 'site', $isUsed = 'N', $extra_vars = null)
{
$args = new stdClass;
$args->addon = $addon;

View file

@ -46,13 +46,23 @@ class addonAdminModel extends addon
$oAutoinstallModel = getModel('autoinstall');
foreach($addonList as $key => $addon)
{
// check blacklist
$addonList[$key]->isBlacklisted = Context::isBlacklistedPlugin($addon->addon);
// get easyinstall remove url
$packageSrl = $oAutoinstallModel->getPackageSrlByPath($addon->path);
$addonList[$key]->remove_url = $oAutoinstallModel->getRemoveUrlByPackageSrl($packageSrl);
// get easyinstall need update
$package = $oAutoinstallModel->getInstalledPackages($packageSrl);
$addonList[$key]->need_update = $package[$packageSrl]->need_update;
if($addonList[$key]->isBlacklisted)
{
$addonList[$key]->need_update = 'N';
}
else
{
$package = $oAutoinstallModel->getInstalledPackages($packageSrl);
$addonList[$key]->need_update = $package[$packageSrl]->need_update;
}
// get easyinstall update url
if($addonList[$key]->need_update == 'Y')

View file

@ -19,7 +19,6 @@ class addon extends ModuleObject
$oAddonController = getAdminController('addon');
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
$oAddonController->doInsert('blogapi');
$oAddonController->doInsert('member_communication', 0, 'site', 'Y');
$oAddonController->doInsert('member_extra_info', 0, 'site', 'Y');
$oAddonController->doInsert('mobile', 0, 'site', 'Y');
$oAddonController->doInsert('resize_image', 0, 'site', 'Y');

View file

@ -84,7 +84,7 @@ class addonController extends addon
$addon_list = $oAddonModel->getInsertedAddons($site_srl, $gtype);
foreach($addon_list as $addon => $val)
{
if($val->addon == "smartphone"
if(Context::isBlacklistedPlugin($addon)
|| ($type == "pc" && $val->is_used != 'Y')
|| ($type == "mobile" && $val->is_used_m != 'Y')
|| ($gtype == 'global' && $val->is_fixed != 'Y')

View file

@ -34,23 +34,29 @@
<tbody>
<tr loop="$addon_list => $addon">
<td class="title">
<p><strong>{$addon->title}</strong></p>
<p><strong style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->title}</strong></p>
<p>{$addon->description}</p>
<p cond="$addon->need_update == 'Y'" class="update">
{$lang->msg_avail_easy_update} <a href="{$addon->update_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
</p>
</td>
<td>{$addon->version}</td>
<td><span style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->version}</span></td>
<td class="nowr">
<block loop="$addon->author => $author">
<a cond="$author->homepage" href="{$author->homepage}" target="_blank">{$author->name}</a>
<block cond="!$author->homepage">{$author->name}</block>
</block>
</td>
<td>{$addon->path}</td>
<td><a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a></td>
<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->activated" /></td>
<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->mactivated" /></td>
<td><span style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->path}</span></td>
<td>
<!--@if($addon->isBlacklisted)-->
<span style="color:#aaa">{$lang->cmd_setup}</span>
<!--@else-->
<a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a>
<!--@end-->
</td>
<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->activated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>
<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->mactivated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>
<td><a cond="$addon->remove_url" href="{$addon->remove_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->cmd_delete}</a></td>
</tr>
</tbody>

View file

@ -16,11 +16,5 @@
</p>
</footer>
</div>
<script>
xe.current_lang = '{$lang_type}';
xe.lang.confirm_run = '{$lang->confirm_run}';
xe.lang.confirm_reset_admin_menu = '{$lang->confirm_reset_admin_menu}';
admin_menu_srl = '{$admin_menu_srl}';
</script>
<load target="./js/config.js" usecdn="true" />
<load target="../../session/tpl/js/session.js" usecdn="true" />

View file

@ -1,5 +1,14 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=2, user-scalable=yes" />
<script>
var admin_menu_srl = "{$admin_menu_srl}";
xe.cmd_find = "{$lang->cmd_find}";
xe.cmd_cancel = "{$lang->cmd_cancel}";
xe.cmd_confirm = "{$lang->cmd_confirm}";
xe.msg_select_menu = "{$lang->msg_select_menu}";
xe.lang.confirm_run = "{$lang->confirm_run}";
xe.lang.confirm_reset_admin_menu = "{$lang->confirm_reset_admin_menu}";
</script>
<div class="x">
<p class="skipNav"><a href="#content">{$lang->skip_to_content}</a></p>
<header class="header">

View file

@ -2389,3 +2389,36 @@ html[lang="mn"] .x .g11n.active>[disabled],
height: 1px;
overflow: hidden;
}
/* language specific styles */
/* English admin_en.css */
html:lang(en) body>.x,
html:lang(en) .x table,
html:lang(en) .x input,
html:lang(en) .x textarea,
html:lang(en) .x select,
html:lang(en) .x button{font-family:Arial,Helvetica,sans-serif}
@media all and (max-width:980px){
html:lang(en) body>.x,
html:lang(en) .x table,
html:lang(en) .x input,
html:lang(en) .x textarea,
html:lang(en) .x select,
html:lang(en) .x button{font-family:sans-serif}
}
/* Korean admin_ko.css */
html:lang(ko) body>.x,
html:lang(ko) .x table,
html:lang(ko) .x input,
html:lang(ko) .x textarea,
html:lang(ko) .x select,
html:lang(ko) .x button{font-family: 'NanumGothic', 'Malgun Gothic', 'Apple SD Gothic Neo', 'Dotum', Arial, Helvetica, sans-serif}
/* Japanese admin_jp.css */
html:lang(ja) body>.x,
html:lang(ja) .x table,
html:lang(ja) .x input,
html:lang(ja) .x textarea,
html:lang(ja) .x select,
html:lang(ja) .x button{font-family:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,' Pゴシック',sans-serif}

View file

@ -1,5 +0,0 @@
@charset "utf-8";
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,5 +0,0 @@
@charset "utf-8";
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,' Pゴシック',sans-serif}
@media all and (max-width:980px){
body>.x,.x table,.x input,.x textarea,.x select,.x button{font-family:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,' Pゴシック',sans-serif}
}

View file

@ -1,5 +0,0 @@
@charset "utf-8";
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}
}

View file

@ -106,6 +106,11 @@ class boardController extends board
}
}
if($this->module_info->update_log == 'Y')
{
$obj->update_log_setting = 'Y';
}
// update the document if it is existed
if($is_update)
{
@ -146,12 +151,14 @@ class boardController extends board
$obj->last_update = $obj->regdate = date('YmdHis');
$obj->update_order = $obj->list_order = (getNextSequence() * -1);
}
$obj->reason_update = escape($obj->reason_update);
$output = $oDocumentController->updateDocument($oDocument, $obj);
$msg_code = 'success_updated';
// insert a new document otherwise
} else {
}
else
{
$output = $oDocumentController->insertDocument($obj, $bAnonymous);
$msg_code = 'success_registed';
$obj->document_srl = $output->get('document_srl');

View file

@ -333,6 +333,8 @@ class boardView extends board
}
}
Context::set('update_view', $this->grant->update_view);
// setup the document oject on context
$oDocument->add('module_srl', $this->module_srl);
Context::set('oDocument', $oDocument);
@ -1140,6 +1142,44 @@ class boardView extends board
$this->setTemplateFile('message');
}
function dispBoardUpdateLog()
{
$oDocumentModel = getModel('document');
$document_srl = Context::get('document_srl');
if($this->grant->update_view !== true)
{
return new Object(-1, 'msg_not_permitted');
}
$updatelog = $oDocumentModel->getDocumentUpdateLog($document_srl);
Context::set('total_count', $updatelog->page_navigation->total_count);
Context::set('total_page', $updatelog->page_navigation->total_page);
Context::set('page', $updatelog->page);
Context::set('page_navigation', $updatelog->page_navigation);
Context::set('updatelog', $updatelog);
$this->setTemplateFile('update_list');
}
function dispBoardUpdateLogView()
{
$oDocumentModel = getModel('document');
$update_id = Context::get('update_id');
if($this->grant->update_view !== true)
{
return new Object(-1, 'msg_not_permitted');
}
$update_log = $oDocumentModel->getUpdateLog($update_id);
$extra_vars = unserialize($update_log->extra_vars);
Context::set('extra_vars', $extra_vars);
Context::set('update_log', $update_log);
$this->setTemplateFile('update_view');
}
/**
* @brief the method for displaying the warning messages
* display an error message if it has not a special design

View file

@ -21,6 +21,9 @@
<title xml:lang="zh-TW">檢視</title>
<title xml:lang="tr">görüş</title>
</grant>
<grant name="update_view" default="guest">
<title xml:lang="ko">수정내역 조회</title>
</grant>
<grant name="write_document" default="guest">
<title xml:lang="ko">글 작성</title>
<title xml:lang="zh-CN">发表新主题</title>
@ -63,6 +66,7 @@
<action name="dispBoardCategoryList" type="view" />
<action name="dispBoardContentCommentList" type="view" />
<action name="dispBoardContentFileList" type="view" />
<action name="dispBoardUpdateLog" type="view" />
<action name="dispBoardTagList" type="view" />
<action name="dispBoardWrite" type="view" standalone="false" />
@ -73,6 +77,7 @@
<action name="dispBoardDeleteComment" type="view" standalone="false" />
<action name="dispBoardDeleteTrackback" type="view" standalone="false" />
<action name="dispBoardMessage" type="view" />
<action name="dispBoardUpdateLogView" type="view" />
<action name="procBoardInsertDocument" type="controller" ruleset="insertDocument" standalone="false" />
<action name="procBoardDeleteDocument" type="controller" standalone="false" />

View file

@ -14,6 +14,8 @@ $lang->consultation = '상담 기능';
$lang->secret = '비밀글 기능';
$lang->thisissecret = '비밀글입니다.';
$lang->admin_mail = '관리자 메일';
$lang->update_log = '게시글 수정 내역';
$lang->last_updater = '수정한사람';
$lang->cmd_board_list = '게시판 목록';
$lang->cmd_module_config = '게시판 공통 설정';
$lang->cmd_board_info = '게시판 정보';
@ -31,6 +33,7 @@ $lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주
$lang->about_list_config = '게시판의 목록형식 사용시 원하는 항목들로 배치를 할 수 있습니다. 단 스킨에서 지원하지 않는 경우 불가능합니다. 대상항목/ 표시항목의 항목을 더블클릭하면 추가/ 제거가 됩니다.';
$lang->about_use_status = '글 작성 시 선택할 수 있는 상태를 지정해주세요.';
$lang->about_protect_comment = '댓글의 댓글이 있을경우 해당댓글을 삭제 및 수정을 할 수 없도록 합니다.';
$lang->about_update_log = '게시글을 수정할 경우 수정한 내역을 저장하도록 합니다.';
$lang->msg_not_enough_point = '포인트가 부족합니다';
$lang->write_comment = '댓글 쓰기';
$lang->msg_not_allow_comment = '해당 글의 댓글 쓰기가 잠겨있습니다.';
@ -52,4 +55,8 @@ $lang->msg_admin_comment_no_modify = '최고관리자의 댓글을 수정할 권
$lang->msg_board_delete_protect_comment = '댓글이 작성된 댓글의 글을 삭제할 수 없습니다.';
$lang->msg_board_update_protect_comment = '댓글이 작성된 댓글의 글을 수정할 수 없습니다.';
$lang->msg_protect_regdate_document = '%s일 이전의 게시글은 수정 또는 삭제 할 수 없습니다.';
$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.';
$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.';
$lang->msg_dont_have_update_log = '업데이트 로그가 기록되어 있지 않은 게시글입니다.';
$lang->original_letter = '원본글';
$lang->msg_warning_update_log = '<span class="x_label x_label-important">주의!</span> 사용시 디비가 많이 늘어날 수 있습니다.';
$lang->reason_update = '수정한 이유';

View file

@ -10,7 +10,7 @@
{str_repeat("&nbsp;&nbsp;",$val->depth)} {$val->title} ({$val->document_count})
</option>
</select>
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{htmlspecialchars($oDocument->getTitleText())}" />
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
<input cond="$grant->manager" type="checkbox" name="is_notice" value="Y" class="iCheck" checked="checked"|cond="$oDocument->isNotice()" id="is_notice" />
<label cond="$grant->manager" for="is_notice">{$lang->notice}</label>

View file

@ -114,7 +114,8 @@
<img cond="$oDocument->getProfileImage()" src="{$oDocument->getProfileImage()}" alt="Profile" class="pf" />
<div cond="$oDocument->getSignature()" class="tx">{$oDocument->getSignature()}</div>
</div>
<div class="btnArea">
<div class="btnArea">
<a cond="$update_view" class="btn" href="{getUrl('act','dispBoardUpdateLog','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-list-ul"></i>{$lang->update_log}</a>
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-eraser"></i>{$lang->cmd_modify}</a>
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-trash"></i>{$lang->cmd_delete}</a>
<span class="etc">

View file

@ -263,6 +263,16 @@
right:0;
border-radius: 0 2px 2px 0;
}
.update-log {
width:100%;
border-bottom:1px solid #dbdbdb;
margin: 5px auto 5px auto;
padding:5px;
}
/* Board Write */
/* write_form.html */
@ -463,6 +473,9 @@
white-space: nowrap;
color : #666;
}
.update-log .read_header .meta {
border-bottom:0;
}
.read_header .meta > span { margin-left: 8px ;}
.read_header .meta > span:first-child {margin-left:0;}
.read_header .meta:after {

View file

@ -0,0 +1,42 @@
<include target="_header.html" />
<div class="board_list" id="board_list">
<table width="100%" border="1" cellspacing="0" summary="List of Articles">
<thead>
<tr>
<th scope="col" class="title"><span>{$lang->title}</span></th>
<th scope="col"><span>{$lang->writer}</span></th>
<th scope="col"><span>{$lang->last_updater}</span></th>
<th scope="col"><span>{$lang->last_post}</span></th>
</tr>
</thead>
<tbody cond="$updatelog->data">
<tr loop="$updatelog->data=>$val">
<td class="title">
<a href="{getUrl('', 'mid', $mid, 'act', 'dispBoardUpdateLogView', 'update_id', $val->update_id)}">{$val->title}</a>
</td>
<td class="author">
{$val->update_nick_name}
</td>
<td class="author">
{$val->nick_name}
</td>
<td class="time">
{zdate($val->regdate, 'Y.m.d H:i:s')}
</td>
</tr>
</tbody>
<tbody cond="!$updatelog->data">
<tr>
<td colspan="4" style="text-align: center">{$lang->msg_dont_have_update_log}</td>
</tr>
</tbody>
</table>
</div>
<div class="pagination pagination-centered">
<a href="{getUrl('page','','module_srl','')}" class="direction">&laquo; {$lang->first_page}</a>
<!--@while($page_no = $page_navigation->getNextPage())-->
<strong cond="$page==$page_no">{$page_no}</strong>
<a cond="$page!=$page_no" href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a>
<!--@end-->
<a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} &raquo;</a>
</div>

View file

@ -0,0 +1,29 @@
<include target="_header.html" />
<div class="update-log">
<div class="board_read" >
<!-- READ HEADER -->
<div class="read_header">
<h1>
<a href="{getUrl('category',$update_log->category_srl, 'document_srl', '')}" class="category" cond="$module_info->use_category=='Y' && $update_log->category_srl">{$category_list[$update_log->category_srl]->title}</a>
<a>{$update_log->title}</a>
</h1>
<p class="meta">
<span class="time">
<i class="xi-time"></i> {zdate($update_log->regdate,'Y.m.d H:i:s')}
</span>
</p>
</div>
<!-- READ BODY -->
<div class="read_body">
{$update_log->content}
</div>
<p loop="$extra_vars=>$key=>$val">
{$key} : {$val}
</p>
<p>
{$lang->reason_update} :
{$update_log->reason_update}
</p>
<!-- /READ BODY -->
</div>
</div>

View file

@ -10,7 +10,7 @@
{str_repeat("&nbsp;&nbsp;",$val->depth)} {$val->title} ({$val->document_count})
</option>
</select>
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{htmlspecialchars($oDocument->getTitleText())}" />
<input cond="$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" value="{escape($oDocument->getTitleText(), false)}" />
<input cond="!$oDocument->getTitleText()" type="text" name="title" class="iText" title="{$lang->title}" />
<input cond="$grant->manager" type="checkbox" name="is_notice" value="Y" class="iCheck" checked="checked"|cond="$oDocument->isNotice()" id="is_notice" />
<label cond="$grant->manager" for="is_notice">{$lang->notice}</label>
@ -43,6 +43,7 @@
<input type="checkbox" name="notify_message" class="iCheck" value="Y" checked="checked"|cond="$oDocument->useNotify()" id="notify_message" />
<label for="notify_message">{$lang->notify}</label>
</block>
<!--@if(is_array($status_list))-->
<!--@foreach($status_list AS $key=>$value)-->
<input type="radio" name="status" value="{$key}" id="{$key}" <!--@if($oDocument->get('status') == $key || ($key == 'PUBLIC' && !$document_srl))-->checked="checked"<!--@end--> />
@ -66,7 +67,11 @@
<span class="item">
<label for="tags" class="iLabel">{$lang->tag}: {$lang->about_tag}</label>
<input type="text" name="tags" id="tags" value="{htmlspecialchars($oDocument->get('tags'))}" class="iText" style="width:300px" title="Tag" />
</span>
</span>
<span class="item" cond="$oDocument->get('document_srl') && $module_info->update_log == 'Y'">
<label for="reason_update" class="iLabel">{$lang->reason_update}</label>
<input type="text" name="reason_update" id="reason_update" value="" class="iText" style="width:300px" title="reason update" />
</span>
</div>
<div class="btnArea">
<block cond="!$oDocument->isExists() || $oDocument->get('status') == 'TEMP'">

View file

@ -199,6 +199,13 @@
<label class="x_inline" for="consultation"><input type="checkbox" name="consultation" id="consultation" value="Y" checked="checked"|cond="$module_info->consultation == 'Y'" /> {$lang->about_consultation}</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->update_log}</label>
<div class="x_controls">
<label class="x_inline" for="update_log"><input type="checkbox" name="update_log" id="update_log" value="Y" checked="checked"|cond="$module_info->update_log == 'Y'" /> {$lang->about_update_log}</label>
<p>{$lang->msg_warning_update_log}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->protect_content}</label>
<div class="x_controls">

View file

@ -130,7 +130,7 @@ class communicationController extends communication
$view_url = Context::getRequestUri();
$content = sprintf("%s<br /><br />From : <a href=\"%s\" target=\"_blank\">%s</a>", $content, $view_url, $view_url);
$oMail = new Mail();
$oMail->setTitle($title);
$oMail->setTitle(htmlspecialchars($title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
$oMail->setContent(utf8_mbencode(removeHackTag($content)));
$oMail->setSender($logged_info->nick_name, $logged_info->email_address);
$oMail->setReceiptor($receiver_member_info->nick_name, $receiver_member_info->email_address);

View file

@ -92,6 +92,7 @@ class documentAdminController extends document
$obj = $oDocument->getObjectVars();
// ISSUE https://github.com/xpressengine/xe-core/issues/32
$args_doc_origin = new stdClass();
$args_doc_origin->document_srl = $document_srl;
$output_ori = executeQuery('document.getDocument', $args_doc_origin, array('content'));
$obj->content = $output_ori->data->content;
@ -144,11 +145,20 @@ class documentAdminController extends document
$obj->module_srl = $module_srl;
$obj->category_srl = $category_srl;
$output = executeQuery('document.updateDocumentModule', $obj);
if(!$output->toBool()) {
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
else
{
$update_output = $oDocumentController->insertDocumentUpdateLog($obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
}
//Move a module of the extra vars
$output = executeQuery('document.moveDocumentExtraVars', $obj);
if(!$output->toBool()) {

View file

@ -389,7 +389,7 @@ class documentController extends document
$obj->homepage = $logged_info->homepage;
}
// If the tile is empty, extract string from the contents.
$obj->title = htmlspecialchars($obj->title);
$obj->title = htmlspecialchars($obj->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
settype($obj->title, "string");
if($obj->title == '') $obj->title = cut_str(trim(strip_tags(nl2br($obj->content))),20,'...');
// If no tile extracted from the contents, leave it untitled.
@ -439,6 +439,7 @@ class documentController extends document
return $output;
}
// Insert extra variables if the document successfully inserted.
$extra_vars = array();
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
if(count($extra_keys))
{
@ -449,13 +450,20 @@ class documentController extends document
{
$tmp = $obj->{'extra_vars'.$idx};
if(is_array($tmp))
{
$value = implode('|@|', $tmp);
}
else
{
$value = trim($tmp);
}
}
else if(isset($obj->{$extra_item->name}))
{
$value = trim($obj->{$extra_item->name});
}
else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
if($value == NULL) continue;
$extra_vars[$extra_item->name] = $value;
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
}
@ -464,6 +472,16 @@ class documentController extends document
// Call a trigger (after)
if($output->toBool())
{
if($obj->update_log_setting === 'Y')
{
$obj->extra_vars = serialize($extra_vars);
$update_output = $this->insertDocumentUpdateLog($obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
}
$trigger_output = ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
if(!$trigger_output->toBool())
{
@ -517,6 +535,8 @@ class documentController extends document
$oModuleModel = getModel('module');
if(!$obj->module_srl) $obj->module_srl = $source_obj->get('module_srl');
$module_srl = $obj->module_srl;
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
$document_config = $oModuleModel->getModulePartConfig('document', $module_srl);
if(!$document_config)
{
@ -588,7 +608,7 @@ class documentController extends document
$obj->password = getModel('member')->hashPassword($obj->password);
}
// If an author is identical to the modifier or history is used, use the logged-in user's information.
if(Context::get('is_logged'))
if(Context::get('is_logged') && $module_info->use_anonymous != 'Y')
{
$logged_info = Context::get('logged_info');
if($source_obj->get('member_srl')==$logged_info->member_srl)
@ -610,7 +630,7 @@ class documentController extends document
$obj->homepage = $source_obj->get('homepage');
}
// If the tile is empty, extract string from the contents.
$obj->title = htmlspecialchars($obj->title);
$obj->title = htmlspecialchars($obj->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
settype($obj->title, "string");
if($obj->title == '') $obj->title = cut_str(strip_tags($obj->content),20,'...');
// If no tile extracted from the contents, leave it untitled.
@ -647,6 +667,7 @@ class documentController extends document
// Change not extra vars but language code of the original document if document's lang_code doesn't exist.
if(!$source_obj->get('lang_code'))
{
$lang_code_args = new stdClass();
$lang_code_args->document_srl = $source_obj->get('document_srl');
$lang_code_args->lang_code = Context::getLangType();
$output = executeQuery('document.updateDocumentsLangCode', $lang_code_args);
@ -683,7 +704,9 @@ class documentController extends document
$oDB->rollback();
return $output;
}
// Remove all extra variables
$extra_vars = array();
if(Context::get('act')!='procFileDelete')
{
$this->deleteDocumentExtraVars($source_obj->get('module_srl'), $obj->document_srl, null, Context::getLangType());
@ -704,6 +727,7 @@ class documentController extends document
}
else if(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
if($value == NULL) continue;
$extra_vars[$extra_item->name] = $value;
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
}
@ -720,6 +744,16 @@ class documentController extends document
// Call a trigger (after)
if($output->toBool())
{
if($obj->update_log_setting === 'Y')
{
$obj->extra_vars = serialize($extra_vars);
$update_output = $this->insertDocumentUpdateLog($obj, $source_obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
}
$trigger_output = ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
if(!$trigger_output->toBool())
{
@ -746,6 +780,45 @@ class documentController extends document
return $output;
}
function insertDocumentUpdateLog($obj, $source_obj = null)
{
$update_args = new stdClass();
$logged_info = Context::get('logged_info');
if($source_obj === null)
{
$update_args->category_srl = $obj->category_srl;
$update_args->module_srl = $obj->module_srl;
$update_args->nick_name = $obj->nick_name;
}
else
{
if($obj->category_srl)
{
$update_args->category_srl = $obj->category_srl;
}
else
{
$update_args->category_srl = $source_obj->get('category_srl');
}
$update_args->module_srl = $source_obj->get('module_srl');
$update_args->nick_name = $source_obj->get('nick_name');
}
$update_args->document_srl = $obj->document_srl;
$update_args->update_member_srl = $logged_info->member_srl;
$update_args->title = $obj->title;
$update_args->title_bold = $obj->title_bold;
$update_args->title_color = $obj->title_color;
$update_args->content = $obj->content;
$update_args->update_nick_name = $logged_info->nick_name;
$update_args->tags = $obj->tags;
$update_args->extra_vars = $obj->extra_vars;
$update_args->reason_update = $obj->reason_update;
$update_output = executeQuery('document.insertDocumentUpdateLog', $update_args);
return $update_output;
}
/**
* Deleting Documents
* @param int $document_srl
@ -829,6 +902,7 @@ class documentController extends document
$this->_deleteDeclaredDocuments($args);
$this->_deleteDocumentReadedLog($args);
$this->_deleteDocumentVotedLog($args);
$this->_deleteDocumentUpdateLog($args);
// Remove the thumbnail file
FileHandler::removeDir(sprintf('files/thumbnails/%s',getNumberingPath($document_srl, 3)));
@ -878,6 +952,11 @@ class documentController extends document
executeQuery('document.deleteDocumentVotedLog', $documentSrls);
}
function _deleteDocumentUpdateLog($document_srl)
{
executeQuery('document.deleteDocumentUpdateLog', $document_srl);
}
/**
* Move the doc into the trash
* @param object $obj

View file

@ -621,7 +621,7 @@ class documentModel extends document
$this->_setSearchOption($opt, $args, $query_id, $use_division);
if($sort_check->isExtraVars)
if($sort_check->isExtraVars || !$opt->list_count)
{
return 1;
}
@ -1548,6 +1548,25 @@ class documentModel extends document
return $document_list;
}
function getDocumentUpdateLog($document_srl)
{
$args = new stdClass();
$args->document_srl = $document_srl;
$output = executeQueryArray('document.getDocumentUpdateLog', $args);
return $output;
}
function getUpdateLog($update_id)
{
$args = new stdClass();
$args->update_id = $update_id;
$output = exeCuteQuery('document.getUpdateLog', $args);
$updage_log = $output->data;
return $updage_log;
}
}
/* End of file document.model.php */
/* Location: ./modules/document/document.model.php */

View file

@ -0,0 +1,8 @@
<query id="deleteDocumentUpdateLog" action="delete">
<tables>
<table name="document_update_log" />
</tables>
<conditions>
<condition operation="in" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,22 @@
<query id="getDocumentUpdateLog" action="select">
<tables>
<table name="document_update_log" />
</tables>
<columns>
<column name="nick_name" />
<column name="update_nick_name" />
<column name="regdate" />
<column name="title" />
<column name="module_srl" />
<column name="update_id" />
</columns>
<conditions>
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
</conditions>
<navigation>
<index var="sort_index" default="update_id" order="desc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" default="1" />
</navigation>
</query>

View file

@ -0,0 +1,11 @@
<query id="getUpdateLog" action="select">
<tables>
<table name="document_update_log" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="update_id" var="update_id" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,22 @@
<query id="insertDocumentUpdateLog" action="insert">
<tables>
<table name="document_update_log" />
</tables>
<columns>
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
<column name="module_srl" var="module_srl" filter="number" notnull="notnull" />
<column name="update_member_srl" var="update_member_srl" filter="number" />
<column name="category_srl" var="category_srl" filter="number" />
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
<column name="nick_name" var="nick_name" notnull="notnull" />
<column name="title" var="title" notnull="notnull" />
<column name="title_bold" var="title_bold" />
<column name="title_color" var="title_color" />
<column name="content" var="content" notnull="notnull" />
<column name="update_nick_name" var="update_nick_name" notnull="notnull" />
<column name="tags" var="tags" />
<column name="extra_vars" var="extra_vars" />
<column name="reason_update" var="reason_update" />
<column name="regdate" var="regdate" default="curdate()" />
</columns>
</query>

View file

@ -0,0 +1,18 @@
<table name="document_update_log">
<column name="update_id" type="number" size="11" notnull="notnull" auto_increment="auto_increment" primary_key="primary_key" />
<column name="document_srl" type="number" size="11" notnull="notnull" index="idx_document_srl" />
<column name="update_member_srl" type="number" size="11" notnull="notnull" />
<column name="module_srl" type="number" size="11" notnull="notnull" />
<column name="category_srl" type="number" size="11" />
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
<column name="nick_name" type="varchar" size="80" notnull="notnull" />
<column name="regdate" type="date" index="idx_regdate" />
<column name="title" type="varchar" size="250" />
<column name="title_bold" type="char" size="1" default="N" notnull="notnull" />
<column name="title_color" type="varchar" size="7" />
<column name="content" type="bigtext" notnull="notnull" />
<column name="update_nick_name" type="varchar" size="80" />
<column name="tags" type="text" />
<column name="extra_vars" type="text" />
<column name="reason_update" type="text" />
</table>

View file

@ -1,3 +1,3 @@
<load target="js/layout_modify.js" />
<include target="header.html" />
{$content}
{$content}

View file

@ -206,7 +206,7 @@ $lang->about_profile_image = 'Members will be able to use profile images';
$lang->about_signature_max_height = 'You can limit the signature max height. Set this as 0 or leave it blank not to limit it.';
$lang->about_accept_agreement = 'I have read the agreement and agree with it';
$lang->about_member_default = 'It will be set as the default group on sign up';
$lang->about_find_member_account = 'lease input the email address you have entered during the registration and we will send your account info to this email address.';
$lang->about_find_member_account = 'Please input the email address you have entered during the registration and we will send your account info to this email address.';
$lang->about_ssl_port = 'Please enter if you are using non-default SSL port';
$lang->about_resend_auth_mail = 'You can request for the activation email if you have not activated yet.';
$lang->no_article = 'No articles';

View file

@ -631,7 +631,7 @@ class memberAdminView extends member
}
$replace = array_merge($extentionReplace, $replace);
$inputTag = preg_replace_callback('@%(\w+)%@', function($n) { return $replace[$n[1]]; }, $template);
$inputTag = preg_replace_callback('@%(\w+)%@', function($n) use($replace) { return $replace[$n[1]]; }, $template);
if($extendForm->description)
$inputTag .= '<p class="help-block">'.$extendForm->description.'</p>';

View file

@ -12,6 +12,6 @@
<index var="sort_index" default="regdate" order="desc" />
<list_count var="list_count" default="20" />
<page_count var="page_count" default="10" />
<page var="page" defailt="1" />
<page var="page" default="1" />
</navigation>
</query>

View file

@ -685,6 +685,8 @@
<script>
xe.lang.shortcut = '{$lang->shortcut}';
xe.lang.msg_no_root = xe.msg_no_root = "{$lang->msg_no_root}";
xe.lang.msg_no_shortcut = xe.msg_no_shortcut = "{$lang->msg_no_shortcut}";
xe.lang.msg_target_is_sub_of_origin = '{$lang->msg_target_is_sub_of_origin}';
xe.lang.confirm_sitemap_delete = '{$lang->confirm_sitemap_delete}';
xe.lang.confirm_menu_delete = '{$lang->confirm_menu_delete}';

View file

@ -1,7 +1,5 @@
<load target="../../admin/tpl/css/admin.bootstrap.css" />
<load target="../../admin/tpl/css/admin.css" />
<load cond="$lang_type=='ko'" target="../../admin/tpl/css/admin_ko.css" />
<load cond="$lang_type=='en'" target="../../admin/tpl/css/admin_en.css" />
<load target="../../admin/tpl/js/admin.js" />
<load target="js/generate_code.js" />
<load target="../../admin/tpl/js/jquery.tmpl.js" />

View file

@ -1,7 +1,5 @@
<load target="../../admin/tpl/css/admin.bootstrap.css" />
<load target="../../admin/tpl/css/admin.css" />
<load cond="$lang_type=='ko'" target="../../admin/tpl/css/admin_ko.css" />
<load cond="$lang_type=='en'" target="../../admin/tpl/css/admin_en.css" />
<load target="css/widget.css" />
<load target="../../admin/tpl/js/admin.js" />
<load target="../../admin/tpl/js/jquery.tmpl.js" />

View file

@ -1,20 +1,18 @@
<?php
require_once _XE_PATH_.'classes/context/Context.class.php';
require_once _XE_PATH_.'classes/xml/XmlParser.class.php';
require_once _XE_PATH_.'classes/handler/Handler.class.php';
require_once _XE_PATH_.'classes/file/FileHandler.class.php';
require_once _XE_PATH_.'classes/validator/Validator.class.php';
class ValidatorTest extends \Codeception\TestCase\Test
{
public function _before()
{
global $lang;
if(!$lang) $lang = new stdClass();
$lang->filter = new stdClass();
$lang->filter->isnull = 'isnull';
$lang->filter->outofrange = 'outofrange';
$lang->filter->equalto = 'equalto';
$ob_level = ob_get_level();
$oContext = Context::getInstance();
$oContext->init();
while (ob_get_level() > $ob_level)
{
ob_end_clean();
}
}
public function testRequired()
@ -187,7 +185,7 @@ class ValidatorTest extends \Codeception\TestCase\Test
// javascript
$vd->setCacheDir(__DIR__ . '/validator');
$js = $vd->getJsPath();
$this->assertFileEquals($js, __DIR__ . '/validator/condition.en.js');
$this->assertEquals(trim(file_get_contents(__DIR__ . '/validator/condition.en.js')), trim(file_get_contents($js)));
}
protected function tearDown()

View file

@ -2,7 +2,20 @@
v=xe.getApp('validator')[0];if(!v)return;
v.cast('ADD_FILTER',['condition', {'greeting1':{required:true},'greeting2':{'if':[{test:'$greeting1 == \'Hello\'', attr:'required', value:'true'}]}}]);
v.cast('ADD_MESSAGE',['isnull','isnull']);
v.cast('ADD_MESSAGE',['outofrange','outofrange']);
v.cast('ADD_MESSAGE',['equalto','equalto']);
})(jQuery);
v.cast('ADD_MESSAGE',['isnull','%s 값은 필수입니다.']);
v.cast('ADD_MESSAGE',['outofrange','%s의 글자 수를 맞추어 주세요.']);
v.cast('ADD_MESSAGE',['equalto','%s이(가) 잘못되었습니다.']);
v.cast('ADD_MESSAGE',['invalid','%s의 값이 올바르지 않습니다.']);
v.cast('ADD_MESSAGE',['invalid_email','%s의 값은 올바른 메일 주소가 아닙니다.']);
v.cast('ADD_MESSAGE',['invalid_userid','%s의 값은 영문, 숫자, _만 가능하며 첫 글자는 영문이어야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_user_id','%s의 값은 영문, 숫자, _만 가능하며 첫 글자는 영문이어야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_homepage','%s의 형식이 잘못되었습니다.(예: https://www.rhymix.org/)']);
v.cast('ADD_MESSAGE',['invalid_url','%s의 형식이 잘못되었습니다.(예: https://www.rhymix.org/)']);
v.cast('ADD_MESSAGE',['invalid_korean','%s의 형식이 잘못되었습니다. 한글로만 입력해야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_korean_number','%s의 형식이 잘못되었습니다. 한글과 숫자로만 입력해야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_alpha','%s의 형식이 잘못되었습니다. 영문으로만 입력해야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_alpha_number','%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_mid','%s의 형식이 잘못되었습니다. 첫 글자는 영문으로 시작해야 하며 \'영문+숫자+_\'로만 입력해야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_number','%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.']);
v.cast('ADD_MESSAGE',['invalid_extension','%s의 형식이 잘못되었습니다. *.* 나 *.jpg;*.gif; 처럼 입력해야 합니다.']);
})(jQuery);

View file

@ -77,8 +77,8 @@ class DateTimeTest extends \Codeception\TestCase\Test
public function testGetTimeGap()
{
Context::getInstance()->lang = Rhymix\Framework\Lang::getInstance('en');
Context::getInstance()->lang->loadPlugin('common');
$GLOBALS['lang'] = Rhymix\Framework\Lang::getInstance('en');
$GLOBALS['lang']->loadPlugin('common');
// Test getTimeGap() when the internal time zone is different from the default time zone.
Rhymix\Framework\Config::set('locale.internal_timezone', 10800);