Merge remote-tracking branch 'refs/remotes/rhymix/develop' into develop

This commit is contained in:
MinSoo Kim 2016-02-05 20:57:18 +09:00
commit ff87af87a0
52 changed files with 837 additions and 126 deletions

View file

@ -1,4 +1,4 @@
[![RhymiX](https://cloud.githubusercontent.com/assets/8565457/12227560/ba15b514-b871-11e5-802a-d5e88db2e393.png)](https://www.rhymix.org)
[![RhymiX](https://cloud.githubusercontent.com/assets/8565457/12807700/92e90982-cb54-11e5-806f-df28792ed9a3.png)](https://www.rhymix.org)
RhymiX(라이믹스)는 누구든지 쉽고 자유롭게 독립적인 홈페이지를 만들어
자신을 표현하고 커뮤니티를 키워나갈 수 있도록 돕기 위한 CMS(content management system)입니다.

View file

@ -235,6 +235,12 @@ class Context
$this->_setJSONRequestArgument();
$this->_setRequestArgument();
$this->_setUploadedArgument();
if(isset($_POST['_rx_ajax_compat']) && $_POST['_rx_ajax_compat'] === 'XMLRPC')
{
self::$_instance->request_method = 'XMLRPC';
self::$_instance->response_method = 'JSON';
}
$this->loadDBInfo();
if($this->db_info->use_sitelock == 'Y')

View file

@ -40,7 +40,15 @@ class DisplayHandler extends Handler
{
$handler = new VirtualXMLDisplayHandler();
}
else if(Context::getRequestMethod() == 'XMLRPC')
elseif(Context::getRequestMethod() == 'JSON' || isset($_POST['_rx_ajax_compat']))
{
$handler = new JSONDisplayHandler();
}
elseif(Context::getRequestMethod() == 'JS_CALLBACK')
{
$handler = new JSCallbackDisplayHandler();
}
elseif(Context::getRequestMethod() == 'XMLRPC')
{
$handler = new XMLDisplayHandler();
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE)
@ -48,14 +56,6 @@ class DisplayHandler extends Handler
$this->gz_enabled = FALSE;
}
}
else if(Context::getRequestMethod() == 'JSON')
{
$handler = new JSONDisplayHandler();
}
else if(Context::getRequestMethod() == 'JS_CALLBACK')
{
$handler = new JSCallbackDisplayHandler();
}
else
{
$handler = new HTMLDisplayHandler();

View file

@ -1207,9 +1207,9 @@ class ModuleHandler extends Handler
$oModuleModel = getModel('module');
$triggers = $oModuleModel->getTriggers($trigger_name, $called_position);
if(!$triggers || count($triggers) < 1)
if(!$triggers)
{
return new Object();
$triggers = array();
}
//store before trigger call time
@ -1252,6 +1252,17 @@ class ModuleHandler extends Handler
unset($oModule);
}
$trigger_functions = $oModuleModel->getTriggerFunctions($trigger_name, $called_position);
foreach($trigger_functions as $item)
{
$item($obj);
if(is_object($output) && method_exists($output, 'toBool') && !$output->toBool())
{
return $output;
}
}
return new Object();
}

View file

@ -6,87 +6,29 @@ class IpFilter
public function filter($ip_list, $ip = NULL)
{
if(!$ip) $ip = $_SERVER['REMOTE_ADDR'];
$long_ip = ip2long($ip);
foreach($ip_list as $filter_ip)
{
$range = explode('-', $filter_ip);
if(!$range[1]) // single address type
{
$star_pos = strpos($filter_ip, '*');
if($star_pos !== FALSE ) // wild card exist
{
if(strncmp($filter_ip, $ip, $star_pos)===0) return true;
}
else if(strcmp($filter_ip, $ip)===0)
{
return true;
}
}
else if(ip2long($range[0]) <= $long_ip && ip2long($range[1]) >= $long_ip)
foreach($ip_list as $filter)
{
if(Rhymix\Framework\IpFilter::inRange($ip, $filter))
{
return true;
}
}
return false;
}
/* public function filter2($ip_list, $ip)
{
$long_ip = ip2long($ip);
foreach($ip_list as $filter_ip)
{
$range = explode('-', $filter_ip);
if(!$range[1]) // single address type
{
$range[1] = str_replace('*', '255', $range[0]);
$range[0] = str_replace('*', '0', $range[0]);
}
if(ip2long($range[0]) <= $long_ip && ip2long($range[1]) >= $long_ip)
{
return true;
}
}
return false;
} */
public function validate($ip_list = array())
{
/* 사용가능한 표현
192.168.2.10 - 4자리의 정확한 ip주소
192.168.*.* - 와일드카드(*) 사용된 4자리의 ip주소, a클래스에는 와일드카드 사용불가,
와일드카드 이후의 아이피주소 허용(, filter() 경우 와일드카드 이후 주소는 무시됨
192.168.1.1-192.168.1.10 - '-' 구분된 정확한 4자리의 ip주소 2
*/
$regex = "/^
(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
(?:
(?:
(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}
(?:-(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){1}
(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}
)
|
(?:
(?:\.(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|\*)){3}
)
)
$/";
$regex = str_replace(array("\r\n", "\n", "\r","\t"," "), '', $regex);
foreach($ip_list as $i => $ip)
foreach($ip_list as $filter)
{
preg_match($regex, $ip, $matches);
if(!count($matches)) return false;
if(!Rhymix\Framework\IpFilter::validateRange($filter))
{
return false;
}
}
return true;
}
}
/* End of file : IpFilter.class.php */
/* Location: ./classes/security/IpFilter.class.php */

View file

@ -51,6 +51,11 @@ else
/**
* RX_CLIENT_IP_VERSION and RX_CLIENT_IP contain information about the current visitor's IP address.
*/
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
{
include_once __DIR__ . '/framework/ipfilter.php';
Rhymix\Framework\IpFilter::getCloudFlareRealIP();
}
if (isset($_SERVER['REMOTE_ADDR']) && preg_match('/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/', $_SERVER['REMOTE_ADDR'], $matches))
{
define('RX_CLIENT_IP_VERSION', 4);

View file

@ -72,7 +72,6 @@ a img {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
background: #fff;
min-width:80px;
outline:none;
}
#popup_menu_area ul {
margin: 0;
@ -94,6 +93,7 @@ a img {
#popup_menu_area a:active,
#popup_menu_area a:focus {
background: #eeeeee;
outline:none;
}
@media screen and (max-width: 400px) {
#popup_menu_area {

View file

@ -0,0 +1,28 @@
<?php
/**
* List of IP addresses belonging to CloudFlare
*
* See: https://www.cloudflare.com/ips
*/
return array(
'103.21.244.0/22',
'103.22.200.0/22',
'103.31.4.0/22',
'104.16.0.0/12',
'108.162.192.0/18',
'141.101.64.0/18',
'162.158.0.0/15',
'172.64.0.0/13',
'173.245.48.0/20',
'188.114.96.0/20',
'190.93.240.0/20',
'197.234.240.0/22',
'198.41.128.0/17',
'199.27.128.0/21',
'2400:cb00::/32',
'2405:8100::/32',
'2405:b500::/32',
'2606:4700::/32',
'2803:f800::/32',
);

View file

@ -0,0 +1,11 @@
<?php
namespace Rhymix\Framework;
/**
* The exception class.
*/
class Exception extends \Exception
{
}

View file

@ -0,0 +1,198 @@
<?php
namespace Rhymix\Framework;
/**
* The IP filter class.
*/
class IpFilter
{
/**
* Check whether the given IP address belongs to a range.
*
* @param string $ip
* @param string $range
* @return bool
*/
public static function inRange($ip, $range)
{
// Determine the type of the IP address.
if (preg_match('/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/', $ip, $matches))
{
$ip = $matches[0];
$ip_type = 4;
}
elseif (preg_match('/^[0-9a-f:]+$/i', $ip))
{
$ip = strtolower($ip);
$ip_type = 6;
}
// Determine the type of the range.
if ($ip_type === 6 && strpos($range, ':') !== false)
{
$range_type = 'ipv6_cidr';
}
elseif ($ip_type === 4 && strpos($range, '*') !== false)
{
$range_type = 'ipv4_wildcard';
}
elseif ($ip_type === 4 && strpos($range, '-') !== false)
{
$range_type = 'ipv4_hyphen';
}
elseif ($ip_type === 4 && strpos($range, '.') !== false)
{
$range_type = 'ipv4_cidr';
}
else
{
$range_type = 'unknown';
}
// Check!
switch ($range_type)
{
case 'ipv4_cidr':
return self::_checkIPv4CIDR($ip, $range);
case 'ipv6_cidr':
return self::_checkIPv6CIDR($ip, $range);
case 'ipv4_wildcard':
return self::_checkIPv4Wildcard($ip, $range);
case 'ipv4_hyphen':
return self::_checkIPv4Hyphen($ip, $range);
default:
return false;
}
}
/**
* Check whether a range definition is valid.
*
* @param string $range
* @return bool
*/
public static function validateRange($range)
{
$regexes = array(
'/^\d+\.\d+\.\d+\.\d+(\/\d+)?$/',
'/^\d+\.(\d+|\*)(\.(\d+|\*)(\.(\d+|\*))?)?$/',
'/^\d+\.\d+\.\d+\.\d+-\d+\.\d+\.\d+\.\d+$/',
'/^[0-9a-f:]+(\/\d+)?$/i',
);
foreach ($regexes as $regex)
{
if (preg_match($regex, $range))
{
return true;
}
}
return false;
}
/**
* Get real IP from CloudFlare headers.
*
* @return string|false
*/
public static function getCloudFlareRealIP()
{
if (!isset($_SERVER['HTTP_CF_CONNECTING_IP']))
{
return false;
}
$cloudflare_ranges = (include RX_BASEDIR . 'common/defaults/cloudflare.php');
foreach ($cloudflare_ranges as $cloudflare_range)
{
if (self::inRange($_SERVER['REMOTE_ADDR'], $cloudflare_range))
{
return $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
}
return false;
}
/**
* Check whether the given IPv4 address belongs to a IPv4 CIDR range with mask.
*
* Example: 172.16.0.0/12
*
* @param string $ip
* @param string $range
* @return bool
*/
protected static function _checkIPv4CIDR($ip, $range)
{
if (strpos($range, '/') === false) $range .= '/32';
list($range, $mask) = explode('/', $range);
$ip = ip2long($ip) & (0xffffffff << (32 - $mask));
$range = ip2long($range) & (0xffffffff << (32 - $mask));
return $ip === $range;
}
/**
* Check whether the given IPv4 address belongs to a IPv6 CIDR range with mask.
*
* Example: 2400:cb00::/32
*
* @param string $ip
* @param string $range
* @return bool
*/
protected static function _checkIPv6CIDR($ip, $range)
{
if (function_exists('inet_pton'))
{
if (strpos($range, '/') === false) $range .= '/128';
list($range, $mask) = explode('/', $range);
$ip = substr(bin2hex(inet_pton($ip)), 0, intval($mask / 4));
$range = substr(bin2hex(inet_pton($range)), 0, intval($mask / 4));
return $ip === $range;
}
else
{
return false;
}
}
/**
* Check whether the given IPv4 address belongs to a IPv4 wildcard range.
*
* Example: 192.168.*.*
*
* @param string $ip
* @param string $range
* @return bool
*/
protected static function _checkIPv4Wildcard($ip, $range)
{
$count = count(explode('.', $range));
if ($count < 4)
{
$range .= str_repeat('.*', 4 - $count);
}
$range = str_replace(array('.', '*'), array('\\.', '\\d+'), trim($range));
var_dump($ip, $range);
return preg_match("/^$range$/", $ip) ? true : false;
}
/**
* Check whether the given IPv4 address belongs to a IPv4 hyphen range.
*
* Example: 192.168.0.0-192.168.255.255
*
* @param string $ip
* @param string $range
* @return bool
*/
protected static function _checkIPv4Hyphen($ip, $range)
{
$ip = sprintf('%u', ip2long($ip));
list($range_start, $range_end) = explode('-', $range);
$range_start = sprintf('%u', ip2long(trim($range_start)));
$range_end = sprintf('%u', ip2long(trim($range_end)));
return ($ip >= $range_start && $ip <= $range_end);
}
}

View file

@ -197,25 +197,54 @@ class Lang
// Convert XML to a PHP array.
$lang = array();
foreach ($xml->item as $item)
self::_toArray($xml, $lang, $language);
unset($xml);
// Save the array as a cache file.
$buff = "<?php\n";
foreach ($lang as $key => $value)
{
if (is_array($value))
{
foreach ($value as $subkey => $subvalue)
{
if (is_array($subvalue))
{
foreach ($subvalue as $subsubkey => $subsubvalue)
{
$buff .= '$lang->' . $key . "['$subkey']['$subsubkey']" . ' = ' . var_export($subsubvalue, true) . ";\n";
}
}
else
{
$buff .= '$lang->' . $key . "['$subkey']" . ' = ' . var_export($subvalue, true) . ";\n";
}
}
}
else
{
$buff .= '$lang->' . $key . ' = ' . var_export($value, true) . ";\n";
}
}
\FileHandler::writeFile($output_filename, $buff);
return $output_filename;
}
/**
* XML to array conversion callback.
*
* @param array $items
* @return void
*/
protected static function _toArray($items, &$lang, $language)
{
foreach ($items as $item)
{
$name = strval($item['name']);
if (count($item->item))
{
$lang[$name] = array();
foreach ($item->item as $subitem)
{
$subname = strval($subitem['name']);
foreach ($subitem->value as $value)
{
$attribs = $value->attributes('xml', true);
if (strval($attribs['lang']) === $language)
{
$lang[$name][$subname] = strval($value);
break;
}
}
}
self::_toArray($item->item, $lang[$name], $language);
}
else
{
@ -230,26 +259,6 @@ class Lang
}
}
}
unset($xml);
// Save the array as a cache file.
$buff = "<?php\n";
foreach ($lang as $key => $value)
{
if (is_array($value))
{
foreach ($value as $subkey => $subvalue)
{
$buff .= '$lang->' . $key . "['" . $subkey . "']" . ' = ' . var_export($subvalue, true) . ";\n";
}
}
else
{
$buff .= '$lang->' . $key . ' = ' . var_export($value, true) . ";\n";
}
}
\FileHandler::writeFile($output_filename, $buff);
return $output_filename;
}
/**
@ -304,7 +313,14 @@ class Lang
// Search custom translations first.
if (isset($this->_loaded_plugins['_custom_']->{$key}))
{
return $this->_loaded_plugins['_custom_']->{$key};
if (is_array($this->_loaded_plugins['_custom_']->{$key}))
{
return new \ArrayObject($this->_loaded_plugins['_custom_']->{$key}, 3);
}
else
{
return $this->_loaded_plugins['_custom_']->{$key};
}
}
// Search other plugins.
@ -312,7 +328,14 @@ class Lang
{
if (isset($this->_loaded_plugins[$plugin_name]->{$key}))
{
return $this->_loaded_plugins[$plugin_name]->{$key};
if (is_array($this->_loaded_plugins[$plugin_name]->{$key}))
{
return new \ArrayObject($this->_loaded_plugins[$plugin_name]->{$key}, 3);
}
else
{
return $this->_loaded_plugins[$plugin_name]->{$key};
}
}
}

View file

@ -27,6 +27,7 @@
params = params ? ($.isArray(params) ? arr2obj(params) : params) : {};
params.module = module;
params.act = act;
params._rx_ajax_compat = 'XMLRPC';
// Fill in the XE vid.
if (typeof(xeVid) != "undefined") params.vid = xeVid;
@ -115,9 +116,23 @@
// Define the error handler.
var errorHandler = function(xhr, textStatus) {
// If the server has returned XML anyway, convert to JSON and call the success handler.
if (textStatus === 'parsererror' && xhr.responseText && xhr.responseText.match(/<response/)) {
var xmldata = $.parseXML(xhr.responseText);
if (xmldata) {
var jsondata = $.parseJSON(xml2json(xmldata, false, false));
if (jsondata && jsondata.response) {
return successHandler(jsondata.response, textStatus, xhr);
}
}
}
// Hide the waiting message and display an error notice.
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + xhr.status + " " + xhr.statusText);
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
};
// Send the AJAX request.
@ -148,6 +163,7 @@
if (action.length != 2) return;
params.module = action[0];
params.act = action[1];
params._rx_ajax_compat = 'JSON';
// Fill in the XE vid.
if (typeof(xeVid) != "undefined") params.vid = xeVid;
@ -190,15 +206,16 @@
// If there was a success callback, call it.
if($.isFunction(callback_success)) {
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
callback_success(data);
}
};
// Define the error handler.
var errorHandler = function(xhr, textStatus) {
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + xhr.status + " " + xhr.statusText);
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);
};
// Send the AJAX request.
@ -260,7 +277,8 @@
var errorHandler = function(xhr, textStatus) {
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + xhr.status + " " + xhr.statusText);
var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
};
// Send the AJAX request.

View file

@ -610,6 +610,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);
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.

View file

@ -56,7 +56,22 @@ $lang->about_enable_autosave = 'You may decide whether the auto-save function wi
$lang->edit['fontname'] = 'Font';
$lang->edit['fontsize'] = 'Size';
$lang->edit['use_paragraph'] = 'Paragraph Function';
$lang->edit['fontlist']['arial'] = 'Arial, Helvetica, sans-serif';
$lang->edit['fontlist']['tahoma'] = 'Tahoma, Geneva, sans-serif';
$lang->edit['fontlist']['verdana'] = 'Verdana, Geneva, sans-serif';
$lang->edit['fontlist']['sans-serif'] = 'Sans-serif';
$lang->edit['fontlist']['georgia'] = 'Georgia, \'Times New Roman\', Times, serif';
$lang->edit['fontlist']['palatinoLinotype'] = '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif';
$lang->edit['fontlist']['timesNewRoman'] = '\'Times New Roman\', Times, serif';
$lang->edit['fontlist']['serif'] = 'Serif';
$lang->edit['fontlist']['courierNew'] = '\'Courier New\', Courier, monospace';
$lang->edit['header'] = 'Style';
$lang->edit['header_list']['h1'] = 'Header 1';
$lang->edit['header_list']['h2'] = 'Header 2';
$lang->edit['header_list']['h3'] = 'Header 3';
$lang->edit['header_list']['h4'] = 'Header 4';
$lang->edit['header_list']['h5'] = 'Header 5';
$lang->edit['header_list']['h6'] = 'Header 6';
$lang->edit['submit'] = 'Submit';
$lang->edit['fontcolor'] = 'Text Color';
$lang->edit['fontbgcolor'] = 'Background Color';

View file

@ -35,6 +35,12 @@ $lang->edit['fontname'] = 'Fuente';
$lang->edit['fontsize'] = 'Tamaño';
$lang->edit['use_paragraph'] = 'Párrafo';
$lang->edit['header'] = 'Estilo';
$lang->edit['header_list']['h1'] = 'Título 1';
$lang->edit['header_list']['h2'] = 'Título 2';
$lang->edit['header_list']['h3'] = 'Título 3';
$lang->edit['header_list']['h4'] = 'Título 4';
$lang->edit['header_list']['h5'] = 'Título 5';
$lang->edit['header_list']['h6'] = 'Título 6';
$lang->edit['submit'] = 'Confirmar';
$lang->edit['help_fontcolor'] = 'Selecciona el color de las letras';
$lang->edit['help_fontbgcolor'] = 'Selecciona el color del fondo de la letras';

View file

@ -33,6 +33,12 @@ $lang->about_enable_autosave = 'Vous pouvez valider la fonction à Conserver Aut
$lang->edit['fontname'] = 'Police de caractères';
$lang->edit['fontsize'] = 'Mesure';
$lang->edit['use_paragraph'] = 'Fonctions sur Paragraphe';
$lang->edit['header_list']['h1'] = 'Titre 1';
$lang->edit['header_list']['h2'] = 'Titre 2';
$lang->edit['header_list']['h3'] = 'Titre 3';
$lang->edit['header_list']['h4'] = 'Titre 4';
$lang->edit['header_list']['h5'] = 'Titre 5';
$lang->edit['header_list']['h6'] = 'Titre 6';
$lang->edit['submit'] = 'Soumettre';
$lang->edit['help_remove_format'] = 'Supprimer les balises dans l\'endroit sélectionné';
$lang->edit['help_strike_through'] = 'Représenter la ligne d\'annulation sur les lettres.';

View file

@ -56,7 +56,16 @@ $lang->about_enable_autosave = '書き込みの際に自動保存機能をオン
$lang->edit['fontname'] = 'フォント';
$lang->edit['fontsize'] = 'フォントサイズ';
$lang->edit['use_paragraph'] = '段落機能';
$lang->edit['fontlist']['meiryo'] = '\'メイリオ\', \'Meiryo\', Arial, Helvetica, sans-serif';
$lang->edit['fontlist']['hiragino'] = '\'ヒラギノ角ゴ Pro\', \'Hiragino Kaku Gothic Pro\', Arial, Helvetica, sans-serif';
$lang->edit['fontlist']['ms_pgothic'] = '\' Pゴシック\', \'MS PGothic\', Arial, Helvetica, sans-serif';
$lang->edit['header'] = '書式';
$lang->edit['header_list']['h1'] = '見出し1';
$lang->edit['header_list']['h2'] = '見出し2';
$lang->edit['header_list']['h3'] = '見出し3';
$lang->edit['header_list']['h4'] = '見出し4';
$lang->edit['header_list']['h5'] = '見出し5';
$lang->edit['header_list']['h6'] = '見出し6';
$lang->edit['submit'] = '送信';
$lang->edit['fontcolor'] = 'テキストの色';
$lang->edit['fontbgcolor'] = 'テキストの背景色';

View file

@ -56,7 +56,23 @@ $lang->about_enable_autosave = '글 작성 시 자동 저장 기능을 활성화
$lang->edit['fontname'] = '글꼴';
$lang->edit['fontsize'] = '크기';
$lang->edit['use_paragraph'] = '문단기능';
$lang->edit['fontlist']['arial'] = 'Arial, Helvetica, sans-serif';
$lang->edit['fontlist']['tahoma'] = 'Tahoma, Geneva, sans-serif';
$lang->edit['fontlist']['verdana'] = 'Verdana, Geneva, sans-serif';
$lang->edit['fontlist']['sans-serif'] = 'Sans-serif';
$lang->edit['fontlist']['georgia'] = 'Georgia, \'Times New Roman\', Times, serif';
$lang->edit['fontlist']['palatinoLinotype'] = '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif';
$lang->edit['fontlist']['timesNewRoman'] = '\'Times New Roman\', Times, serif';
$lang->edit['fontlist']['serif'] = 'Serif';
$lang->edit['fontlist']['courierNew'] = '\'Courier New\', Courier, monospace';
$lang->edit['fontlist']['lucidaConsole'] = '\'Lucida Console\', Monaco, monospace';
$lang->edit['header'] = '형식';
$lang->edit['header_list']['h1'] = '제목 1';
$lang->edit['header_list']['h2'] = '제목 2';
$lang->edit['header_list']['h3'] = '제목 3';
$lang->edit['header_list']['h4'] = '제목 4';
$lang->edit['header_list']['h5'] = '제목 5';
$lang->edit['header_list']['h6'] = '제목 6';
$lang->edit['submit'] = '확인';
$lang->edit['fontcolor'] = '글자 색';
$lang->edit['fontbgcolor'] = '글자 배경색';

View file

@ -48,6 +48,12 @@ $lang->edit['fontname'] = 'Шрифт';
$lang->edit['fontsize'] = 'Размер';
$lang->edit['use_paragraph'] = 'Функции параграфа';
$lang->edit['header'] = 'Стиль';
$lang->edit['header_list']['h1'] = 'Заголовок 1';
$lang->edit['header_list']['h2'] = 'Заголовок 2';
$lang->edit['header_list']['h3'] = 'Заголовок 3';
$lang->edit['header_list']['h4'] = 'Заголовок 4';
$lang->edit['header_list']['h5'] = 'Заголовок 5';
$lang->edit['header_list']['h6'] = 'Заголовок 6';
$lang->edit['submit'] = 'Принять';
$lang->edit['fontcolor'] = 'Цвет текста';
$lang->edit['fontbgcolor'] = 'Цвет Фона';

View file

@ -49,6 +49,12 @@ $lang->edit['fontname'] = 'Yazı Tipi';
$lang->edit['fontsize'] = 'Boyut';
$lang->edit['use_paragraph'] = 'Paragraf Özelliği';
$lang->edit['header'] = 'Tarz';
$lang->edit['header_list']['h1'] = 'Konu 1';
$lang->edit['header_list']['h2'] = 'Konu 2';
$lang->edit['header_list']['h3'] = 'Konu 3';
$lang->edit['header_list']['h4'] = 'Konu 4';
$lang->edit['header_list']['h5'] = 'Konu 5';
$lang->edit['header_list']['h6'] = 'Konu 6';
$lang->edit['submit'] = 'Gönder';
$lang->edit['fontcolor'] = 'Yazı Rengi';
$lang->edit['fontbgcolor'] = 'Arkaplan Rengi';

View file

@ -50,6 +50,12 @@ $lang->edit['fontname'] = 'Kiểu chữ';
$lang->edit['fontsize'] = 'Cỡ chữ';
$lang->edit['use_paragraph'] = 'Chức năng Paragraph';
$lang->edit['header'] = 'Tiêu đề lớn';
$lang->edit['header_list']['h1'] = 'Cỡ 1';
$lang->edit['header_list']['h2'] = 'Cỡ 2';
$lang->edit['header_list']['h3'] = 'Cỡ 3';
$lang->edit['header_list']['h4'] = 'Cỡ 4';
$lang->edit['header_list']['h5'] = 'Cỡ 5';
$lang->edit['header_list']['h6'] = 'Cỡ 6';
$lang->edit['submit'] = 'Gửi bài';
$lang->edit['fontcolor'] = 'Màu chữ';
$lang->edit['fontbgcolor'] = 'Màu nền';

View file

@ -51,6 +51,12 @@ $lang->edit['fontname'] = '字体';
$lang->edit['fontsize'] = '大小';
$lang->edit['use_paragraph'] = '段落功能';
$lang->edit['header'] = '样式';
$lang->edit['header_list']['h1'] = '标题 1';
$lang->edit['header_list']['h2'] = '标题 2';
$lang->edit['header_list']['h3'] = '标题 3';
$lang->edit['header_list']['h4'] = '标题 4';
$lang->edit['header_list']['h5'] = '标题 5';
$lang->edit['header_list']['h6'] = '标题 6';
$lang->edit['submit'] = '确认';
$lang->edit['fontcolor'] = '文本颜色';
$lang->edit['fontbgcolor'] = '背景颜色';

View file

@ -51,6 +51,12 @@ $lang->edit['fontname'] = '字體';
$lang->edit['fontsize'] = '大小';
$lang->edit['use_paragraph'] = '段落功能';
$lang->edit['header'] = '樣式';
$lang->edit['header_list']['h1'] = '標題 1';
$lang->edit['header_list']['h2'] = '標題 2';
$lang->edit['header_list']['h3'] = '標題 3';
$lang->edit['header_list']['h4'] = '標題 4';
$lang->edit['header_list']['h5'] = '標題 5';
$lang->edit['header_list']['h6'] = '標題 6';
$lang->edit['submit'] = '確認';
$lang->edit['fontcolor'] = '文字顏色';
$lang->edit['fontbgcolor'] = '背景顏色';

View file

@ -4,6 +4,6 @@
</tables>
<conditions>
<condition operation="equal" column="upload_target_srl" var="upload_target_srl" filter="number" notnull="notnull" />
<condition operation="equal" column="cover_image" default="Y" notnull="notnull" />
<condition operation="equal" column="cover_image" default="Y" pipe="and" />
</conditions>
</query>

View file

@ -11,6 +11,14 @@ $lang->is_result_text = 'There are <strong>%d</strong> result(s) for <strong>\'%
$lang->multimedia = 'Images/Video';
$lang->include_search_target = 'Search for selected modules';
$lang->exclude_search_target = 'Exclude selected modules from search';
$lang->is_search_option['document']['title_content'] = 'Subject+Content';
$lang->is_search_option['document']['title'] = 'Subject';
$lang->is_search_option['document']['content'] = 'Content';
$lang->is_search_option['document']['tag'] = 'Tags';
$lang->is_search_option['trackback']['url'] = 'Target URL';
$lang->is_search_option['trackback']['blog_name'] = 'Target Site Name';
$lang->is_search_option['trackback']['title'] = 'Title';
$lang->is_search_option['trackback']['excerpt'] = 'Excerpt';
$lang->is_sort_option['regdate'] = 'Registered Date';
$lang->is_sort_option['comment_count'] = 'Number of Comments';
$lang->is_sort_option['readed_count'] = 'Number of Hits';

View file

@ -7,6 +7,14 @@ $lang->msg_no_keyword = 'Ingrese la palabra para la búsqueda';
$lang->is_result_text = '<strong>%d</strong> Resultados con la palabra <strong>\'%s\'</strong> ';
$lang->include_search_target = 'Sólo en determinados ';
$lang->exclude_search_target = 'Búsqueda para el destino de';
$lang->is_search_option['document']['title_content'] = 'Título+Contenido';
$lang->is_search_option['document']['title'] = 'Título';
$lang->is_search_option['document']['content'] = 'Contenido';
$lang->is_search_option['document']['tag'] = 'Etiqueta';
$lang->is_search_option['trackback']['url'] = 'URL objetivo';
$lang->is_search_option['trackback']['blog_name'] = 'Ojetivo del nombre de sitio';
$lang->is_search_option['trackback']['title'] = 'Título';
$lang->is_search_option['trackback']['excerpt'] = 'Contenido';
$lang->is_sort_option['regdate'] = 'Fecha del registro';
$lang->is_sort_option['comment_count'] = 'Número de commentarios';
$lang->is_sort_option['readed_count'] = 'Número de query';

View file

@ -7,6 +7,14 @@ $lang->msg_no_keyword = 'Entrez le mot de clé à rechercher, S.V.P.';
$lang->is_result_text = 'Il y a <strong>%d</strong> résultat(s) pour <strong>\'%s\'</strong>';
$lang->include_search_target = 'Seulement dans certaines cibles ';
$lang->exclude_search_target = 'Recherche de la destination sélectionnée à partir de';
$lang->is_search_option['document']['title_content'] = 'Titre+Contenu';
$lang->is_search_option['document']['title'] = 'Titre';
$lang->is_search_option['document']['content'] = 'Contenu';
$lang->is_search_option['document']['tag'] = 'Balise';
$lang->is_search_option['trackback']['url'] = 'URL objectif';
$lang->is_search_option['trackback']['blog_name'] = 'Nom du Site objectif';
$lang->is_search_option['trackback']['title'] = 'Titre';
$lang->is_search_option['trackback']['excerpt'] = 'Contenu';
$lang->is_sort_option['regdate'] = 'Enrégistré';
$lang->is_sort_option['comment_count'] = 'Commentaires';
$lang->is_sort_option['readed_count'] = 'Vues';

View file

@ -11,6 +11,14 @@ $lang->is_result_text = '<strong>\'%s\'</strong>に対する検索結果<strong>
$lang->multimedia = '画像/動画';
$lang->include_search_target = '選択された対象のみ';
$lang->exclude_search_target = '選択した対象を検索から除外';
$lang->is_search_option['document']['title_content'] = 'タイトル+内容';
$lang->is_search_option['document']['title'] = 'タイトル';
$lang->is_search_option['document']['content'] = '内容';
$lang->is_search_option['document']['tag'] = 'タグ';
$lang->is_search_option['trackback']['url'] = '対象URL';
$lang->is_search_option['trackback']['blog_name'] = '対象サイト(ブログ)名';
$lang->is_search_option['trackback']['title'] = 'タイトル';
$lang->is_search_option['trackback']['excerpt'] = '内容';
$lang->is_sort_option['regdate'] = '登録日';
$lang->is_sort_option['comment_count'] = 'コメント数';
$lang->is_sort_option['readed_count'] = '閲覧数';

View file

@ -11,6 +11,14 @@ $lang->is_result_text = '<strong>\'%s\'</strong>에 대한 검색결과 <strong>
$lang->multimedia = '이미지/동영상';
$lang->include_search_target = '선택된 대상만 검색';
$lang->exclude_search_target = '선택된 대상을 검색에서 제외';
$lang->is_search_option['document']['title_content'] = '제목+내용';
$lang->is_search_option['document']['title'] = '제목';
$lang->is_search_option['document']['content'] = '내용';
$lang->is_search_option['document']['tag'] = '태그';
$lang->is_search_option['trackback']['url'] = '대상 URL';
$lang->is_search_option['trackback']['blog_name'] = '대상 사이트 이름';
$lang->is_search_option['trackback']['title'] = '제목';
$lang->is_search_option['trackback']['excerpt'] = '내용';
$lang->is_sort_option['regdate'] = '등록일';
$lang->is_sort_option['comment_count'] = '댓글 수';
$lang->is_sort_option['readed_count'] = '조회 수';

View file

@ -9,6 +9,14 @@ $lang->is_result_text = '<strong>%d</strong> результатов для <stro
$lang->multimedia = 'Картинки/Видео';
$lang->include_search_target = 'Поиск только для выбранных модулей';
$lang->exclude_search_target = 'Исключить выбранные модули из поиска';
$lang->is_search_option['document']['title_content'] = 'Заголовок+Содержание';
$lang->is_search_option['document']['title'] = 'Тема';
$lang->is_search_option['document']['content'] = 'Содержание';
$lang->is_search_option['document']['tag'] = 'Теги';
$lang->is_search_option['trackback']['url'] = 'URL';
$lang->is_search_option['trackback']['blog_name'] = 'Имя сайта';
$lang->is_search_option['trackback']['title'] = 'Заголовок';
$lang->is_search_option['trackback']['excerpt'] = 'Содержание';
$lang->is_sort_option['regdate'] = 'Дата регистрации';
$lang->is_sort_option['comment_count'] = 'Кол-во комментариев';
$lang->is_sort_option['readed_count'] = 'Кол-во хитов';

View file

@ -8,6 +8,14 @@ $lang->is_result_text = '<strong>\'%s\'</strong> için yaklaşık <strong>%d</st
$lang->multimedia = 'Resimler/ Görüntüler';
$lang->include_search_target = 'Seçili modüller içinde ara';
$lang->exclude_search_target = 'Seçili modülleri arama dışında tut';
$lang->is_search_option['document']['title_content'] = 'Konu+İçerik';
$lang->is_search_option['document']['title'] = 'Konu';
$lang->is_search_option['document']['content'] = 'İçerik';
$lang->is_search_option['document']['tag'] = 'Etiketler';
$lang->is_search_option['trackback']['url'] = 'Hedef URL';
$lang->is_search_option['trackback']['blog_name'] = 'Hedef Site İsmi';
$lang->is_search_option['trackback']['title'] = 'Başlık';
$lang->is_search_option['trackback']['excerpt'] = 'Alıntı';
$lang->is_sort_option['regdate'] = 'Kayıt Zamanı';
$lang->is_sort_option['comment_count'] = 'Yorum Sayısı';
$lang->is_sort_option['readed_count'] = 'Tıklanma Sayısı';

View file

@ -6,6 +6,14 @@ $lang->about_sample_code = 'Bạn có thể sử dụng chức năng tìm kiếm
$lang->msg_no_keyword = 'Hãy nhập từ khóa để tìm kiếm!';
$lang->is_result_text = 'Tìm thấy <strong>%d</strong> kết quả cho <strong>\'%s\'</strong>';
$lang->multimedia = 'Hình ảnh/ Video';
$lang->is_search_option['document']['title_content'] = 'T.Đề+N.Dung';
$lang->is_search_option['document']['title'] = 'Tiêu đề';
$lang->is_search_option['document']['content'] = 'Nội dung';
$lang->is_search_option['document']['tag'] = 'Tag';
$lang->is_search_option['trackback']['url'] = 'URL';
$lang->is_search_option['trackback']['blog_name'] = 'Tên Website';
$lang->is_search_option['trackback']['title'] = 'Tiêu đề';
$lang->is_search_option['trackback']['excerpt'] = 'Trích mô tả';
$lang->is_sort_option['regdate'] = 'Ngày gửi';
$lang->is_sort_option['comment_count'] = 'Số bình luận';
$lang->is_sort_option['readed_count'] = 'Lượt xem';

View file

@ -11,6 +11,14 @@ $lang->is_result_text = '符合<strong>\'%s\'</strong>的搜索结果约有<stro
$lang->multimedia = '图片/视频';
$lang->include_search_target = '只搜索所选对象';
$lang->exclude_search_target = '所选对象从搜索中排除';
$lang->is_search_option['document']['title_content'] = '标题+内容';
$lang->is_search_option['document']['title'] = '标题';
$lang->is_search_option['document']['content'] = '内容';
$lang->is_search_option['document']['tag'] = '标签';
$lang->is_search_option['trackback']['url'] = '对象URL';
$lang->is_search_option['trackback']['blog_name'] = '对象网站名称';
$lang->is_search_option['trackback']['title'] = '标题';
$lang->is_search_option['trackback']['excerpt'] = '内容';
$lang->is_sort_option['regdate'] = '日期';
$lang->is_sort_option['comment_count'] = '评论';
$lang->is_sort_option['readed_count'] = '查看';

View file

@ -11,6 +11,14 @@ $lang->is_result_text = '符合<strong>\'%s\'</strong>的搜尋結果,約有<s
$lang->multimedia = '圖片/影片';
$lang->include_search_target = '尋找所選模組';
$lang->exclude_search_target = '排除所選模組';
$lang->is_search_option['document']['title_content'] = '標題+內容';
$lang->is_search_option['document']['title'] = '標題';
$lang->is_search_option['document']['content'] = '內容';
$lang->is_search_option['document']['tag'] = '標籤';
$lang->is_search_option['trackback']['url'] = '目標網址';
$lang->is_search_option['trackback']['blog_name'] = '目標網站名稱';
$lang->is_search_option['trackback']['title'] = '標題';
$lang->is_search_option['trackback']['excerpt'] = '內容';
$lang->is_sort_option['regdate'] = '日期';
$lang->is_sort_option['comment_count'] = '評論';
$lang->is_sort_option['readed_count'] = '檢視';

View file

@ -21,6 +21,7 @@
<action name="dispMemberResendAuthMail" type="view" standalone="true" />
<action name="dispSavedDocumentList" type="view" standalone="true" />
<action name="dispMemberSpammer" type="view" standalone="true" />
<action name="dispMemberModifyNicknameLog" type="view" standalone="true" />
<action name="dispMemberAdminList" type="view" index="true" admin_index="true" menu_name="userList" menu_index="true"/>
<!--action name="dispMemberAdminConfig" type="view" menu_name="userSetting" menu_index="true" /-->

View file

@ -114,6 +114,7 @@ $lang->cmd_trace_comment = '작성 댓글 추적';
$lang->cmd_view_scrapped_document = '스크랩 보기';
$lang->cmd_view_saved_document = '저장함 보기';
$lang->cmd_send_email = '메일 보내기';
$lang->cmd_modify_nickname_log = '닉네임 변경 기록';
$lang->msg_email_not_exists = '이메일 주소가 존재하지 않습니다.';
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다.';
$lang->msg_cart_is_null = '대상을 선택해주세요.';
@ -216,6 +217,7 @@ $lang->about_ssl_port = '기본 포트 이외의 보안접속(SSL) 포트를 사
$lang->about_reset_auth_mail = '현재등록된 이메일 주소는 %s입니다. 이메일 주소를 변경하고자 하는 경우 새로운 이메일 주소로 회원정보 갱신 후 인증메일을 재발송할 수 있습니다.';
$lang->about_resend_auth_mail = '인증 메일을 받지 못한 경우 다시 받을 수 있습니다.';
$lang->about_reset_auth_mail_submit = '이메일을 로그인 계정으로 사용할 경우 신규 메일주소로 로그인해야 합니다.';
$lang->about_update_nickname_log = '닉네임 로그를 기록합니다. 이 옵션을 사용하게 되면, 닉네임변경이력을 남기도록 할 수 있습니다.';
$lang->no_article = '글이 없습니다.';
$lang->find_account_question = '비밀번호 찾기 질문/답변';
$lang->find_account_answer = '비밀번호 찾기 답변';
@ -309,3 +311,5 @@ $lang->spammer_description = '<p>지정된 회원을 차단하고, 회원이 남
$lang->btn_spammer_delete_all = '모두 삭제';
$lang->spammer_move_to_trash = '휴지통으로 이동';
$lang->msg_spammer_complete = '완료되었습니다.';
$lang->nick_name_before_changing = '닉네임 변경 전';
$lang->nick_name_after_changing = '닉네임 변경 후';

View file

@ -36,6 +36,14 @@
.lt{margin:0;padding:0;list-style:none;background:#f8f8f8;font-size:14px}
.lt li{border-bottom:1px solid #ccc8be;overflow:hidden}
.lt a{box-sizing: border-box;width:100%;display:inline-block;float:left;text-decoration:none;color:#000;padding:10px}
.lt span{
display:inline-block;
padding:5px;
}
.lt span.before-color:after{
content:"→";
margin-left:10px;
}
.lt .memberInfo{float:right;}
.lt .notice{display:inline-block;background:#a06acd;font-weight:bold;color:#fff;font-size:12px;padding:1px;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px}
.lt .title{display:block;margin:0 0 5px 0}

View file

@ -0,0 +1,18 @@
<include target="./common_header.html" />
<div class="xm">
<h2 class="hx h2">{$member_title = $lang->cmd_modify_nickname_log}</h2>
<ul class="lt">
<li loop="$nickname_list => $val">
{zdate($val->regdate, "Y-m-d")}
<span class="before-color">{$val->before_nick_name}</span>
<span class="after-color">{$val->after_nick_name}</span>
</li>
</ul>
<div class="pn">
<a cond="$page != 1" href="{getUrl('page',$page-1,'module_srl','')}" class="prev">{$lang->cmd_prev}</a>
<strong>{$page} / {$page_navigation->last_page}</strong>
<a cond="$page != $page_navigation->last_page" href="{getUrl('page',$page+1,'module_srl','')}" class="next">{$lang->cmd_next}</a>
</div>
</div>
<include target="./common_footer.html" />

View file

@ -24,12 +24,12 @@ class memberAdminController extends member
// if(Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request");
// Extract the necessary information in advance
$logged_info = Context::get('logged_info');
if($logged_info->is_admin !== 'Y' || !checkCSRF())
if($logged_info->is_admin != 'Y' || !checkCSRF())
{
return new Object(-1, 'msg_invalid_request');
}
$args = new stdClass;
$args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date');
$oMemberModel = &getModel ('member');
$config = $oMemberModel->getMemberConfig ();
$getVars = array();
@ -47,7 +47,7 @@ class memberAdminController extends member
{
$args->{$val} = Context::get($val);
}
$args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date');
$args->member_srl = Context::get('member_srl');
if(Context::get('reset_password'))
$args->password = Context::get('reset_password');
else unset($args->password);
@ -162,7 +162,8 @@ class memberAdminController extends member
'password_strength',
'password_hashing_algorithm',
'password_hashing_work_factor',
'password_hashing_auto_upgrade'
'password_hashing_auto_upgrade',
'update_nickname_log'
);
$oPassword = new Password();

View file

@ -1885,6 +1885,7 @@ class memberController extends member
$this->addMemberMenu( 'dispMemberScrappedDocument', 'cmd_view_scrapped_document');
$this->addMemberMenu( 'dispMemberSavedDocument', 'cmd_view_saved_document');
$this->addMemberMenu( 'dispMemberOwnDocument', 'cmd_view_own_document');
$this->addMemberMenu( 'dispMemberModifyNicknameLog', 'cmd_modify_nickname_log');
}
/**
@ -2273,6 +2274,18 @@ class memberController extends member
$oDB->rollback();
return $output;
}
else
{
if($args->nick_name != $orgMemberInfo->nick_name && $config->update_nick_log == 'Y')
{
$log_args = new stdClass();
$log_args->member_srl = $args->member_srl;
$log_args->before_nick_name = $orgMemberInfo->nick_name;
$log_args->after_nick_name = $args->nick_name;
$log_args->user_id = $args->user_id;
$log_output = executeQuery('member.insertMemberModifyNickName', $log_args);
}
}
if($args->group_srl_list)
{
@ -2397,6 +2410,7 @@ class memberController extends member
$oDB->rollback();
return $output;
}
executeQuery('member.deleteMemberModifyNickNameLog', $args);
// TODO: If the table is not an upgrade may fail.
/*

View file

@ -687,6 +687,7 @@ class memberModel extends member
$column_title = $join_form_list[$i]->column_title;
$default_value = $join_form_list[$i]->default_value;
// Add language variable
if(!isset($lang->extend_vars)) $lang->extend_vars = array();
$lang->extend_vars[$column_name] = $column_title;
// unserialize if the data type if checkbox, select and so on
if(in_array($column_type, array('checkbox','select','radio')))

View file

@ -688,7 +688,40 @@ class memberView extends member
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('spammer');
}
/**
* Member Nickname Log
* @return void
*/
function dispMemberModifyNicknameLog()
{
$member_srl = Context::get('member_srl');
$logged_info = Context::get('logged_info');
if(!$member_srl)
{
$member_srl = $logged_info->member_srl;
}
else
{
if($logged_info->is_admin != 'Y')
{
return new Object(-1, 'msg_not_permitted');
}
}
$args = new stdClass();
$args->member_srl = $member_srl;
$args->page = Context::get('page');
$output = executeQuery('member.getMemberModifyNickName', $args);
Context::set('total_count', $output->page_navigation->total_count);
Context::set('total_page', $output->page_navigation->total_page);
Context::set('page', $output->page);
Context::set('nickname_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
$this->setTemplateFile('member_nick');
}
}
/* End of file member.view.php */
/* Location: ./modules/member/member.view.php */

View file

@ -0,0 +1,8 @@
<query id="deleteMemberModifyNickNameLog" action="delete">
<tables>
<table name="member_nickname_log" />
</tables>
<conditions>
<condition operation="equal" column="member_srl" var="member_srl" filter="number" notnull="notnull" />
</conditions>
</query>

View file

@ -0,0 +1,17 @@
<query id="getMemberModifyNickName" action="select">
<tables>
<table name="member_nickname_log" />
</tables>
<columns>
<column name="*"/>
</columns>
<conditions>
<condition operation="equal" column="member_srl" var="member_srl" notnull="notnull" />
</conditions>
<navigation>
<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" />
</navigation>
</query>

View file

@ -0,0 +1,12 @@
<query id="insertMemberModifyNickName" action="insert">
<tables>
<table name="member_nickname_log" />
</tables>
<columns>
<column name="member_srl" var="member_srl" filter="number" notnull="notnull" />
<column name="before_nick_name" var="before_nick_name" notnull="notnull" />
<column name="after_nick_name" var="after_nick_name" notnull="notnull" />
<column name="user_id" var="user_id" notnull="notnull" />
<column name="regdate" var="regdate" default="curdate()" />
</columns>
</query>

View file

@ -0,0 +1,7 @@
<table name="member_nickname_log">
<column name="member_srl" type="number" size="11" notnull="notnull" />
<column name="before_nick_name" type="varchar" size="80" notnull="notnull" />
<column name="after_nick_name" type="varchar" size="80" notnull="notnull" />
<column name="regdate" type="date" index="idx_regdate" />
<column name="user_id" type="varchar" size="80" />
</table>

View file

@ -0,0 +1,35 @@
<include target="./common_header.html" />
<h1>{$member_title = $lang->cmd_modify_nickname_log}</h1>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>{$lang->date}</th>
<th>{$lang->nick_name_before_changing}</th>
<th class="title">{$lang->nick_name_after_changing}</th>
</tr>
</thead>
<tbody>
<tr loop="$nickname_list => $val">
<td>
{zdate($val->regdate,"Y-m-d H:i:s")}
</td>
<td>
{$val->before_nick_name}
</td>
<td>
{$val->after_nick_name}
</td>
</tr>
</tbody>
</table>
<div class="pagination pagination-centered">
<ul>
<li><a href="{getUrl('page','','module_srl','')}" class="direction">&laquo; {$lang->first_page}</a></li>
<!--@while($page_no = $page_navigation->getNextPage())-->
<li class="active"|cond="$page == $page_no"><a href="{getUrl('page',$page_no,'module_srl','')}">{$page_no}</a></li>
<!--@end-->
<li><a href="{getUrl('page',$page_navigation->last_page,'module_srl','')}" class="direction">{$lang->last_page} &raquo;</a></li>
</ul>
</div>
<include target="./common_footer.html" />

View file

@ -20,6 +20,14 @@
<p class="x_help-block">{$lang->about_enable_confirm}</p>
</div>
</div>
<div class="x_control-group">
<div class="x_control-label">{$lang->cmd_modify_nickname_log}</div>
<div class="x_controls">
<label class="x_inline" for="update_nickname_log_yes"><input type="radio" name="update_nickname_log" id="update_nickname_log_yes" value="Y" checked="checked"|cond="$config->update_nickname_log == 'Y'" /> {$lang->cmd_yes}</label>
<label class="x_inline" for="update_nickname_log_no"><input type="radio" name="update_nickname_log" id="update_nickname_log_no" value="N" checked="checked"|cond="$config->update_nickname_log != 'Y'"/> {$lang->cmd_no}</label>
<p class="x_help-block">{$lang->about_update_nickname_log}</p>
</div>
</div>
<div class="x_control-group">
<div class="x_control-label">{$lang->enable_find_account_question}</div>
<div class="x_controls">

View file

@ -60,6 +60,19 @@ class moduleController extends module
return $output;
}
/**
* @brief Add trigger callback function
*
* @param string $trigger_name
* @param string $called_position
* @param callable $callback_function
*/
function addTriggerFunction($trigger_name, $called_position, $callback_function)
{
$GLOBALS['__trigger_functions__'][$trigger_name][$called_position][] = $callback_function;
return true;
}
/**
* @brief Add module trigger
* module trigger is to call a trigger to a target module

View file

@ -625,6 +625,21 @@ class moduleModel extends module
}
}
/**
* @brief Get trigger functions
*/
function getTriggerFunctions($trigger_name, $called_position)
{
if(isset($GLOBALS['__trigger_functions__'][$trigger_name][$called_position]))
{
return $GLOBALS['__trigger_functions__'][$trigger_name][$called_position];
}
else
{
return array();
}
}
/**
* @brief Get a list of all triggers on the trigger_name
*/

View file

@ -0,0 +1,77 @@
<?php
class IpFilterTest extends \Codeception\TestCase\Test
{
public function testIPv4CIDR()
{
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('10.0.127.191', '10.0.127.191'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('10.1.131.177', '10.1.131.178'));
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('127.0.0.1', '127.0.0.0/8'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('172.34.0.0', '172.16.0.0/12'));
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('192.168.18.214', '192.168.16.0/22'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('192.168.18.214', '192.168.16.0/23'));
}
public function testIPv6CIDR()
{
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('::1', '::1/128'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('::1', '::2'));
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('2400:cb00::1234', '2400:cb00::/32'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('2405:8100::1234', '2400:cb00::/32'));
}
public function testIPv4Wildcard()
{
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.134.*'));
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.*.*'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.136.*'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.172.*.*'));
}
public function testIPv4Hyphen()
{
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.134.0-192.168.134.255'));
$this->assertTrue(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.128.16-192.168.145.0'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.134.242-192.168.244.7'));
$this->assertFalse(Rhymix\Framework\IpFilter::inRange('192.168.134.241', '192.168.100.255-192.168.133.19'));
}
public function testValidator()
{
$this->assertTrue(Rhymix\Framework\IpFilter::validateRange('192.168.0.1'));
$this->assertTrue(Rhymix\Framework\IpFilter::validateRange('192.168.0.0/16'));
$this->assertTrue(Rhymix\Framework\IpFilter::validateRange('192.168.*.*'));
$this->assertTrue(Rhymix\Framework\IpFilter::validateRange('192.168.*'));
$this->assertTrue(Rhymix\Framework\IpFilter::validateRange('192.168.0.0-192.168.255.255'));
$this->assertTrue(Rhymix\Framework\IpFilter::validateRange('2400:cb00::/32'));
$this->assertFalse(Rhymix\Framework\IpFilter::validateRange('192.168.0.0~192.168.255.255'));
}
public function testLegacy()
{
$this->assertTrue(\IpFilter::filter(array('192.168.134.241'), '192.168.134.241'));
$this->assertTrue(\IpFilter::filter(array('192.168.134.0-192.168.134.255'), '192.168.134.241'));
$this->assertTrue(\IpFilter::filter(array('127.0.0.1', '192.168.134.241'), '192.168.134.241'));
$this->assertTrue(\IpFilter::filter(array('192.168.134.*'), '192.168.134.241'));
$this->assertTrue(\IpFilter::filter(array('192.168.*'), '192.168.134.241'));
$this->assertFalse(\IpFilter::filter(array('127.0.0.1'), '192.168.134.241'));
}
public function testCloudFlareRealIP()
{
$_SERVER['HTTP_CF_CONNECTING_IP'] = '192.168.134.241';
$_SERVER['REMOTE_ADDR'] = '192.168.10.1';
$this->assertFalse(Rhymix\Framework\IpFilter::getCloudFlareRealIP());
$this->assertEquals('192.168.10.1', $_SERVER['REMOTE_ADDR']);
$_SERVER['REMOTE_ADDR'] = '108.162.192.121';
$this->assertEquals('192.168.134.241', Rhymix\Framework\IpFilter::getCloudFlareRealIP());
$this->assertEquals('192.168.134.241', $_SERVER['REMOTE_ADDR']);
unset($_SERVER['HTTP_CF_CONNECTING_IP']);
$_SERVER['REMOTE_ADDR'] = '192.168.10.1';
$this->assertFalse(Rhymix\Framework\IpFilter::getCloudFlareRealIP());
$this->assertEquals('192.168.10.1', $_SERVER['REMOTE_ADDR']);
}
}

View file

@ -0,0 +1,34 @@
<?php
class LangTest extends \Codeception\TestCase\Test
{
public function testLang()
{
$ko = Rhymix\Framework\Lang::getInstance('ko');
$en = Rhymix\Framework\Lang::getInstance('en');
$this->assertTrue($ko instanceof Rhymix\Framework\Lang);
$this->assertTrue($en instanceof Rhymix\Framework\Lang);
$this->assertFalse($ko === $en);
$ja = Rhymix\Framework\Lang::getInstance('ja');
$jp = Rhymix\Framework\Lang::getInstance('jp');
$this->assertTrue($ja === $jp);
$this->assertEquals('도움말', $ko->get('common.help'));
$this->assertEquals('Help', $en->get('common.help'));
$this->assertEquals('도움말', $ko->help);
$this->assertEquals('Help', $en->help);
$this->assertEquals('nonexistent', $ko->get('common.nonexistent'));
$this->assertEquals('nonexistent', $ko->get('common.nonexistent', 'foo', 'bar'));
$this->assertEquals('help', $ja->help);
$ja->loadPlugin('common');
$this->assertEquals('ヘルプ', $ja->help);
$ko->foobartestlang = '%s님 안녕하세요?';
$this->assertEquals('Travis님 안녕하세요?', $ko->foobartestlang('Travis'));
$en->foobartestlang = 'Hello, %s!';
$this->assertEquals('Hello, Travis!', $en->get('foobartestlang', 'Travis'));
}
}