mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 16:49:58 +09:00
Merge branch 'develop' into pr/session-class
This commit is contained in:
commit
6de0bc45db
51 changed files with 358 additions and 96 deletions
|
|
@ -11,11 +11,22 @@ var getPSImageSize = function(src) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var initPhotoSwipeFromDOM = function(gallerySelector) {
|
var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||||
|
// photoswipe will skip images that have these classes or are children of these elements.
|
||||||
|
var ps_skip_class = '.rx-escape, .photoswipe-escape',
|
||||||
|
ps_skip_elements_array = ['a', 'pre', 'xml', 'textarea', 'input', 'select', 'option', 'code', 'script', 'style', 'iframe', 'button', 'img', 'embed', 'object', 'ins'],
|
||||||
|
ps_skip_elements = '';
|
||||||
|
ps_skip_elements_array.forEach(function(el, i) { ps_skip_elements += el + ' img,'; });
|
||||||
|
|
||||||
|
// Photoswipe will enroll images that have this class, though the image is marked as skip item by criteria above.
|
||||||
|
var ps_enroll_class = '.photoswipe-images';
|
||||||
|
|
||||||
|
// CSS selector for photoswipe items.
|
||||||
|
var ps_find_selector = 'img:not(' + ps_skip_elements + ps_skip_class + '), img' + ps_enroll_class;
|
||||||
|
|
||||||
// parse slide data (url, title, size ...) from DOM elements
|
// parse slide data (url, title, size ...) from DOM elements
|
||||||
// (children of gallerySelector)
|
// (children of gallerySelector)
|
||||||
var parseThumbnailElements = function(el) {
|
var parseThumbnailElements = function(el) {
|
||||||
var imgElements = $(el).find("img"),
|
var imgElements = $(el).find(ps_find_selector),
|
||||||
numNodes = imgElements.length,
|
numNodes = imgElements.length,
|
||||||
items = [],
|
items = [],
|
||||||
imgEl,
|
imgEl,
|
||||||
|
|
@ -41,11 +52,12 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||||
pid: $(imgEl).attr('data-pswp-pid')
|
pid: $(imgEl).attr('data-pswp-pid')
|
||||||
};
|
};
|
||||||
|
|
||||||
if(imgEl.alt) {
|
var ps_skip_alt_class = '.photoswipe-no-caption';
|
||||||
|
if(imgEl.alt && !$(imgEl).is(ps_skip_alt_class)) {
|
||||||
item.title = imgEl.alt;
|
item.title = imgEl.alt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(imgEl.title) {
|
if(imgEl.title && !$(imgEl).is(ps_skip_alt_class)) {
|
||||||
item.title = imgEl.title;
|
item.title = imgEl.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -67,7 +79,7 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||||
|
|
||||||
// find root element of slide
|
// find root element of slide
|
||||||
var clickedListItem = closest(eTarget, function(el) {
|
var clickedListItem = closest(eTarget, function(el) {
|
||||||
return (el.tagName && el.tagName.toUpperCase() === 'IMG');
|
return (el.tagName && el.tagName.toUpperCase() === 'IMG' && el.hasAttribute('data-pswp-pid'));
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!clickedListItem) {
|
if(!clickedListItem) {
|
||||||
|
|
@ -80,7 +92,7 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||||
// find index of clicked item by looping through all child nodes
|
// find index of clicked item by looping through all child nodes
|
||||||
// alternatively, you may define index via data- attribute
|
// alternatively, you may define index via data- attribute
|
||||||
var clickedGallery = $(clickedListItem).closest(gallerySelector).get(0),
|
var clickedGallery = $(clickedListItem).closest(gallerySelector).get(0),
|
||||||
childNodes = $(clickedGallery).find('img'),
|
childNodes = $(clickedGallery).find(ps_find_selector),
|
||||||
numChildNodes = childNodes.length,
|
numChildNodes = childNodes.length,
|
||||||
nodeIndex = 0,
|
nodeIndex = 0,
|
||||||
index;
|
index;
|
||||||
|
|
@ -217,8 +229,10 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||||
// do not activate PhotoSwipe at the editor-component or other module components
|
// do not activate PhotoSwipe at the editor-component or other module components
|
||||||
var regx_skip = /(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i;
|
var regx_skip = /(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i;
|
||||||
var regx_allow_i6pngfix = /(?:common\/tpl\/images\/blank\.gif$)/i;
|
var regx_allow_i6pngfix = /(?:common\/tpl\/images\/blank\.gif$)/i;
|
||||||
var galleryImgEls = $(galleryElements[i]).find('img');
|
|
||||||
|
var galleryImgEls = $(galleryElements[i]).find(ps_find_selector);
|
||||||
for(var j = 0, jl = galleryImgEls.length; j < jl; j++) {
|
for(var j = 0, jl = galleryImgEls.length; j < jl; j++) {
|
||||||
|
// skip components
|
||||||
if(regx_skip.test($(galleryImgEls[j]).attr('src')) && !regx_allow_i6pngfix.test($(galleryImgEls[j]).attr('src'))) continue;
|
if(regx_skip.test($(galleryImgEls[j]).attr('src')) && !regx_allow_i6pngfix.test($(galleryImgEls[j]).attr('src'))) continue;
|
||||||
|
|
||||||
//$(galleryImgEls[j]).attr('data-pswp-uid', i+1);
|
//$(galleryImgEls[j]).attr('data-pswp-uid', i+1);
|
||||||
|
|
|
||||||
|
|
@ -475,8 +475,8 @@ class ModuleHandler extends Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check CSRF for POST actions
|
// check CSRF for non-GET (POST, PUT, etc.) actions
|
||||||
if(Context::getRequestMethod() === 'POST' && Context::isInstalled())
|
if(Context::getRequestMethod() !== 'GET' && Context::isInstalled())
|
||||||
{
|
{
|
||||||
if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
||||||
{
|
{
|
||||||
|
|
@ -617,8 +617,8 @@ class ModuleHandler extends Handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check CSRF for POST actions
|
// check CSRF for non-GET (POST, PUT, etc.) actions
|
||||||
if(Context::getRequestMethod() === 'POST' && Context::isInstalled())
|
if(Context::getRequestMethod() !== 'GET' && Context::isInstalled())
|
||||||
{
|
{
|
||||||
if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
if($xml_info->action->{$this->act} && $xml_info->action->{$this->act}->check_csrf !== 'false' && !checkCSRF())
|
||||||
{
|
{
|
||||||
|
|
@ -780,7 +780,10 @@ class ModuleHandler extends Handler
|
||||||
'dispLayoutPreviewWithModule' => 1
|
'dispLayoutPreviewWithModule' => 1
|
||||||
);
|
);
|
||||||
$db_use_mobile = Mobile::isMobileEnabled();
|
$db_use_mobile = Mobile::isMobileEnabled();
|
||||||
if($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent() && !isset($skipAct[Context::get('act')]) && $db_use_mobile === true)
|
|
||||||
|
$tablet_use = Rhymix\Framework\UA::isTablet();
|
||||||
|
$config_tablet_use = config('mobile.tablets');
|
||||||
|
if($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent() && !isset($skipAct[Context::get('act')]) && $db_use_mobile === true && ($tablet_use === true && $config_tablet_use === false) === false)
|
||||||
{
|
{
|
||||||
global $lang;
|
global $lang;
|
||||||
$header = '<style>div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>';
|
$header = '<style>div.xe_mobile{opacity:0.7;margin:1em 0;padding:.5em;background:#333;border:1px solid #666;border-left:0;border-right:0}p.xe_mobile{text-align:center;margin:1em 0}a.xe_mobile{color:#ff0;font-weight:bold;font-size:24px}@media only screen and (min-width:500px){a.xe_mobile{font-size:15px}}</style>';
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,21 @@ class Password
|
||||||
return Rhymix\Framework\Password::getRandomPassword($length);
|
return Rhymix\Framework\Password::getRandomPassword($length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function createSignature($string)
|
||||||
|
{
|
||||||
|
return Rhymix\Framework\Security::createSignature($string);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function checkSignature($string, $signature)
|
||||||
|
{
|
||||||
|
return Rhymix\Framework\Security::verifySignature($string, $signature);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSecretKey()
|
||||||
|
{
|
||||||
|
return config('crypto.authentication_key');
|
||||||
|
}
|
||||||
|
|
||||||
public function pbkdf2($password, $salt, $algorithm = 'sha256', $iterations = 8192, $length = 24)
|
public function pbkdf2($password, $salt, $algorithm = 'sha256', $iterations = 8192, $length = 24)
|
||||||
{
|
{
|
||||||
$hash = Rhymix\Framework\Security::pbkdf2($password, $salt, $algorithm, $iterations, $length);
|
$hash = Rhymix\Framework\Security::pbkdf2($password, $salt, $algorithm, $iterations, $length);
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,8 @@ class Validator
|
||||||
'url' => '/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/',
|
'url' => '/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-]+)+(:\d+)?/',
|
||||||
'alpha' => '/^[a-z]*$/i',
|
'alpha' => '/^[a-z]*$/i',
|
||||||
'alpha_number' => '/^[a-z][a-z0-9_]*$/i',
|
'alpha_number' => '/^[a-z][a-z0-9_]*$/i',
|
||||||
'number' => '/^(?:[1-9]\\d*|0)$/'
|
'number' => '/^(?:[1-9]\\d*|0)$/',
|
||||||
|
'float' => '/^\d+(\.\d+)?$/'
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->_has_mb_func = is_callable('mb_strlen');
|
$this->_has_mb_func = is_callable('mb_strlen');
|
||||||
|
|
@ -714,7 +715,7 @@ class Validator
|
||||||
{
|
{
|
||||||
$name = strtolower($name);
|
$name = strtolower($name);
|
||||||
|
|
||||||
if(in_array($name, array('email', 'userid', 'url', 'alpha', 'alpha_number', 'number')))
|
if(in_array($name, array('email', 'userid', 'url', 'alpha', 'alpha_number', 'number', 'float')))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
/**
|
/**
|
||||||
* RX_VERSION is the version number of the Rhymix CMS.
|
* RX_VERSION is the version number of the Rhymix CMS.
|
||||||
*/
|
*/
|
||||||
define('RX_VERSION', '1.8.22');
|
define('RX_VERSION', '1.8.24');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.
|
* RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch.
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ class ConfigParser
|
||||||
|
|
||||||
// Create new crypto keys.
|
// Create new crypto keys.
|
||||||
$config['crypto']['encryption_key'] = Security::getRandom(64, 'alnum');
|
$config['crypto']['encryption_key'] = Security::getRandom(64, 'alnum');
|
||||||
$config['crypto']['authentication_key'] = Security::getRandom(64, 'alnum');
|
$config['crypto']['authentication_key'] = $db_info->secret_key ?: Security::getRandom(64, 'alnum');
|
||||||
$config['crypto']['session_key'] = Security::getRandom(64, 'alnum');
|
$config['crypto']['session_key'] = Security::getRandom(64, 'alnum');
|
||||||
|
|
||||||
// Convert language configuration.
|
// Convert language configuration.
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,40 @@ class Security
|
||||||
return \CryptoCompat::decrypt($ciphertext, $key);
|
return \CryptoCompat::decrypt($ciphertext, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a digital signature to verify the authenticity of a string.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function createSignature($string)
|
||||||
|
{
|
||||||
|
$key = config('crypto.authentication_key');
|
||||||
|
$salt = self::getRandom(8, 'alnum');
|
||||||
|
$hash = substr(base64_encode(hash_hmac('sha256', hash_hmac('sha256', $string, $salt), $key, true)), 0, 32);
|
||||||
|
return $salt . strtr($hash, '+/', '-_');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether a signature is valid.
|
||||||
|
*
|
||||||
|
* @param string $string
|
||||||
|
* @param string $signature
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function verifySignature($string, $signature)
|
||||||
|
{
|
||||||
|
if(strlen($signature) !== 40)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$key = config('crypto.authentication_key');
|
||||||
|
$salt = substr($signature, 0, 8);
|
||||||
|
$hash = substr(base64_encode(hash_hmac('sha256', hash_hmac('sha256', $string, $salt), $key, true)), 0, 32);
|
||||||
|
return self::compareStrings(substr($signature, 8), strtr($hash, '+/', '-_'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a cryptographically secure random string.
|
* Generate a cryptographically secure random string.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -256,17 +256,17 @@ class Storage
|
||||||
flock($fp, \LOCK_EX);
|
flock($fp, \LOCK_EX);
|
||||||
if (is_resource($content))
|
if (is_resource($content))
|
||||||
{
|
{
|
||||||
$result = stream_copy_to_stream($content, $fp) ? true : false;
|
$result = stream_copy_to_stream($content, $fp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = fwrite($fp, $content) ? true : false;
|
$result = fwrite($fp, $content);
|
||||||
}
|
}
|
||||||
fflush($fp);
|
fflush($fp);
|
||||||
flock($fp, \LOCK_UN);
|
flock($fp, \LOCK_UN);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
if (!$result)
|
if ($result === false)
|
||||||
{
|
{
|
||||||
trigger_error('Cannot write file: ' . (isset($original_filename) ? $original_filename : $filename), \E_USER_WARNING);
|
trigger_error('Cannot write file: ' . (isset($original_filename) ? $original_filename : $filename), \E_USER_WARNING);
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -303,7 +303,7 @@ class Storage
|
||||||
}
|
}
|
||||||
|
|
||||||
clearstatcache(true, $filename);
|
clearstatcache(true, $filename);
|
||||||
return $result;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -294,12 +294,17 @@ jQuery(function($) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
re = /http:\/\/([^:\/]+)(:\d+|)/i;
|
re = /https?:\/\/([^:\/]+)(:\d+|)/i;
|
||||||
if (bUseSSL && re.test(uri)) {
|
if (bUseSSL && re.test(uri)) {
|
||||||
toReplace = 'https://'+RegExp.$1;
|
toReplace = 'https://'+RegExp.$1;
|
||||||
if (window.https_port && https_port != 443) toReplace += ':' + https_port;
|
if (window.https_port && https_port != 443) toReplace += ':' + https_port;
|
||||||
uri = uri.replace(re, toReplace);
|
uri = uri.replace(re, toReplace);
|
||||||
}
|
}
|
||||||
|
if (!bUseSSL && re.test(uri)) {
|
||||||
|
toReplace = 'http://'+RegExp.$1;
|
||||||
|
if (window.http_port && http_port != 80) toReplace += ':' + http_port;
|
||||||
|
uri = uri.replace(re, toReplace);
|
||||||
|
}
|
||||||
|
|
||||||
// insert index.php if it isn't included
|
// insert index.php if it isn't included
|
||||||
uri = uri.replace(/\/(index\.php)?\?/, '/index.php?');
|
uri = uri.replace(/\/(index\.php)?\?/, '/index.php?');
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,10 @@
|
||||||
// number
|
// number
|
||||||
var regNum = /^[0-9]*$/;
|
var regNum = /^[0-9]*$/;
|
||||||
this.cast('ADD_RULE', ['number', regNum]);
|
this.cast('ADD_RULE', ['number', regNum]);
|
||||||
|
|
||||||
|
// float
|
||||||
|
var regFloat = /^\d+(\.\d+)?$/;
|
||||||
|
this.cast('ADD_RULE', ['float', regFloat]);
|
||||||
// }}} add filters
|
// }}} add filters
|
||||||
},
|
},
|
||||||
// run validator
|
// run validator
|
||||||
|
|
|
||||||
|
|
@ -310,6 +310,7 @@ $lang->filter['invalid_alpha'] = 'The format of %s is invalid. Please enter Engl
|
||||||
$lang->filter['invalid_alpha_number'] = 'The format of %s is invalid. Please enter English alphabets and numbers only.';
|
$lang->filter['invalid_alpha_number'] = 'The format of %s is invalid. Please enter English alphabets and numbers only.';
|
||||||
$lang->filter['invalid_mid'] = 'The format of %s is invalid. Module ID should be begun with a letter. Subsequent characters may be letters, digits or underscore characters.';
|
$lang->filter['invalid_mid'] = 'The format of %s is invalid. Module ID should be begun with a letter. Subsequent characters may be letters, digits or underscore characters.';
|
||||||
$lang->filter['invalid_number'] = 'The format of %s is invalid. Please enter numbers only.';
|
$lang->filter['invalid_number'] = 'The format of %s is invalid. Please enter numbers only.';
|
||||||
|
$lang->filter['invalid_float'] = 'The format of %s is invalid. Please enter numbers only.';
|
||||||
$lang->filter['invalid_extension'] = 'The format of %s is invalid. e.g.) *.* or *.jpg;*.gif;.';
|
$lang->filter['invalid_extension'] = 'The format of %s is invalid. e.g.) *.* or *.jpg;*.gif;.';
|
||||||
$lang->security_warning_embed = 'Due to security concern, administrators are not allowed to view embedded items.<BR /> To view them, please use another non-administrator ID.';
|
$lang->security_warning_embed = 'Due to security concern, administrators are not allowed to view embedded items.<BR /> To view them, please use another non-administrator ID.';
|
||||||
$lang->msg_pc_to_mobile = 'View mobile optimized version of this page';
|
$lang->msg_pc_to_mobile = 'View mobile optimized version of this page';
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,7 @@ $lang->filter['invalid_alpha'] = '%sの形式が正しくありません。半
|
||||||
$lang->filter['invalid_alpha_number'] = '%sの形式が正しくありません。半角英数字で入力してください。';
|
$lang->filter['invalid_alpha_number'] = '%sの形式が正しくありません。半角英数字で入力してください。';
|
||||||
$lang->filter['invalid_mid'] = '%sの形式が正しくありません。 最初の文字は英文から始め、「英文+数字+_」組合せで入力が必要です。';
|
$lang->filter['invalid_mid'] = '%sの形式が正しくありません。 最初の文字は英文から始め、「英文+数字+_」組合せで入力が必要です。';
|
||||||
$lang->filter['invalid_number'] = '%sの形式が正しくありません。半角数字で入力してください。';
|
$lang->filter['invalid_number'] = '%sの形式が正しくありません。半角数字で入力してください。';
|
||||||
|
$lang->filter['invalid_float'] = '%sの形式が正しくありません。半角数字で入力してください。';
|
||||||
$lang->security_warning_embed = 'セキュリティ問題のため、管理者IDではembedを見ることができません。<br />他のIDでログインしてください。';
|
$lang->security_warning_embed = 'セキュリティ問題のため、管理者IDではembedを見ることができません。<br />他のIDでログインしてください。';
|
||||||
$lang->msg_pc_to_mobile = 'このページは、モバイル表示が可能です。モバイル表示へ移動しますか?';
|
$lang->msg_pc_to_mobile = 'このページは、モバイル表示が可能です。モバイル表示へ移動しますか?';
|
||||||
$lang->cmd_yes = 'はい';
|
$lang->cmd_yes = 'はい';
|
||||||
|
|
|
||||||
|
|
@ -310,6 +310,7 @@ $lang->filter['invalid_alpha'] = '%s의 형식이 잘못되었습니다. 영문
|
||||||
$lang->filter['invalid_alpha_number'] = '%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해야 합니다.';
|
$lang->filter['invalid_alpha_number'] = '%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해야 합니다.';
|
||||||
$lang->filter['invalid_mid'] = '%s의 형식이 잘못되었습니다. 첫 글자는 영문으로 시작해야 하며 \'영문+숫자+_\'로만 입력해야 합니다.';
|
$lang->filter['invalid_mid'] = '%s의 형식이 잘못되었습니다. 첫 글자는 영문으로 시작해야 하며 \'영문+숫자+_\'로만 입력해야 합니다.';
|
||||||
$lang->filter['invalid_number'] = '%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.';
|
$lang->filter['invalid_number'] = '%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.';
|
||||||
|
$lang->filter['invalid_float'] = '%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.';
|
||||||
$lang->filter['invalid_extension'] = '%s의 형식이 잘못되었습니다. *.* 나 *.jpg;*.gif; 처럼 입력해야 합니다.';
|
$lang->filter['invalid_extension'] = '%s의 형식이 잘못되었습니다. *.* 나 *.jpg;*.gif; 처럼 입력해야 합니다.';
|
||||||
$lang->security_invalid_session = '바르지 않은 접근입니다. 인증을 위해 다시 로그인해야 합니다.';
|
$lang->security_invalid_session = '바르지 않은 접근입니다. 인증을 위해 다시 로그인해야 합니다.';
|
||||||
$lang->security_warning_embed = '보안 문제로 관리자 아이디로는 embed를 볼 수 없습니다. 확인하려면 다른 아이디로 접속하세요';
|
$lang->security_warning_embed = '보안 문제로 관리자 아이디로는 embed를 볼 수 없습니다. 확인하려면 다른 아이디로 접속하세요';
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,7 @@ $lang->filter['invalid_alpha'] = '%s只能输入英文字母';
|
||||||
$lang->filter['invalid_alpha_number'] = '%s只能输入英文或数字';
|
$lang->filter['invalid_alpha_number'] = '%s只能输入英文或数字';
|
||||||
$lang->filter['invalid_mid'] = '%s 格式错误。 模块名称只能用英文、数字及下划线,开头必须是英文。';
|
$lang->filter['invalid_mid'] = '%s 格式错误。 模块名称只能用英文、数字及下划线,开头必须是英文。';
|
||||||
$lang->filter['invalid_number'] = '%s只能输入数字';
|
$lang->filter['invalid_number'] = '%s只能输入数字';
|
||||||
|
$lang->filter['invalid_float'] = '%s只能输入数字';
|
||||||
$lang->security_warning_embed = '由于安全问题,不允许用系统管理员ID操作embed对象,请使用其他拥有管理权限的ID操作。';
|
$lang->security_warning_embed = '由于安全问题,不允许用系统管理员ID操作embed对象,请使用其他拥有管理权限的ID操作。';
|
||||||
$lang->cmd_yes = '是';
|
$lang->cmd_yes = '是';
|
||||||
$lang->cmd_no = '否';
|
$lang->cmd_no = '否';
|
||||||
|
|
|
||||||
|
|
@ -276,6 +276,7 @@ $lang->filter['invalid_alpha'] = '%s只能輸入英文字母';
|
||||||
$lang->filter['invalid_alpha_number'] = '%s只能輸入英文或數字';
|
$lang->filter['invalid_alpha_number'] = '%s只能輸入英文或數字';
|
||||||
$lang->filter['invalid_mid'] = '%s 格式錯誤。 模組名稱只能使用英文、數字及底線,開頭必須是英文。';
|
$lang->filter['invalid_mid'] = '%s 格式錯誤。 模組名稱只能使用英文、數字及底線,開頭必須是英文。';
|
||||||
$lang->filter['invalid_number'] = '%s只能輸入數字';
|
$lang->filter['invalid_number'] = '%s只能輸入數字';
|
||||||
|
$lang->filter['invalid_float'] = '%s只能輸入數字';
|
||||||
$lang->security_warning_embed = '基於安全因素,管理員無法檢視嵌入的物件。<BR /> 請使用其他非管理員帳號檢視。';
|
$lang->security_warning_embed = '基於安全因素,管理員無法檢視嵌入的物件。<BR /> 請使用其他非管理員帳號檢視。';
|
||||||
$lang->msg_pc_to_mobile = '此頁面有手機頁面,要移至手機頁面嗎?';
|
$lang->msg_pc_to_mobile = '此頁面有手機頁面,要移至手機頁面嗎?';
|
||||||
$lang->cmd_yes = '是';
|
$lang->cmd_yes = '是';
|
||||||
|
|
|
||||||
|
|
@ -177,26 +177,27 @@ class boardController extends board
|
||||||
{
|
{
|
||||||
$oModuleModel = getModel('module');
|
$oModuleModel = getModel('module');
|
||||||
$member_config = $oModuleModel->getModuleConfig('member');
|
$member_config = $oModuleModel->getModuleConfig('member');
|
||||||
$is_logged = Context::get('is_logged');
|
|
||||||
|
|
||||||
if(!$is_logged && !$member_config->webmaster_email)
|
if($member_config->webmaster_email)
|
||||||
{
|
{
|
||||||
$obj->email_address = $this->module_info->admin_mail;
|
$mail_title = sprintf(lang('msg_document_notify_mail'), $this->module_info->browser_title, cut_str($obj->title, 20, '...'));
|
||||||
|
|
||||||
|
$oMail = new Mail();
|
||||||
|
$oMail->setTitle($mail_title);
|
||||||
|
$oMail->setContent( sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getFullUrl('','document_srl',$obj->document_srl), getFullUrl('','document_srl',$obj->document_srl), $obj->content));
|
||||||
|
$oMail->setSender($member_config->webmaster_name ?: null, $member_config->webmaster_email);
|
||||||
|
|
||||||
|
$target_mail = explode(',',$this->module_info->admin_mail);
|
||||||
|
for($i=0;$i<count($target_mail);$i++)
|
||||||
|
{
|
||||||
|
$email_address = trim($target_mail[$i]);
|
||||||
|
if(!$email_address) continue;
|
||||||
|
$oMail->setReceiptor($email_address, $email_address);
|
||||||
|
$oMail->send();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oMail = new Mail();
|
|
||||||
$oMail->setTitle($obj->title);
|
|
||||||
$oMail->setContent( sprintf("From : <a href=\"%s\">%s</a><br/>\r\n%s", getFullUrl('','document_srl',$obj->document_srl), getFullUrl('','document_srl',$obj->document_srl), $obj->content));
|
|
||||||
$oMail->setSender($obj->user_name ?: null, $obj->email_address ? $obj->email_address : $member_config->webmaster_email);
|
|
||||||
|
|
||||||
$target_mail = explode(',',$this->module_info->admin_mail);
|
|
||||||
for($i=0;$i<count($target_mail);$i++)
|
|
||||||
{
|
|
||||||
$email_address = trim($target_mail[$i]);
|
|
||||||
if(!$email_address) continue;
|
|
||||||
$oMail->setReceiptor($email_address, $email_address);
|
|
||||||
$oMail->send();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class boardMobile extends boardView
|
||||||
* check the consultation function, if the user is admin then swich off consultation function
|
* check the consultation function, if the user is admin then swich off consultation function
|
||||||
* if the user is not logged, then disppear write document/write comment./ view document
|
* if the user is not logged, then disppear write document/write comment./ view document
|
||||||
**/
|
**/
|
||||||
if($this->module_info->consultation == 'Y' && !$this->grant->manager)
|
if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)
|
||||||
{
|
{
|
||||||
$this->consultation = true;
|
$this->consultation = true;
|
||||||
if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
|
if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ class boardView extends board
|
||||||
* check the consultation function, if the user is admin then swich off consultation function
|
* check the consultation function, if the user is admin then swich off consultation function
|
||||||
* if the user is not logged, then disppear write document/write comment./ view document
|
* if the user is not logged, then disppear write document/write comment./ view document
|
||||||
**/
|
**/
|
||||||
if($this->module_info->consultation == 'Y' && !$this->grant->manager)
|
if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)
|
||||||
{
|
{
|
||||||
$this->consultation = TRUE;
|
$this->consultation = TRUE;
|
||||||
if(!Context::get('is_logged'))
|
if(!Context::get('is_logged'))
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,11 @@
|
||||||
<title xml:lang="zh-TW">發表評論</title>
|
<title xml:lang="zh-TW">發表評論</title>
|
||||||
<title xml:lang="es">yorum yaz</title>
|
<title xml:lang="es">yorum yaz</title>
|
||||||
</grant>
|
</grant>
|
||||||
|
<grant name="consultation_read" default="manager">
|
||||||
|
<title xml:lang="ko">상담글 조회</title>
|
||||||
|
<title xml:lang="en">Consultation Document Read</title>
|
||||||
|
<title xml:lang="jp">相談文照会</title>
|
||||||
|
</grant>
|
||||||
</grants>
|
</grants>
|
||||||
<permissions>
|
<permissions>
|
||||||
<permission action="dispBoardAdminInsertBoard" target="manager" />
|
<permission action="dispBoardAdminInsertBoard" target="manager" />
|
||||||
|
|
|
||||||
|
|
@ -48,3 +48,4 @@ $lang->cmd_only_p_comment = 'Only if there are replies';
|
||||||
$lang->cmd_all_comment_message = 'Always';
|
$lang->cmd_all_comment_message = 'Always';
|
||||||
$lang->cmd_do_not_message = 'Never';
|
$lang->cmd_do_not_message = 'Never';
|
||||||
$lang->delete_placeholder = 'Delete Placeholder';
|
$lang->delete_placeholder = 'Delete Placeholder';
|
||||||
|
$lang->msg_document_notify_mail = '[%s] The new post : %s';
|
||||||
|
|
|
||||||
|
|
@ -77,3 +77,4 @@ $lang->cmd_only_p_comment = '대댓글이 있는 경우에만 남김';
|
||||||
$lang->cmd_all_comment_message = '모든 댓글에 남김';
|
$lang->cmd_all_comment_message = '모든 댓글에 남김';
|
||||||
$lang->cmd_do_not_message = '남기지 않음';
|
$lang->cmd_do_not_message = '남기지 않음';
|
||||||
$lang->delete_placeholder = '완전 삭제';
|
$lang->delete_placeholder = '완전 삭제';
|
||||||
|
$lang->msg_document_notify_mail = '[%s] 새로운 게시글이 등록되었습니다 : %s';
|
||||||
|
|
|
||||||
|
|
@ -642,12 +642,17 @@ class commentController extends comment
|
||||||
{
|
{
|
||||||
$oMail = new Mail();
|
$oMail = new Mail();
|
||||||
|
|
||||||
if($is_logged)
|
// 메일 발신자 조작으로 취급하여 스팸으로 직행할 수 있기때문에 회원설정에서 입력된 웹마스터 메일주소를 이용하도록 함
|
||||||
|
$member_config = $oMemberModel->getMemberConfig();
|
||||||
|
$admin_email_adress = $member_config->webmaster_email;
|
||||||
|
// 관리자 메일을 입력하지 않으면 메일을 보내지 않음.
|
||||||
|
if(!$admin_email_adress)
|
||||||
{
|
{
|
||||||
$oMail->setSender($obj->email_address, $obj->email_address);
|
return;
|
||||||
}
|
}
|
||||||
|
// 매일 보내는 이를 관리자 계정으로 설정한다.
|
||||||
$mail_title = "[Rhymix - " . Context::get('mid') . "] A new comment was posted on document: \"" . $oDocument->getTitleText() . "\"";
|
$oMail->setSender($member_config->webmaster_name, $member_config->webmaster_email);
|
||||||
|
$mail_title = sprintf(lang('msg_comment_notify_mail'), Context::get('mid'), cut_str($oDocument->getTitleText(), 20, '...'));
|
||||||
$oMail->setTitle($mail_title);
|
$oMail->setTitle($mail_title);
|
||||||
$url_comment = getFullUrl('','document_srl',$obj->document_srl).'#comment_'.$obj->comment_srl;
|
$url_comment = getFullUrl('','document_srl',$obj->document_srl).'#comment_'.$obj->comment_srl;
|
||||||
if($using_validation)
|
if($using_validation)
|
||||||
|
|
@ -710,7 +715,6 @@ class commentController extends comment
|
||||||
// get all admins emails
|
// get all admins emails
|
||||||
$admins_emails = $module_info->admin_mail;
|
$admins_emails = $module_info->admin_mail;
|
||||||
$target_mail = explode(',', $admins_emails);
|
$target_mail = explode(',', $admins_emails);
|
||||||
|
|
||||||
// send email to all admins - START
|
// send email to all admins - START
|
||||||
for($i = 0; $i < count($target_mail); $i++)
|
for($i = 0; $i < count($target_mail); $i++)
|
||||||
{
|
{
|
||||||
|
|
@ -719,10 +723,6 @@ class commentController extends comment
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!$is_logged)
|
|
||||||
{
|
|
||||||
$oMail->setSender($email_address, $email_address);
|
|
||||||
}
|
|
||||||
$oMail->setReceiptor($email_address, $email_address);
|
$oMail->setReceiptor($email_address, $email_address);
|
||||||
$oMail->send();
|
$oMail->send();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,3 +49,4 @@ $lang->improper_comment_reasons['others'] = 'Others (Write your own)';
|
||||||
$lang->about_improper_comment_declare = 'Write here why you report this comment as an improper thing.';
|
$lang->about_improper_comment_declare = 'Write here why you report this comment as an improper thing.';
|
||||||
$lang->msg_deleted_comment = 'This comment has been deleted.';
|
$lang->msg_deleted_comment = 'This comment has been deleted.';
|
||||||
$lang->msg_admin_deleted_comment = 'This comment has been deleted by an administrator.';
|
$lang->msg_admin_deleted_comment = 'This comment has been deleted by an administrator.';
|
||||||
|
$lang->msg_comment_notify_mail = "[%s] A new comment was posted on document: \" %s \"";
|
||||||
|
|
|
||||||
|
|
@ -53,3 +53,4 @@ $lang->improper_comment_reasons['others'] = '기타(직접작성)';
|
||||||
$lang->about_improper_comment_declare = '댓글을 신고하신 이유를 간단히 적어서 제출해주시면 관리자 검토 후 조치하겠습니다.';
|
$lang->about_improper_comment_declare = '댓글을 신고하신 이유를 간단히 적어서 제출해주시면 관리자 검토 후 조치하겠습니다.';
|
||||||
$lang->msg_deleted_comment = '삭제된 댓글입니다.';
|
$lang->msg_deleted_comment = '삭제된 댓글입니다.';
|
||||||
$lang->msg_admin_deleted_comment = '관리자가 삭제한 댓글입니다.';
|
$lang->msg_admin_deleted_comment = '관리자가 삭제한 댓글입니다.';
|
||||||
|
$lang->msg_comment_notify_mail = '[%s] 새로운 댓글이 등록되었습니다 : %s';
|
||||||
|
|
|
||||||
|
|
@ -164,10 +164,14 @@ class editorAdminController extends editor
|
||||||
$config->font_defined = $configVars->font_defined = 'N';
|
$config->font_defined = $configVars->font_defined = 'N';
|
||||||
$config->content_font = $configVars->content_font;
|
$config->content_font = $configVars->content_font;
|
||||||
}
|
}
|
||||||
$config->content_font_size = intval($configVars->content_font_size) . 'px';
|
$config->content_font_size = trim($configVars->content_font_size);
|
||||||
$config->content_line_height = intval($configVars->content_line_height) . '%';
|
$config->content_font_size = ctype_digit($config->content_font_size) ? ($config->content_font_size . 'px') : $config->content_font_size;
|
||||||
$config->content_paragraph_spacing = intval($configVars->content_paragraph_spacing) . 'px';
|
$config->content_line_height = trim($configVars->content_line_height);
|
||||||
|
$config->content_line_height = ctype_digit($config->content_line_height) ? ($config->content_line_height . '%') : $config->content_line_height;
|
||||||
|
$config->content_paragraph_spacing = trim($configVars->content_paragraph_spacing);
|
||||||
|
$config->content_paragraph_spacing = ctype_digit($config->content_paragraph_spacing) ? ($config->content_paragraph_spacing . '%') : $config->content_paragraph_spacing;
|
||||||
$config->content_word_break = $configVars->content_word_break;
|
$config->content_word_break = $configVars->content_word_break;
|
||||||
|
$config->content_word_break = in_array($config->content_word_break, array('normal', 'keep-all', 'break-all', 'none')) ? $config->content_word_break : 'normal';
|
||||||
|
|
||||||
$oModuleController->insertModuleConfig('editor', $config);
|
$oModuleController->insertModuleConfig('editor', $config);
|
||||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ $lang->word_break_normal = 'Wrap Asian scripts at character boundary and Latin s
|
||||||
$lang->word_break_keep_all = 'Wrap at word boundary';
|
$lang->word_break_keep_all = 'Wrap at word boundary';
|
||||||
$lang->word_break_break_all = 'Wrap at character boundary';
|
$lang->word_break_break_all = 'Wrap at character boundary';
|
||||||
$lang->word_break_none = 'Do not wrap long lines';
|
$lang->word_break_none = 'Do not wrap long lines';
|
||||||
|
$lang->about_unit_default_px = 'The unit is px unless otherwise specified.';
|
||||||
|
$lang->about_unit_default_percent = 'The unit is % unless otherwise specified.';
|
||||||
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
||||||
いろはにほへと / ちりぬるを / わかよたれそ / つねならむ / うゐのおくやま / けふこえて / あさきゆめみし / ゑひもせす
|
いろはにほへと / ちりぬるを / わかよたれそ / つねならむ / うゐのおくやま / けふこえて / あさきゆめみし / ゑひもせす
|
||||||
키스의 고유 조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.';
|
키스의 고유 조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.';
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ $lang->word_break_normal = '한글은 글자 단위로 줄바꿈, 영문은 단
|
||||||
$lang->word_break_keep_all = '모든 언어를 단어 단위로 줄바꿈';
|
$lang->word_break_keep_all = '모든 언어를 단어 단위로 줄바꿈';
|
||||||
$lang->word_break_break_all = '모든 언어를 글자 단위로 줄바꿈';
|
$lang->word_break_break_all = '모든 언어를 글자 단위로 줄바꿈';
|
||||||
$lang->word_break_none = '줄을 바꾸지 않음';
|
$lang->word_break_none = '줄을 바꾸지 않음';
|
||||||
|
$lang->about_unit_default_px = '단위를 지정하지 않을 경우 px 단위를 사용합니다.';
|
||||||
|
$lang->about_unit_default_percent = '단위를 지정하지 않을 경우 % 단위를 사용합니다.';
|
||||||
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
$lang->font_preview = 'The quick brown fox jumps over the lazy dog.
|
||||||
いろはにほへと / ちりぬるを / わかよたれそ / つねならむ / うゐのおくやま / けふこえて / あさきゆめみし / ゑひもせす
|
いろはにほへと / ちりぬるを / わかよたれそ / つねならむ / うゐのおくやま / けふこえて / あさきゆめみし / ゑひもせす
|
||||||
키스의 고유 조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.';
|
키스의 고유 조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다.';
|
||||||
|
|
|
||||||
|
|
@ -116,19 +116,22 @@
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label class="x_control-label" for="font_size">{$lang->guide_choose_font_size_body}</label>
|
<label class="x_control-label" for="font_size">{$lang->guide_choose_font_size_body}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" id="font_size" name="content_font_size" value="{intval($editor_config->content_font_size) ?: 13}" /> px
|
<input type="text" id="font_size" name="content_font_size" value="{$editor_config->content_font_size ?: 13}" />
|
||||||
|
<p class="x_help-block">{$lang->about_unit_default_px}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label class="x_control-label" for="line_height">{$lang->guide_choose_line_height}</label>
|
<label class="x_control-label" for="line_height">{$lang->guide_choose_line_height}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" id="line_height" name="content_line_height" value="{intval($editor_config->content_line_height) ?: 160}" /> %
|
<input type="text" id="line_height" name="content_line_height" value="{$editor_config->content_line_height ?: 160}" />
|
||||||
|
<p class="x_help-block">{$lang->about_unit_default_percent}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label class="x_control-label" for="paragraph_spacing">{$lang->guide_choose_paragraph_spacing}</label>
|
<label class="x_control-label" for="paragraph_spacing">{$lang->guide_choose_paragraph_spacing}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" id="paragraph_spacing" name="content_paragraph_spacing" value="{intval($editor_config->content_paragraph_spacing) ?: 0}" /> px
|
<input type="text" id="paragraph_spacing" name="content_paragraph_spacing" value="{$editor_config->content_paragraph_spacing ?: 0}" />
|
||||||
|
<p class="x_help-block">{$lang->about_unit_default_px}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,16 @@ class fileModel extends file
|
||||||
if(!$config->allow_outlink) $config->allow_outlink = 'Y';
|
if(!$config->allow_outlink) $config->allow_outlink = 'Y';
|
||||||
if(!$config->download_grant) $config->download_grant = array();
|
if(!$config->download_grant) $config->download_grant = array();
|
||||||
|
|
||||||
|
$size = preg_replace('/[a-z]/is', '', ini_get('upload_max_filesize'));
|
||||||
|
if($config->allowed_filesize > $size)
|
||||||
|
{
|
||||||
|
$config->allowed_filesize = $size;
|
||||||
|
}
|
||||||
|
if($config->allowed_attach_size > $size)
|
||||||
|
{
|
||||||
|
$config->allowed_attach_size = $size;
|
||||||
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
<rule name="extension" type="regex" test="/^(?:\*\.\*|(\*\.\w+;\s*)*\*\.\w+;?)$/i" />
|
<rule name="extension" type="regex" test="/^(?:\*\.\*|(\*\.\w+;\s*)*\*\.\w+;?)$/i" />
|
||||||
</customrules>
|
</customrules>
|
||||||
<fields>
|
<fields>
|
||||||
<field name="allowed_filesize" required="true" rule="number" default="2" />
|
<field name="allowed_filesize" required="true" rule="float" default="2" />
|
||||||
<field name="allowed_attach_size" required="true" rule="number" default="2" />
|
<field name="allowed_attach_size" required="true" rule="float" default="2" />
|
||||||
<field name="allowed_filetypes" required="true" rule="extension" />
|
<field name="allowed_filetypes" required="true" rule="extension" />
|
||||||
</fields>
|
</fields>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
<rule name="extension" type="regex" test="/^(?:\*\.\*|(\*\.\w+;\s*)*\*\.\w+;?)$/i" />
|
<rule name="extension" type="regex" test="/^(?:\*\.\*|(\*\.\w+;\s*)*\*\.\w+;?)$/i" />
|
||||||
</customrules>
|
</customrules>
|
||||||
<fields>
|
<fields>
|
||||||
<field name="allowed_filesize" required="true" rule="number" default="2" />
|
<field name="allowed_filesize" required="true" rule="float" default="2" />
|
||||||
<field name="allowed_attach_size" required="true" rule="number" default="2" />
|
<field name="allowed_attach_size" required="true" rule="float" default="2" />
|
||||||
<field name="allowed_filetypes" required="true" rule="extension" />
|
<field name="allowed_filetypes" required="true" rule="extension" />
|
||||||
</fields>
|
</fields>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,13 @@
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label for="filesize" class="x_control-label">{$lang->allowed_filesize} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_file_size" target="_blank">{$lang->help}</a></label>
|
<label for="filesize" class="x_control-label">{$lang->allowed_filesize} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_file_size" target="_blank">{$lang->help}</a></label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" id="filesize" name="allowed_filesize" value="{$config->allowed_filesize}" /> MB/{$upload_max_filesize}
|
<input type="number" step="any" id="filesize" name="allowed_filesize" value="{$config->allowed_filesize}" /> MB / {$upload_max_filesize}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label for="attachSize" class="x_control-label">{$lang->allowed_attach_size} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_file_document_attach_limit" target="_blank">{$lang->help}</a></label>
|
<label for="attachSize" class="x_control-label">{$lang->allowed_attach_size} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_file_document_attach_limit" target="_blank">{$lang->help}</a></label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" id="attachSize" name="allowed_attach_size" value="{$config->allowed_attach_size}" /> MB
|
<input type="number" step="any" id="attachSize" name="allowed_attach_size" value="{$config->allowed_attach_size}" /> MB
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ class installController extends install
|
||||||
return new Object(-1, 'msg_already_installed');
|
return new Object(-1, 'msg_already_installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db_tmp_config_file = _XE_PATH_.'files/config/tmpDB.config.php';
|
// Increase time limit.
|
||||||
$this->etc_tmp_config_file = _XE_PATH_.'files/config/tmpEtc.config.php';
|
@set_time_limit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ $lang->cmd_view_scrapped_document = '스크랩 보기';
|
||||||
$lang->cmd_view_saved_document = '저장함 보기';
|
$lang->cmd_view_saved_document = '저장함 보기';
|
||||||
$lang->cmd_send_email = '메일 보내기';
|
$lang->cmd_send_email = '메일 보내기';
|
||||||
$lang->cmd_modify_nickname_log = '닉네임 변경 기록';
|
$lang->cmd_modify_nickname_log = '닉네임 변경 기록';
|
||||||
|
$lang->cmd_member_file_upload = '서명에 파일 첨부 사용';
|
||||||
$lang->msg_email_not_exists = '이메일 주소가 존재하지 않습니다.';
|
$lang->msg_email_not_exists = '이메일 주소가 존재하지 않습니다.';
|
||||||
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다.';
|
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다.';
|
||||||
$lang->msg_cart_is_null = '대상을 선택해주세요.';
|
$lang->msg_cart_is_null = '대상을 선택해주세요.';
|
||||||
|
|
@ -164,6 +165,7 @@ $lang->msg_admin_ip_not_allowed = '접속하신 IP 주소에서는 관리자 로
|
||||||
$lang->about_rechecked_password = '회원의 정보를 안전하게 보호하기 위해 비밀번호를 다시 한번 확인 합니다.';
|
$lang->about_rechecked_password = '회원의 정보를 안전하게 보호하기 위해 비밀번호를 다시 한번 확인 합니다.';
|
||||||
$lang->about_user_id = '회원 ID는 3~20자 사이의 영문+숫자로 이루어져야 하며 영문으로 시작해야 합니다.';
|
$lang->about_user_id = '회원 ID는 3~20자 사이의 영문+숫자로 이루어져야 하며 영문으로 시작해야 합니다.';
|
||||||
$lang->about_password = '비밀번호는 6~20자로 되어야 합니다.';
|
$lang->about_password = '비밀번호는 6~20자로 되어야 합니다.';
|
||||||
|
$lang->about_member_file_upload = '회원정보의 서명에 파일을 첨부할 수 있도록 합니다.';
|
||||||
$lang->cmd_config_password_strength = '비밀번호 보안수준';
|
$lang->cmd_config_password_strength = '비밀번호 보안수준';
|
||||||
$lang->cmd_password_hashing_algorithm = '비밀번호 암호화 알고리듬';
|
$lang->cmd_password_hashing_algorithm = '비밀번호 암호화 알고리듬';
|
||||||
$lang->cmd_password_hashing_work_factor = '비밀번호 암호화 소요시간';
|
$lang->cmd_password_hashing_work_factor = '비밀번호 암호화 소요시간';
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@ $lang->about_member_default = '將成為註冊會員時的預設群組。';
|
||||||
$lang->about_find_member_account = '帳號/密碼將發送到您註冊時,所輸入的電子郵件當中。輸入註冊時的電子郵件地址後,請按「查詢帳號/密碼」按鈕。<br />';
|
$lang->about_find_member_account = '帳號/密碼將發送到您註冊時,所輸入的電子郵件當中。輸入註冊時的電子郵件地址後,請按「查詢帳號/密碼」按鈕。<br />';
|
||||||
$lang->about_temp_password = '已發送臨時密碼。<br />請登入後修改密碼。<br />';
|
$lang->about_temp_password = '已發送臨時密碼。<br />請登入後修改密碼。<br />';
|
||||||
$lang->about_ssl_port = '請輸入想要使用 SSL 預設埠口以外的埠口。';
|
$lang->about_ssl_port = '請輸入想要使用 SSL 預設埠口以外的埠口。';
|
||||||
|
$lang->about_reset_auth_mail = '目前註冊的電子郵件地址為 %s 。如果你想改變你的e-mail>地址,你可以註冊更新,新的E-mail地址認證信息後重新發送郵件';
|
||||||
$lang->about_resend_auth_mail = '如果沒有收到認證郵件可以再重寄一次。';
|
$lang->about_resend_auth_mail = '如果沒有收到認證郵件可以再重寄一次。';
|
||||||
$lang->no_article = '主題不存在';
|
$lang->no_article = '主題不存在';
|
||||||
$lang->find_account_question = '密碼提示問答';
|
$lang->find_account_question = '密碼提示問答';
|
||||||
|
|
|
||||||
|
|
@ -173,7 +173,8 @@ class memberAdminController extends member
|
||||||
'password_hashing_algorithm',
|
'password_hashing_algorithm',
|
||||||
'password_hashing_work_factor',
|
'password_hashing_work_factor',
|
||||||
'password_hashing_auto_upgrade',
|
'password_hashing_auto_upgrade',
|
||||||
'update_nickname_log'
|
'update_nickname_log',
|
||||||
|
'member_allow_fileupload'
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!array_key_exists($args->password_hashing_algorithm, Rhymix\Framework\Password::getSupportedAlgorithms()))
|
if(!array_key_exists($args->password_hashing_algorithm, Rhymix\Framework\Password::getSupportedAlgorithms()))
|
||||||
|
|
@ -1172,6 +1173,14 @@ class memberAdminController extends member
|
||||||
function insertGroup($args)
|
function insertGroup($args)
|
||||||
{
|
{
|
||||||
if(!$args->site_srl) $args->site_srl = 0;
|
if(!$args->site_srl) $args->site_srl = 0;
|
||||||
|
|
||||||
|
// Call trigger (before)
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('member.insertGroup', 'before', $args);
|
||||||
|
if(!$trigger_output->toBool())
|
||||||
|
{
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
|
||||||
// Check the value of is_default.
|
// Check the value of is_default.
|
||||||
if($args->is_default != 'Y')
|
if($args->is_default != 'Y')
|
||||||
{
|
{
|
||||||
|
|
@ -1193,6 +1202,9 @@ class memberAdminController extends member
|
||||||
$output = executeQuery('member.insertGroup', $args);
|
$output = executeQuery('member.insertGroup', $args);
|
||||||
$this->_deleteMemberGroupCache($args->site_srl);
|
$this->_deleteMemberGroupCache($args->site_srl);
|
||||||
|
|
||||||
|
// Call trigger (after)
|
||||||
|
ModuleHandler::triggerCall('member.insertGroup', 'after', $args);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1204,8 +1216,16 @@ class memberAdminController extends member
|
||||||
function updateGroup($args)
|
function updateGroup($args)
|
||||||
{
|
{
|
||||||
if(!$args->site_srl) $args->site_srl = 0;
|
if(!$args->site_srl) $args->site_srl = 0;
|
||||||
// Check the value of is_default.
|
|
||||||
if(!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
|
if(!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
|
||||||
|
|
||||||
|
// Call trigger (before)
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('member.updateGroup', 'before', $args);
|
||||||
|
if(!$trigger_output->toBool())
|
||||||
|
{
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check the value of is_default.
|
||||||
if($args->is_default!='Y')
|
if($args->is_default!='Y')
|
||||||
{
|
{
|
||||||
$args->is_default = 'N';
|
$args->is_default = 'N';
|
||||||
|
|
@ -1218,6 +1238,10 @@ class memberAdminController extends member
|
||||||
|
|
||||||
$output = executeQuery('member.updateGroup', $args);
|
$output = executeQuery('member.updateGroup', $args);
|
||||||
$this->_deleteMemberGroupCache($args->site_srl);
|
$this->_deleteMemberGroupCache($args->site_srl);
|
||||||
|
|
||||||
|
// Call trigger (after)
|
||||||
|
ModuleHandler::triggerCall('member.updateGroup', 'after', $args);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1239,6 +1263,13 @@ class memberAdminController extends member
|
||||||
if(!$group_info) return new Object(-1, 'lang->msg_not_founded');
|
if(!$group_info) return new Object(-1, 'lang->msg_not_founded');
|
||||||
if($group_info->is_default == 'Y') return new Object(-1, 'msg_not_delete_default');
|
if($group_info->is_default == 'Y') return new Object(-1, 'msg_not_delete_default');
|
||||||
|
|
||||||
|
// Call trigger (before)
|
||||||
|
$trigger_output = ModuleHandler::triggerCall('member.deleteGroup', 'before', $group_info);
|
||||||
|
if(!$trigger_output->toBool())
|
||||||
|
{
|
||||||
|
return $trigger_output;
|
||||||
|
}
|
||||||
|
|
||||||
// Get groups where is_default == 'Y'
|
// Get groups where is_default == 'Y'
|
||||||
$columnList = array('site_srl', 'group_srl');
|
$columnList = array('site_srl', 'group_srl');
|
||||||
$default_group = $oMemberModel->getDefaultGroup($site_srl, $columnList);
|
$default_group = $oMemberModel->getDefaultGroup($site_srl, $columnList);
|
||||||
|
|
@ -1251,6 +1282,14 @@ class memberAdminController extends member
|
||||||
$args->group_srl = $group_srl;
|
$args->group_srl = $group_srl;
|
||||||
$output = executeQuery('member.deleteGroup', $args);
|
$output = executeQuery('member.deleteGroup', $args);
|
||||||
$this->_deleteMemberGroupCache($site_srl);
|
$this->_deleteMemberGroupCache($site_srl);
|
||||||
|
if (!$output->toBool())
|
||||||
|
{
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call trigger (after)
|
||||||
|
ModuleHandler::triggerCall('member.deleteGroup', 'after', $group_info);
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ class memberModel extends member
|
||||||
|
|
||||||
if(!$config->signature_editor_skin || $config->signature_editor_skin == 'default') $config->signature_editor_skin = 'ckeditor';
|
if(!$config->signature_editor_skin || $config->signature_editor_skin == 'default') $config->signature_editor_skin = 'ckeditor';
|
||||||
if(!$config->sel_editor_colorset) $config->sel_editor_colorset = 'moono';
|
if(!$config->sel_editor_colorset) $config->sel_editor_colorset = 'moono';
|
||||||
|
if(!$config->member_allow_fileupload) $config->member_allow_fileupload = 'N';
|
||||||
|
|
||||||
if($config->redirect_mid)
|
if($config->redirect_mid)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,14 @@ class memberView extends member
|
||||||
$option = new stdClass();
|
$option = new stdClass();
|
||||||
$option->primary_key_name = 'member_srl';
|
$option->primary_key_name = 'member_srl';
|
||||||
$option->content_key_name = 'signature';
|
$option->content_key_name = 'signature';
|
||||||
$option->allow_fileupload = false;
|
if($member_config->member_allow_fileupload === 'Y')
|
||||||
|
{
|
||||||
|
$option->allow_fileupload = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$option->allow_fileupload = false;
|
||||||
|
}
|
||||||
$option->enable_autosave = false;
|
$option->enable_autosave = false;
|
||||||
$option->enable_default_component = true;
|
$option->enable_default_component = true;
|
||||||
$option->enable_component = false;
|
$option->enable_component = false;
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,14 @@
|
||||||
<p class="x_help-inline">{$lang->about_member_sync}</p>
|
<p class="x_help-inline">{$lang->about_member_sync}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="x_control-group">
|
||||||
|
<label class="x_control-label">{$lang->cmd_member_file_upload}</label>
|
||||||
|
<div class="x_controls">
|
||||||
|
<label for="member_allow_fileupload_y" class="x_inline"><input type="radio" name="member_allow_fileupload" id="member_allow_fileupload_y" value="Y" checked="checked"|cond="$config->member_allow_fileupload == 'Y'" /> {$lang->cmd_yes}</label>
|
||||||
|
<label for="member_allow_fileupload_n" class="x_inline"><input type="radio" name="member_allow_fileupload" id="member_allow_fileupload_n" value="N" checked="checked"|cond="$config->member_allow_fileupload != 'Y'" /> {$lang->cmd_no}</label>
|
||||||
|
<p class="x_help-block">{$lang->about_member_file_upload}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="btnArea x_clearfix">
|
<div class="btnArea x_clearfix">
|
||||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -124,12 +124,19 @@ class ncenterlite extends ModuleObject
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_notify'))
|
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_target_member_srl'))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_target_member_srl'))
|
// Composite index to speed up getNotifyList
|
||||||
|
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_member_srl_and_readed'))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PK duplicate
|
||||||
|
if($oDB->isIndexExists('ncenterlite_notify', 'idx_notify'))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -202,16 +209,23 @@ class ncenterlite extends ModuleObject
|
||||||
$oDB->addIndex('ncenterlite_notify', 'idx_target_p_srl', array('target_p_srl'));
|
$oDB->addIndex('ncenterlite_notify', 'idx_target_p_srl', array('target_p_srl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_notify'))
|
|
||||||
{
|
|
||||||
$oDB->addIndex('ncenterlite_notify', 'idx_notify', array('notify'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_target_member_srl'))
|
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_target_member_srl'))
|
||||||
{
|
{
|
||||||
$oDB->addIndex('ncenterlite_notify', 'idx_target_member_srl', array('target_member_srl'));
|
$oDB->addIndex('ncenterlite_notify', 'idx_target_member_srl', array('target_member_srl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Composite index to speed up getNotifyList
|
||||||
|
if(!$oDB->isIndexExists('ncenterlite_notify', 'idx_member_srl_and_readed'))
|
||||||
|
{
|
||||||
|
$oDB->addIndex('ncenterlite_notify', 'idx_member_srl_and_readed', array('member_srl', 'readed'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// PK duplicate
|
||||||
|
if($oDB->isIndexExists('ncenterlite_notify', 'idx_notify'))
|
||||||
|
{
|
||||||
|
$oDB->dropIndex('ncenterlite_notify', 'idx_notify');
|
||||||
|
}
|
||||||
|
|
||||||
return new Object(0, 'success_updated');
|
return new Object(0, 'success_updated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -993,7 +993,17 @@ class ncenterliteController extends ncenterlite
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 노티 ID가 없는 경우 자동 생성
|
||||||
|
if (!$args->notify)
|
||||||
|
{
|
||||||
|
$args->notify = $this->_getNotifyId($args);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 날짜가 없는 경우 자동 생성
|
||||||
|
if (!$args->regdate)
|
||||||
|
{
|
||||||
|
$args->regdate = date('YmdHis');
|
||||||
|
}
|
||||||
|
|
||||||
if($anonymous == TRUE)
|
if($anonymous == TRUE)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,26 @@ class ncenterliteModel extends ncenterlite
|
||||||
$type = $lang->ncenterlite_type_test;
|
$type = $lang->ncenterlite_type_test;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Custom string.
|
||||||
|
case 'X':
|
||||||
|
return $notification->target_body;
|
||||||
|
|
||||||
|
// Custom language.
|
||||||
|
case 'Y':
|
||||||
|
return $lang->{$notification->target_body};
|
||||||
|
|
||||||
|
// Custom language with string interpolation.
|
||||||
|
case 'Z':
|
||||||
|
return vsprintf($lang->{$notification->target_body}, array(
|
||||||
|
$notification->target_member_srl, // %1$d
|
||||||
|
$notification->target_nick_name, // %2$s
|
||||||
|
$notification->target_user_id, // %3$s
|
||||||
|
$notification->target_email_address, // %4$s
|
||||||
|
$notification->target_browser, // %5$s
|
||||||
|
$notification->target_summary, // %6$s
|
||||||
|
$notification->target_url, // %7$s
|
||||||
|
));
|
||||||
|
|
||||||
// Other.
|
// Other.
|
||||||
case 'U':
|
case 'U':
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
<table name="ncenterlite_notify">
|
<table name="ncenterlite_notify">
|
||||||
<column name="notify" type="char" size="32" notnull="notnull" primary_key="primary_key" index="idx_notify" breif="메시지 ID" />
|
<column name="notify" type="char" size="32" notnull="notnull" primary_key="primary_key" brief="메시지 ID" />
|
||||||
|
|
||||||
<column name="srl" type="number" size="11" notnull="notnull" index="idx_srl" breif="이벤트 대상의 상위 srl" />
|
<column name="srl" type="number" size="11" notnull="notnull" index="idx_srl" brief="이벤트 대상의 상위 srl" />
|
||||||
<column name="target_srl" type="number" size="11" notnull="notnull" index="idx_target_srl" breif="이벤트 대상 srl(문서/댓글)" />
|
<column name="target_srl" type="number" size="11" notnull="notnull" index="idx_target_srl" brief="이벤트 대상 srl(문서/댓글)" />
|
||||||
<column name="target_p_srl" type="number" size="11" notnull="notnull" index="idx_target_p_srl" breif="이벤트 대상 srl(문서/댓글) 대댓글의 경우 앞전 댓글" />
|
<column name="target_p_srl" type="number" size="11" notnull="notnull" index="idx_target_p_srl" brief="이벤트 대상 srl(문서/댓글) 대댓글의 경우 앞전 댓글" />
|
||||||
<column name="type" type="char" size="1" notnull="notnull" breif="이벤트 대상 타입" />
|
<column name="type" type="char" size="1" notnull="notnull" brief="이벤트 대상 타입" />
|
||||||
<column name="target_type" type="char" size="1" notnull="notnull" breif="이벤트 타입" />
|
<column name="target_type" type="char" size="1" notnull="notnull" brief="이벤트 타입" />
|
||||||
<column name="notify_type" type="number" breif="이벤트 타입 SRL" />
|
<column name="notify_type" type="number" brief="이벤트 타입 SRL" />
|
||||||
|
|
||||||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" breif="receiver" />
|
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" brief="receiver" />
|
||||||
|
|
||||||
<column name="target_member_srl" type="number" size="11" notnull="notnull" index="idx_target_member_srl" breif="sender" />
|
<column name="target_member_srl" type="number" size="11" notnull="notnull" index="idx_target_member_srl" brief="sender" />
|
||||||
<column name="target_nick_name" type="varchar" size="50" notnull="notnull" breif="sender" />
|
<column name="target_nick_name" type="varchar" size="50" notnull="notnull" brief="sender" />
|
||||||
<column name="target_user_id" type="varchar" size="50" notnull="notnull" breif="sender" />
|
<column name="target_user_id" type="varchar" size="50" notnull="notnull" brief="sender" />
|
||||||
<column name="target_email_address" type="varchar" size="50" notnull="notnull" breif="sender" />
|
<column name="target_email_address" type="varchar" size="50" notnull="notnull" brief="sender" />
|
||||||
|
|
||||||
<column name="target_browser" type="varchar" size="50" breif="브라우저 제목" />
|
<column name="target_browser" type="varchar" size="50" brief="브라우저 제목" />
|
||||||
<column name="target_summary" type="varchar" size="50" breif="메시지 요약문" />
|
<column name="target_summary" type="varchar" size="50" brief="메시지 요약문" />
|
||||||
<column name="target_body" type="varchar" size="255" breif="커스텀 알림 제목" />
|
<column name="target_body" type="varchar" size="255" brief="커스텀 알림 제목" />
|
||||||
<column name="target_url" type="varchar" size="255" notnull="notnull" breif="링크 목적지 주소" />
|
<column name="target_url" type="varchar" size="255" notnull="notnull" brief="링크 목적지 주소" />
|
||||||
<column name="readed" type="char" size="1" default="N" notnull="notnull" index="idx_readed" />
|
<column name="readed" type="char" size="1" default="N" notnull="notnull" index="idx_readed" />
|
||||||
<column name="regdate" type="date" index="idx_regdate" />
|
<column name="regdate" type="date" index="idx_regdate" />
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<table name="ncenterlite_user_set">
|
<table name="ncenterlite_user_set">
|
||||||
<column name="member_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" breif="member_srl 고유맴버 번호" />
|
<column name="member_srl" type="number" size="11" notnull="notnull" primary_key="primary_key" brief="member_srl 고유맴버 번호" />
|
||||||
<column name="comment_notify" type="char" size="1" notnull="notnull" />
|
<column name="comment_notify" type="char" size="1" notnull="notnull" />
|
||||||
<column name="mention_notify" type="char" size="1" notnull="notnull" />
|
<column name="mention_notify" type="char" size="1" notnull="notnull" />
|
||||||
<column name="message_notify" type="char" size="1" notnull="notnull" />
|
<column name="message_notify" type="char" size="1" notnull="notnull" />
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ class pointAdminController extends point
|
||||||
|
|
||||||
$oMemberModel = getModel('member');
|
$oMemberModel = getModel('member');
|
||||||
$group_list = $oMemberModel->getGroups();
|
$group_list = $oMemberModel->getGroups();
|
||||||
|
$config->point_group = array();
|
||||||
|
|
||||||
// Per-level group configurations
|
// Per-level group configurations
|
||||||
foreach($group_list as $group)
|
foreach($group_list as $group)
|
||||||
|
|
@ -95,10 +96,6 @@ class pointAdminController extends point
|
||||||
}
|
}
|
||||||
$config->point_group[$group_srl] = $args->{'point_group_'.$group_srl};
|
$config->point_group[$group_srl] = $args->{'point_group_'.$group_srl};
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
unset($config->point_group[$group_srl]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$config->group_reset = $args->group_reset;
|
$config->group_reset = $args->group_reset;
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ class point extends ModuleObject
|
||||||
$oModuleController->insertTrigger('file.downloadFile', 'point', 'controller', 'triggerBeforeDownloadFile', 'before');
|
$oModuleController->insertTrigger('file.downloadFile', 'point', 'controller', 'triggerBeforeDownloadFile', 'before');
|
||||||
$oModuleController->insertTrigger('file.downloadFile', 'point', 'controller', 'triggerDownloadFile', 'after');
|
$oModuleController->insertTrigger('file.downloadFile', 'point', 'controller', 'triggerDownloadFile', 'after');
|
||||||
$oModuleController->insertTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after');
|
$oModuleController->insertTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after');
|
||||||
|
$oModuleController->insertTrigger('member.deleteGroup', 'point', 'controller', 'triggerDeleteGroup', 'after');
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after');
|
$oModuleController->insertTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after');
|
||||||
$oModuleController->insertTrigger('document.updateReadedCount', 'point', 'controller', 'triggerUpdateReadedCount', 'after');
|
$oModuleController->insertTrigger('document.updateReadedCount', 'point', 'controller', 'triggerUpdateReadedCount', 'after');
|
||||||
// Add a trigger for voting up and down 2008.05.13 haneul
|
// Add a trigger for voting up and down 2008.05.13 haneul
|
||||||
|
|
@ -121,6 +122,7 @@ class point extends ModuleObject
|
||||||
if(!$oModuleModel->getTrigger('file.downloadFile', 'point', 'controller', 'triggerBeforeDownloadFile', 'before')) return true;
|
if(!$oModuleModel->getTrigger('file.downloadFile', 'point', 'controller', 'triggerBeforeDownloadFile', 'before')) return true;
|
||||||
if(!$oModuleModel->getTrigger('file.downloadFile', 'point', 'controller', 'triggerDownloadFile', 'after')) return true;
|
if(!$oModuleModel->getTrigger('file.downloadFile', 'point', 'controller', 'triggerDownloadFile', 'after')) return true;
|
||||||
if(!$oModuleModel->getTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after')) return true;
|
if(!$oModuleModel->getTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after')) return true;
|
||||||
|
if(!$oModuleModel->getTrigger('member.deleteGroup', 'point', 'controller', 'triggerDeleteGroup', 'after')) return true;
|
||||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after')) return true;
|
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after')) return true;
|
||||||
if(!$oModuleModel->getTrigger('document.updateReadedCount', 'point', 'controller', 'triggerUpdateReadedCount', 'after')) return true;
|
if(!$oModuleModel->getTrigger('document.updateReadedCount', 'point', 'controller', 'triggerUpdateReadedCount', 'after')) return true;
|
||||||
// Add a trigger for voting up and down 2008.05.13 haneul
|
// Add a trigger for voting up and down 2008.05.13 haneul
|
||||||
|
|
@ -169,6 +171,8 @@ class point extends ModuleObject
|
||||||
$oModuleController->insertTrigger('file.downloadFile', 'point', 'controller', 'triggerDownloadFile', 'after');
|
$oModuleController->insertTrigger('file.downloadFile', 'point', 'controller', 'triggerDownloadFile', 'after');
|
||||||
if(!$oModuleModel->getTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after'))
|
if(!$oModuleModel->getTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after'))
|
||||||
$oModuleController->insertTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after');
|
$oModuleController->insertTrigger('member.doLogin', 'point', 'controller', 'triggerAfterLogin', 'after');
|
||||||
|
if(!$oModuleModel->getTrigger('member.deleteGroup', 'point', 'controller', 'triggerDeleteGroup', 'after'))
|
||||||
|
$oModuleController->insertTrigger('member.deleteGroup', 'point', 'controller', 'triggerDeleteGroup', 'after');
|
||||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after'))
|
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after'))
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after');
|
$oModuleController->insertTrigger('module.dispAdditionSetup', 'point', 'view', 'triggerDispPointAdditionSetup', 'after');
|
||||||
if(!$oModuleModel->getTrigger('document.updateReadedCount', 'point', 'controller', 'triggerUpdateReadedCount', 'after'))
|
if(!$oModuleModel->getTrigger('document.updateReadedCount', 'point', 'controller', 'triggerUpdateReadedCount', 'after'))
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,25 @@ class pointController extends point
|
||||||
return new Object();
|
return new Object();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Member group deletion trigger
|
||||||
|
*/
|
||||||
|
function triggerDeleteGroup(&$obj)
|
||||||
|
{
|
||||||
|
// Get the point module config
|
||||||
|
$config = getModel('module')->getModuleConfig('point');
|
||||||
|
// Get the group_srl of the deleted group
|
||||||
|
$group_srl = $obj->group_srl;
|
||||||
|
// Exclude deleted group from point/level/group integration
|
||||||
|
if($config->point_group && isset($config->point_group[$group_srl]))
|
||||||
|
{
|
||||||
|
unset($config->point_group[$group_srl]);
|
||||||
|
getController('module')->insertModuleConfig('point', $config);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Object();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A trigger to add points to the member for creating a post
|
* @brief A trigger to add points to the member for creating a post
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -121,10 +121,10 @@ function doFillWidgetVars() {
|
||||||
|
|
||||||
if (node.name == 'widget_cache') {
|
if (node.name == 'widget_cache') {
|
||||||
var widget_cache = selected_node.getAttribute(node.name);
|
var widget_cache = selected_node.getAttribute(node.name);
|
||||||
var widget_cache_unit = widget_cache.match(/[smhd]$/i);
|
var widget_cache_unit = widget_cache ? widget_cache.match(/[smhd]$/i) : 'm';
|
||||||
if (widget_cache_unit) {
|
if (widget_cache_unit) {
|
||||||
jQuery("#widget_cache_unit").val(widget_cache_unit);
|
jQuery("#widget_cache_unit").val(widget_cache_unit);
|
||||||
widget_cache = widget_cache.replace(/[smhd]$/i, "");
|
widget_cache = widget_cache ? widget_cache.replace(/[smhd]$/i, "") : 0;
|
||||||
}
|
}
|
||||||
jQuery("#widget_cache").val(widget_cache);
|
jQuery("#widget_cache").val(widget_cache);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -17,5 +17,6 @@ v.cast('ADD_MESSAGE',['invalid_alpha','%s의 형식이 잘못되었습니다.
|
||||||
v.cast('ADD_MESSAGE',['invalid_alpha_number','%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해야 합니다.']);
|
v.cast('ADD_MESSAGE',['invalid_alpha_number','%s의 형식이 잘못되었습니다. 영문과 숫자로만 입력해야 합니다.']);
|
||||||
v.cast('ADD_MESSAGE',['invalid_mid','%s의 형식이 잘못되었습니다. 첫 글자는 영문으로 시작해야 하며 \'영문+숫자+_\'로만 입력해야 합니다.']);
|
v.cast('ADD_MESSAGE',['invalid_mid','%s의 형식이 잘못되었습니다. 첫 글자는 영문으로 시작해야 하며 \'영문+숫자+_\'로만 입력해야 합니다.']);
|
||||||
v.cast('ADD_MESSAGE',['invalid_number','%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.']);
|
v.cast('ADD_MESSAGE',['invalid_number','%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.']);
|
||||||
|
v.cast('ADD_MESSAGE',['invalid_float','%s의 형식이 잘못되었습니다. 숫자로만 입력해야 합니다.']);
|
||||||
v.cast('ADD_MESSAGE',['invalid_extension','%s의 형식이 잘못되었습니다. *.* 나 *.jpg;*.gif; 처럼 입력해야 합니다.']);
|
v.cast('ADD_MESSAGE',['invalid_extension','%s의 형식이 잘못되었습니다. *.* 나 *.jpg;*.gif; 처럼 입력해야 합니다.']);
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ class SecurityTest extends \Codeception\TestCase\Test
|
||||||
public function testEncryption()
|
public function testEncryption()
|
||||||
{
|
{
|
||||||
$plaintext = Rhymix\Framework\Security::getRandom();
|
$plaintext = Rhymix\Framework\Security::getRandom();
|
||||||
|
config('crypto.encryption_key', Rhymix\Framework\Security::getRandom());
|
||||||
|
|
||||||
// Encryption with default key.
|
// Encryption with default key.
|
||||||
$encrypted = Rhymix\Framework\Security::encrypt($plaintext);
|
$encrypted = Rhymix\Framework\Security::encrypt($plaintext);
|
||||||
|
|
@ -55,6 +56,18 @@ class SecurityTest extends \Codeception\TestCase\Test
|
||||||
$this->assertEquals(false, $decrypted);
|
$this->assertEquals(false, $decrypted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testSignature()
|
||||||
|
{
|
||||||
|
$plaintext = Rhymix\Framework\Security::getRandom();
|
||||||
|
config('crypto.authentication_key', Rhymix\Framework\Security::getRandom());
|
||||||
|
|
||||||
|
$signature = Rhymix\Framework\Security::createSignature($plaintext);
|
||||||
|
$this->assertRegexp('/^[a-zA-Z0-9-_]{40}$/', $signature);
|
||||||
|
$this->assertEquals(true, Rhymix\Framework\Security::verifySignature($plaintext, $signature));
|
||||||
|
$this->assertEquals(false, Rhymix\Framework\Security::verifySignature($plaintext, $signature . 'x'));
|
||||||
|
$this->assertEquals(false, Rhymix\Framework\Security::verifySignature($plaintext, 'x' . $signature));
|
||||||
|
}
|
||||||
|
|
||||||
public function testGetRandom()
|
public function testGetRandom()
|
||||||
{
|
{
|
||||||
$this->assertRegExp('/^[0-9a-zA-Z]{32}$/', Rhymix\Framework\Security::getRandom());
|
$this->assertRegExp('/^[0-9a-zA-Z]{32}$/', Rhymix\Framework\Security::getRandom());
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,20 @@ class StorageTest extends \Codeception\TestCase\Test
|
||||||
$this->assertEquals('foobarbazzjazzrhymixfoobarbazzjazzrhymixrhymix', file_get_contents($copyfile));
|
$this->assertEquals('foobarbazzjazzrhymixfoobarbazzjazzrhymixrhymix', file_get_contents($copyfile));
|
||||||
fclose($stream);
|
fclose($stream);
|
||||||
|
|
||||||
|
// Empty file write test
|
||||||
|
$this->assertTrue(Rhymix\Framework\Storage::write($testfile . '1', ''));
|
||||||
|
$this->assertTrue(file_exists($testfile . '1'));
|
||||||
|
$this->assertEquals(0, filesize($testfile . '1'));
|
||||||
|
$this->assertEmpty(0, glob($testfile . '1.tmp.*'));
|
||||||
|
|
||||||
|
// Empty stream copy test
|
||||||
|
$stream = fopen('php://temp', 'r');
|
||||||
|
$this->assertTrue(Rhymix\Framework\Storage::write($testfile . '2', $stream));
|
||||||
|
$this->assertTrue(file_exists($testfile . '2'));
|
||||||
|
$this->assertEquals(0, filesize($testfile . '2'));
|
||||||
|
$this->assertEmpty(0, glob($testfile . '2.tmp.*'));
|
||||||
|
fclose($stream);
|
||||||
|
|
||||||
// Umask test
|
// Umask test
|
||||||
if (strncasecmp(\PHP_OS, 'Win', 3) !== 0)
|
if (strncasecmp(\PHP_OS, 'Win', 3) !== 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue