mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-30 17:25:25 +09:00
Merge branch 'develop' into next
This commit is contained in:
commit
0f469baae8
40 changed files with 384 additions and 157 deletions
|
|
@ -32,6 +32,23 @@ class boardController extends board
|
|||
$obj->module_srl = $this->module_srl;
|
||||
$obj->commentStatus = $obj->comment_status;
|
||||
|
||||
// Remove disallowed Unicode symbols.
|
||||
if ($this->module_info->filter_specialchars !== 'N')
|
||||
{
|
||||
if (isset($obj->title))
|
||||
{
|
||||
$obj->title = utf8_clean($obj->title);
|
||||
}
|
||||
if (isset($obj->content))
|
||||
{
|
||||
$obj->content = utf8_clean($obj->content);
|
||||
}
|
||||
if (isset($obj->tags))
|
||||
{
|
||||
$obj->tags = utf8_clean($obj->tags);
|
||||
}
|
||||
}
|
||||
|
||||
// Return error if content is empty.
|
||||
if (is_empty_html_content($obj->content))
|
||||
{
|
||||
|
|
@ -368,6 +385,15 @@ class boardController extends board
|
|||
$obj = Context::getRequestVars();
|
||||
$obj->module_srl = $this->module_srl;
|
||||
|
||||
// Remove disallowed Unicode symbols.
|
||||
if ($this->module_info->filter_specialchars !== 'N')
|
||||
{
|
||||
if (isset($obj->content))
|
||||
{
|
||||
$obj->content = utf8_clean($obj->content);
|
||||
}
|
||||
}
|
||||
|
||||
// Return error if content is empty.
|
||||
if (is_empty_html_content($obj->content))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ $lang->about_allow_no_category = 'Allow users to write documents without selecti
|
|||
$lang->protect_content = 'Protect Content';
|
||||
$lang->protect_comment = 'Protect Comment';
|
||||
$lang->protect_regdate = 'Update/Delete Time Limit';
|
||||
$lang->cancel_vote = 'Vote Cancellation';
|
||||
$lang->filter_specialchars = 'Block Abuse of Unicode Symbols';
|
||||
$lang->document_length_limit = 'Limit Document Size';
|
||||
$lang->comment_length_limit = 'Limit Comment Size';
|
||||
$lang->about_document_length_limit = 'Restrict documents that are too large. This limit may be triggered by copying and pasting a web page that contains a lot of unnecessary tags.';
|
||||
|
|
@ -64,6 +66,8 @@ $lang->about_comment_length_limit = 'Restrict comments that are too large.';
|
|||
$lang->update_order_on_comment = 'Update Document on New Comment';
|
||||
$lang->about_update_order_on_comment = 'When a new comment is posted, update the update timestamp of the parent document. This is needed for forums.';
|
||||
$lang->non_login_vote = 'Allow guest votes';
|
||||
$lang->about_cancel_vote = 'Allow users to cancel their votes';
|
||||
$lang->about_filter_specialchars = 'Prevent use of excessive Unicode accents, RLO characters, and other symbols that hinder readability.';
|
||||
$lang->document_force_to_move = 'Delete to Trash';
|
||||
$lang->about_document_force_to_move = 'When a document is deleted, move to Trash instead of deleting it permamently.';
|
||||
$lang->about_non_login_vote = 'Allow users who are not logged in to vote on articles.';
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ $lang->protect_content = '글 보호 기능';
|
|||
$lang->protect_comment = '댓글 보호 기능';
|
||||
$lang->protect_regdate = '기간 제한 기능';
|
||||
$lang->cancel_vote = '추천/비추천/신고 취소 허용';
|
||||
$lang->filter_specialchars = '유니코드 특수문자 오남용 금지';
|
||||
$lang->document_length_limit = '문서 길이 제한';
|
||||
$lang->comment_length_limit = '댓글 길이 제한';
|
||||
$lang->about_document_length_limit = '지나치게 용량이 큰 글을 작성하지 못하도록 합니다. 지저분한 태그가 많이 붙은 글을 붙여넣기하면 제한을 초과할 수도 있습니다.';
|
||||
|
|
@ -67,6 +68,7 @@ $lang->update_order_on_comment = '댓글 작성시 글 수정 시각 갱신';
|
|||
$lang->about_update_order_on_comment = '댓글이 작성되면 해당 글의 수정 시각을 갱신합니다. 포럼형 게시판, 최근 댓글 표시 기능 등에 필요합니다.';
|
||||
$lang->non_login_vote = '비회원 추천 허용';
|
||||
$lang->about_cancel_vote = '추천 비추천 신고를 취소할 수 있습니다.';
|
||||
$lang->about_filter_specialchars = '가독성에 악영향을 주는 과도한 유니코드 악센트 기호의 조합, RLO 문자 등의 사용을 금지합니다.';
|
||||
$lang->about_non_login_vote = '로그인하지 않은 방문자도 추천할 수 있도록 합니다.';
|
||||
$lang->about_protect_regdate = '글이나 댓글을 작성한 후 일정 기간이 지나면 수정 또는 삭제할 수 없도록 합니다. (단위 : day)';
|
||||
$lang->about_protect_content = '댓글이 달린 글은 수정 또는 삭제할 수 없도록 합니다.';
|
||||
|
|
|
|||
|
|
@ -330,6 +330,18 @@
|
|||
<p class="x_help-block">{$lang->about_cancel_vote}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->filter_specialchars}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="filter_specialchars_y" name="filter_specialchars" value="Y" checked="checked"|cond="$module_info->filter_specialchars !== 'N'" /> {$lang->cmd_yes}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="filter_specialchars_n" name="filter_specialchars" value="N" checked="checked"|cond="$module_info->filter_specialchars === 'N'" /> {$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_filter_specialchars}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->protect_content}</label>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -156,15 +156,18 @@ class commentController extends comment
|
|||
|
||||
function updateVotedCountCancel($comment_srl, $oComment, $point)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$_SESSION['voted_comment'][$comment_srl] && !$this->user->member_srl)
|
||||
{
|
||||
return new BaseObject(-1, $point > 0 ? 'failed_voted_canceled' : 'failed_blamed_canceled');
|
||||
}
|
||||
|
||||
// Check if the current user has voted previously.
|
||||
$args = new stdClass;
|
||||
$args->comment_srl = $comment_srl;
|
||||
$args->point = $point;
|
||||
if($logged_info->member_srl)
|
||||
if($this->user->member_srl)
|
||||
{
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$args->member_srl = $this->user->member_srl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -200,7 +203,7 @@ class commentController extends comment
|
|||
$args = new stdClass();
|
||||
$d_args = new stdClass();
|
||||
$args->comment_srl = $d_args->comment_srl = $comment_srl;
|
||||
$d_args->member_srl = $logged_info->member_srl;
|
||||
$d_args->member_srl = $this->user->member_srl;
|
||||
if ($trigger_obj->update_target === 'voted_count')
|
||||
{
|
||||
$args->voted_count = $trigger_obj->after_point;
|
||||
|
|
@ -215,7 +218,7 @@ class commentController extends comment
|
|||
if(!$d_output->toBool()) return $d_output;
|
||||
|
||||
//session reset
|
||||
$_SESSION['voted_comment'][$comment_srl] = false;
|
||||
unset($_SESSION['voted_comment'][$comment_srl]);
|
||||
|
||||
// Call a trigger (after)
|
||||
ModuleHandler::triggerCall('comment.updateVotedCountCancel', 'after', $trigger_obj);
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ class documentController extends document
|
|||
if(!$d_output->toBool()) return $d_output;
|
||||
}
|
||||
// session reset
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
unset($_SESSION['voted_document'][$document_srl]);
|
||||
|
||||
// Call a trigger (after)
|
||||
ModuleHandler::triggerCall('document.updateVotedCountCancel', 'after', $trigger_obj);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
{@ $css_file_list[] = $additional_css_url}
|
||||
<!--@endforeach-->
|
||||
|
||||
{@ $css_content = null }
|
||||
{@ $css_content = "" }
|
||||
|
||||
<!--@if($enable_autosave)-->
|
||||
<input type="hidden" name="_saved_doc_title" value="{escape($saved_doc->title)}" />
|
||||
|
|
@ -158,7 +158,7 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
settings.ckeconfig.removePlugins = (settings.ckeconfig.removePlugins ? (settings.ckeconfig.removePlugins + ',') : '') + 'enterkey';
|
||||
settings.loadXeComponent = false;
|
||||
var additional_styles = '.cke_wysiwyg_div { padding: 8px !important; }';
|
||||
$('head').append('<st' + 'yle>' + additional_styles + css_content.replace(/\.xe_content\.editable/g, '.cke_wysiwyg_div') + '</st' + 'yle>');
|
||||
$('head').append('<st' + 'yle>' + additional_styles + String(css_content).replace(/\.xe_content\.editable/g, '.cke_wysiwyg_div') + '</st' + 'yle>');
|
||||
}
|
||||
|
||||
<!--@if($editor_toolbar === 'simple')-->
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<load target="js/interface.js" />
|
||||
|
||||
<div id="simpleeditor_wrapper_{$editor_sequence}" class="rx_simpleeditor_wrapper">
|
||||
<div id="simpleeditor_instance_{$editor_sequence}" class="rx_simpleeditor {$colorset} rhymix_content" contenteditable="true"
|
||||
<div id="simpleeditor_instance_{$editor_sequence}" class="rx_simpleeditor {$colorset} rhymix_content editable" contenteditable="true"
|
||||
data-editor-sequence="{$editor_sequence}"
|
||||
data-editor-primary-key-name="{$editor_primary_key_name}"
|
||||
data-editor-content-key-name="{$editor_content_key_name}"
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@
|
|||
str = str.replace(/<\/?(\?xml|meta|link|font|span|style|script|noscript|frame|noframes|(?:st1|o):[a-z0-9]+)\b[^>]*?>/ig, '');
|
||||
str = str.replace(/(id|class|style|on(?:[a-z0-9]+)|Mso(?:[a-z0-9]+))="[^"]*"/ig, '');
|
||||
str = str.replace(/(<\/?)div(\W)/g, '$1p$2');
|
||||
if (!str.match(/<\/?p>/)) {
|
||||
str = '<p>' + str + '</p>';
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->editor_toolbar || $editor_config->editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_editor_toolbar || $editor_config->mobile_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->mobile_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="comment_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->comment_editor_toolbar || $editor_config->comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
@ -147,7 +147,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_comment_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_comment_editor_toolbar || $editor_config->mobile_comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->editor_toolbar || $editor_config->editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->comment_editor_toolbar || $editor_config->comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_editor_toolbar || $editor_config->mobile_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->mobile_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_comment_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_comment_editor_toolbar || $editor_config->mobile_comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
<option value="simple" selected="selected"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,6 @@ $lang->about_ttxml_user_id = 'Por favor, de entrada ID de usuario establecer com
|
|||
$lang->about_type_module = 'Seleccione esta opción si estas transfeririendo información del documento de los tableros';
|
||||
$lang->about_type_syncmember = 'Seleccione esta opción cuando tenga que sincronizar la información del usuario luego de haber transferido la información del usuario y del artículo.';
|
||||
$lang->about_importer = 'Es posible trasferir los datos de Zeroboard4, zb5beta o de otros programas a Rhymix.
|
||||
Para la transferencia debe utilizar <a href="http://www.xpressengine.com/index.php?mid=download&category_srl=18324038" target="_blank">XML Exporter</a> para transformar los datos en archivo XML, y luego subir ese archivo.';
|
||||
Para la transferencia debe utilizar <a href="https://github.com/xpressengine/xe-migration-tool" target="_blank">XML Exporter</a> para transformar los datos en archivo XML, y luego subir ese archivo.';
|
||||
$lang->about_target_path = 'Para descargar los archivos adjuntos de ZeroBoard4, ingresa la ubicación de ZeroBoard4 instalado.
|
||||
Si esta en el mismo servidor escriba la ubicación de ZeroBoard4 como por ejemplo: /home/ID/public_html/bbs o si esta en otro servidor escriba la ubicación de ZeroBoard4 instalado como por ejemplo: http://dominio/bbs';
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ $lang->about_type_ttxml = '데이터 이전 대상이 TTXML(textcube계열)일
|
|||
$lang->about_ttxml_user_id = '글쓴이로 설정할 사용자 아이디를 입력해주세요. (가입된 아이디만 가능)';
|
||||
$lang->about_type_module = '데이터 이전 대상이 게시판 등의 게시물 정보일 경우 선택해주세요.';
|
||||
$lang->about_type_syncmember = '회원정보와 게시물정보 등을 이전 후, 회원정보를 동기화해야 할 때 선택해주세요.';
|
||||
$lang->about_importer = '다른 프로그램의 데이터를 XML 형식으로 변환 후 업로드하면 Rhymix로 이전할 수 있습니다. <a href="http://www.xpressengine.com/index.php?mid=download&category_srl=18324038" target="_blank">XML Exporter</a>를 이용하면 XML파일로 변환할 수 있습니다.';
|
||||
$lang->about_importer = '다른 프로그램의 데이터를 XML 형식으로 변환 후 업로드하면 Rhymix로 이전할 수 있습니다. <a href="https://xe1.xpressengine.com/index.php?mid=download&category_srl=18324038" target="_blank">XML Exporter</a>를 이용하면 XML파일로 변환할 수 있습니다.';
|
||||
$lang->about_target_path = '첨부 파일을 받기 위해 제로보드4가 설치된 위치를 입력해주세요.
|
||||
같은 서버에 있을 경우 /home/아이디/public_html/bbs 등과 같이 제로보드4의 위치를 입력하고
|
||||
다른 서버일 경우 http:도메인/bbs 처럼 제로보드4가 설치된 곳의 url을 입력해주세요.';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div id="footer">
|
||||
Rhymix is a fork of the <a href="https://www.xpressengine.com" target="_blank">XpressEngine</a> CMS<br />
|
||||
Rhymix is a fork of the <a href="https://xe1.xpressengine.com" target="_blank">XpressEngine</a> CMS<br />
|
||||
with additional patches by members of the <a href="https://xetown.com" target="_blank">XETOWN</a> community.<br />
|
||||
Please see our <a href="https://github.com/rhymix/rhymix" target="_blank">GitHub repository</a> for a full timeline of patches and their authors.
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -125,6 +125,9 @@ $lang->cmd_member_list = 'Member List';
|
|||
$lang->cmd_module_config = 'Default Setting';
|
||||
$lang->cmd_member_group = 'Member Groups';
|
||||
$lang->cmd_send_mail = 'Send Mail';
|
||||
$lang->cmd_modify_nickname_log = 'Nickname Change Log';
|
||||
$lang->cmd_nickname_symbols = 'Allow Symbols in Nickname';
|
||||
$lang->cmd_nickname_symbols_list = 'Only Allow:';
|
||||
$lang->cmd_manage_id = 'Prohibited IDs';
|
||||
$lang->cmd_manage_email_host = 'E-mail provider check';
|
||||
$lang->cmd_manage_nick_name = 'Prohibited NickNames';
|
||||
|
|
@ -268,6 +271,7 @@ $lang->msg_feature_deprecated = 'This feature is deprecated.';
|
|||
$lang->msg_question_not_allowed = 'The administrator has disabled this function.';
|
||||
$lang->msg_question_not_exists = 'You haven`t set your question for a temporary password.';
|
||||
$lang->msg_answer_not_matches = 'Your answer for the question is not correct.';
|
||||
$lang->msg_invalid_symbol_in_nickname = 'Your nickname contains a disallowed symbol, \'%s\'.';
|
||||
$lang->change_password_date = 'Password renewal cycle';
|
||||
$lang->about_change_password_date = 'If you set a value to this, you will be notified to change your password periodically. (If set to 0, disabled)';
|
||||
$lang->msg_change_password_date = 'You have not changed the password during %s days. For personal information protection, you need to change the password.';
|
||||
|
|
|
|||
|
|
@ -141,6 +141,8 @@ $lang->cmd_view_scrapped_document = '스크랩 보기';
|
|||
$lang->cmd_view_saved_document = '저장함 보기';
|
||||
$lang->cmd_send_email = '메일 보내기';
|
||||
$lang->cmd_modify_nickname_log = '닉네임 변경 기록';
|
||||
$lang->cmd_nickname_symbols = '닉네임에 특수문자 허용';
|
||||
$lang->cmd_nickname_symbols_list = '다음의 문자만 허용:';
|
||||
$lang->cmd_member_profile_view = '회원 프로필사진 보이기';
|
||||
$lang->cmd_allow_duplicate_nickname = '닉네임 중복 허용';
|
||||
$lang->about_allow_duplicate_nickname = '여러 회원이 동일한 닉네임을 사용하는 것을 허용합니다. 주의: 잘못 사용할 경우 혼란이 발생할 수 있습니다.';
|
||||
|
|
@ -258,6 +260,7 @@ $lang->about_reset_auth_mail = '현재등록된 이메일 주소는 %s입니다.
|
|||
$lang->about_resend_auth_mail = '가입 인증 메일을 받지 못한 경우 다시 받을 수 있습니다.';
|
||||
$lang->about_reset_auth_mail_submit = '이메일을 로그인 계정으로 사용할 경우 신규 메일주소로 로그인해야 합니다.';
|
||||
$lang->about_update_nickname_log = '닉네임 로그를 기록합니다. 이 옵션을 사용하게 되면, 닉네임변경이력을 남기도록 할 수 있습니다.';
|
||||
$lang->about_nickname_symbols = '닉네임에 특수문자를 사용할 수 있도록 허용하거나 금지합니다.';
|
||||
$lang->about_member_profile_view = '관리자 회원목록 페이지에서 프로필 이미지를 볼 수 있는 옵션입니다. 회원목록을 보기 원치 않을 경우에는 아니요를 선택하세요.';
|
||||
$lang->no_article = '글이 없습니다.';
|
||||
$lang->find_account_question = '비밀번호 찾기 질문/답변';
|
||||
|
|
@ -282,6 +285,7 @@ $lang->msg_feature_deprecated = '지원되지 않는 기능입니다.';
|
|||
$lang->msg_question_not_allowed = '질문/답변을 통한 비밀번호 찾기 기능은 이 사이트에서 사용할 수 없습니다.';
|
||||
$lang->msg_question_not_exists = '등록한 비밀번호 찾기 질문/답변이 없습니다.';
|
||||
$lang->msg_answer_not_matches = '비밀번호 찾기 질문/답변 또는 정보가 올바르지 않습니다.';
|
||||
$lang->msg_invalid_symbol_in_nickname = '닉네임에 사용할 수 없는 특수문자 \'%s\'가 포함되어 있습니다.';
|
||||
$lang->change_password_date = '비밀번호 갱신주기';
|
||||
$lang->about_change_password_date = '일정 기간이 지나면 비밀번호를 변경하도록 유도하는 기능입니다. 사용하지 않으려면 0을 입력하십시오.';
|
||||
$lang->msg_change_password_date = '%s일 동안 비밀번호를 변경하지 않았습니다. 개인정보 보호를 위하여 비밀번호를 변경해야 합니다.';
|
||||
|
|
@ -367,3 +371,4 @@ $lang->scrap_folder_create = '폴더 추가';
|
|||
$lang->scrap_folder_rename = '이름 변경';
|
||||
$lang->scrap_folder_delete = '삭제';
|
||||
$lang->member_unauthenticated = '미인증';
|
||||
$lang->member_number = '회원 번호';
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
|
|||
.hp li:first-child{border:0;}
|
||||
.hp a,p{color:#333;text-decoration:none}
|
||||
/* Button Area */
|
||||
.captcha{padding:0 10px;}
|
||||
.bna{text-align:center;padding:0 10px;margin:10px 0}
|
||||
.bna:after{content:"";display:block;clear:both}
|
||||
.bn{display:inline-block;line-height:26px !important;padding:0 10px;font-size:12px;font-weight:bold;border:1px solid;text-decoration:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;cursor:pointer;vertical-align:middle}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@
|
|||
<li><label for="id"><!--@if($identifier == 'user_id')-->{$lang->user_id}<!--@else-->{$lang->email_address}<!--@end--></label><input name="user_id" type="<!--@if($identifier == 'user_id')-->text<!--@else-->email<!--@end-->" id="id" value="" /></li>
|
||||
<li><label for="pw">{$lang->password}</label><input name="password" type="password" id="pw" value="" /></li>
|
||||
</ul>
|
||||
<div class="captcha" cond="$captcha">
|
||||
{$captcha}
|
||||
</div>
|
||||
<div class="hp" id="keep_msg" style="display:none;">
|
||||
<p>{$lang->about_keep_warning}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -117,10 +117,16 @@ class memberAdminController extends member
|
|||
{
|
||||
if(isset($args->{$val}))
|
||||
{
|
||||
$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', html_entity_decode($args->{$val}));
|
||||
$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', utf8_clean(html_entity_decode($args->{$val})));
|
||||
}
|
||||
}
|
||||
|
||||
// 실제로 디비쿼리시 빈값이 없다면 해당 쿼리를 무시하고 업데이트 하기 때문에 메모의 내용이 삭제가 되지 않습니다.
|
||||
if(!isset($args->description))
|
||||
{
|
||||
$args->description = '';
|
||||
}
|
||||
|
||||
$oMemberController = getController('member');
|
||||
// Execute insert or update depending on the value of member_srl
|
||||
if(!$args->member_srl)
|
||||
|
|
@ -212,6 +218,8 @@ class memberAdminController extends member
|
|||
'password_hashing_auto_upgrade',
|
||||
'password_change_invalidate_other_sessions',
|
||||
'update_nickname_log',
|
||||
'nickname_symbols',
|
||||
'nickname_symbols_allowed_list',
|
||||
'allow_duplicate_nickname',
|
||||
'member_profile_view'
|
||||
);
|
||||
|
|
@ -245,6 +253,12 @@ class memberAdminController extends member
|
|||
{
|
||||
$args->password_hashing_auto_upgrade = 'N';
|
||||
}
|
||||
|
||||
if(!in_array($args->nickname_symbols, ['Y', 'N', 'LIST']))
|
||||
{
|
||||
$args->nickname_symbols = 'Y';
|
||||
}
|
||||
$args->nickname_symbols_allowed_list = utf8_trim($args->nickname_symbols_allowed_list);
|
||||
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->updateModuleConfig('member', $args);
|
||||
|
|
|
|||
|
|
@ -215,6 +215,10 @@ class member extends ModuleObject {
|
|||
|
||||
// Check scrap folder table
|
||||
if(!$oDB->isColumnExists("member_scrap", "folder_srl")) return true;
|
||||
|
||||
if(!$oDB->isIndexExists('member_nickname_log', 'idx_before_nick_name')) return true;
|
||||
if(!$oDB->isIndexExists('member_nickname_log', 'idx_after_nick_name')) return true;
|
||||
if(!$oDB->isIndexExists('member_nickname_log', 'idx_user_id')) return true;
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
|
|
@ -429,6 +433,14 @@ class member extends ModuleObject {
|
|||
$oDB->addIndex("member_scrap","idx_folder_srl", array("folder_srl"));
|
||||
}
|
||||
|
||||
// Add to index in member nickname log table. 2020. 07 .20 @BJRambo
|
||||
if(!$oDB->isIndexExists('member_nickname_log', 'idx_before_nick_name'))
|
||||
{
|
||||
$oDB->addIndex('member_nickname_log', 'idx_before_nick_name', array('before_nick_name'));
|
||||
$oDB->addIndex('member_nickname_log', 'idx_after_nick_name', array('after_nick_name'));
|
||||
$oDB->addIndex('member_nickname_log', 'idx_user_id', array('user_id'));
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
$changed = false;
|
||||
|
|
|
|||
|
|
@ -870,7 +870,24 @@ class memberController extends member
|
|||
{
|
||||
if(isset($args->{$val}))
|
||||
{
|
||||
$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', html_entity_decode($args->{$val}));
|
||||
$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', utf8_clean(html_entity_decode($args->{$val})));
|
||||
}
|
||||
}
|
||||
|
||||
// Check symbols in nickname
|
||||
if($config->nickname_symbols === 'N')
|
||||
{
|
||||
if(preg_match('/[^\pL\d]/u', $args->nick_name, $matches))
|
||||
{
|
||||
throw new Rhymix\Framework\Exception(sprintf(lang('msg_invalid_symbol_in_nickname'), escape($matches[0])));
|
||||
}
|
||||
}
|
||||
elseif($config->nickname_symbols === 'LIST')
|
||||
{
|
||||
$list = preg_quote($config->nickname_symbols_allowed_list, '/');
|
||||
if(preg_match('/[^\pL\d' . $list . ']/u', $args->nick_name, $matches))
|
||||
{
|
||||
throw new Rhymix\Framework\Exception(sprintf(lang('msg_invalid_symbol_in_nickname'), escape($matches[0])));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1165,10 +1182,27 @@ class memberController extends member
|
|||
{
|
||||
if(isset($args->{$val}))
|
||||
{
|
||||
$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', html_entity_decode($args->{$val}));
|
||||
$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', utf8_clean(html_entity_decode($args->{$val})));
|
||||
}
|
||||
}
|
||||
|
||||
// Check symbols in nickname
|
||||
if($config->nickname_symbols === 'N')
|
||||
{
|
||||
if(preg_match('/[^\pL\d]/u', $args->nick_name, $matches))
|
||||
{
|
||||
throw new Rhymix\Framework\Exception(sprintf(lang('msg_invalid_symbol_in_nickname'), escape($matches[0])));
|
||||
}
|
||||
}
|
||||
elseif($config->nickname_symbols === 'LIST')
|
||||
{
|
||||
$list = preg_quote($config->nickname_symbols_allowed_list, '/');
|
||||
if(preg_match('/[^\pL\d' . $list . ']/u', $args->nick_name, $matches))
|
||||
{
|
||||
throw new Rhymix\Framework\Exception(sprintf(lang('msg_invalid_symbol_in_nickname'), escape($matches[0])));
|
||||
}
|
||||
}
|
||||
|
||||
// Execute insert or update depending on the value of member_srl
|
||||
$output = $this->updateMember($args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -2858,8 +2892,12 @@ class memberController extends member
|
|||
else
|
||||
{
|
||||
unset($args->is_admin);
|
||||
unset($args->limit_date);
|
||||
unset($args->description);
|
||||
if($is_admin == false)
|
||||
{
|
||||
unset($args->denied);
|
||||
}
|
||||
if($logged_info->member_srl != $args->member_srl && $is_admin == false)
|
||||
{
|
||||
return new BaseObject(-1, 'msg_invalid_request');
|
||||
|
|
@ -3060,7 +3098,10 @@ class memberController extends member
|
|||
if(!$args->user_name) $args->user_name = $orgMemberInfo->user_name;
|
||||
if(!$args->user_id) $args->user_id = $orgMemberInfo->user_id;
|
||||
if(!$args->nick_name) $args->nick_name = $orgMemberInfo->nick_name;
|
||||
if(!$args->description) $args->description = $orgMemberInfo->description;
|
||||
if($logged_info->is_admin !== 'Y')
|
||||
{
|
||||
$args->description = $orgMemberInfo->description;
|
||||
}
|
||||
if(!$args->birthday) $args->birthday = $orgMemberInfo->birthday;
|
||||
|
||||
$output = executeQuery('member.updateMember', $args);
|
||||
|
|
|
|||
|
|
@ -1266,10 +1266,44 @@ class memberModel extends member
|
|||
|
||||
public static function getMemberModifyNicknameLog($page = 1, $member_srl = null)
|
||||
{
|
||||
$search_keyword = Context::get('search_keyword');
|
||||
$search_target = Context::get('search_target');
|
||||
|
||||
// $this->user 에 재대로 된 회원 정보가 들어 가지 않음.
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $member_srl;
|
||||
$args->page = $page;
|
||||
$output = executeQueryArray('member.getMemberModifyNickName', $args);
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
if($search_keyword && $search_keyword)
|
||||
{
|
||||
switch ($search_target)
|
||||
{
|
||||
case "before":
|
||||
$args->before_nick_name = $search_keyword;
|
||||
break;
|
||||
case "after":
|
||||
$args->after_nick_name = $search_keyword;
|
||||
break;
|
||||
case "user_id":
|
||||
if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
|
||||
$args->user_id = $search_keyword;
|
||||
break;
|
||||
case "member_srl":
|
||||
$args->member_srl = intval($search_keyword);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
$output = executeQuery('member.getMemberModifyNickName', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('member.getMemberModifyNickName', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="member_srl" var="member_srl" />
|
||||
<condition operation="equal" column="user_id" var="user_id" pipe="or" />
|
||||
<condition operation="like" column="after_nick_name" var="after_nick_name" pipe="or" />
|
||||
<condition operation="like" column="before_nick_name" var="before_nick_name" pipe="or" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
|
|
|
|||
|
|
@ -1,7 +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="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||
<column name="before_nick_name" type="varchar" size="80" notnull="notnull" index="idx_before_nick_name" />
|
||||
<column name="after_nick_name" type="varchar" size="80" notnull="notnull" index="idx_after_nick_name" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="user_id" type="varchar" size="80" />
|
||||
<column name="user_id" type="varchar" size="80" index="idx_user_id" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@
|
|||
.xm .signin>.login-footer>a:focus{text-decoration:underline}
|
||||
.xm .signin .control-group{position:relative;padding:0 14px 0 0;margin:0;clear:both}
|
||||
.xm .signin .control-group:before{content:"";display:block;clear:both}
|
||||
.xm .signin .captcha{margin-bottom:10px}
|
||||
.xm .signin form{margin:0}
|
||||
.xm .signin fieldset{margin:0}
|
||||
.xm .signin label{cursor:pointer;display:inline-block}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
<input type="email" cond="$identifier != 'user_id'" name="user_id" id="uid" required placeholder="{$lang->email_address}" title="{$lang->email_address}" />
|
||||
<input type="password" name="password" id="upw" required placeholder="{$lang->password}" title="{$lang->password}" />
|
||||
</div>
|
||||
<div class="control-group captcha" cond="$captcha">
|
||||
{$captcha}
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="keepid_opt">
|
||||
<input type="checkbox" name="keep_signed" id="keepid_opt" value="Y" />
|
||||
|
|
|
|||
|
|
@ -49,6 +49,16 @@
|
|||
<p class="x_help-block">{$lang->about_update_nickname_log}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->cmd_nickname_symbols}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="nickname_symbols_yes"><input type="radio" name="nickname_symbols" id="nickname_symbols_yes" value="Y" checked="checked"|cond="$config->nickname_symbols == 'Y' || !isset($config->nickname_symbols)" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="nickname_symbols_no"><input type="radio" name="nickname_symbols" id="nickname_symbols_no" value="N" checked="checked"|cond="$config->nickname_symbols == 'N'"/> {$lang->cmd_no}</label>
|
||||
<label class="x_inline" for="nickname_symbols_list"><input type="radio" name="nickname_symbols" id="nickname_symbols_list" value="LIST" checked="checked"|cond="$config->nickname_symbols == 'LIST'"/> {$lang->cmd_nickname_symbols_list}</label>
|
||||
<input type="text" name="nickname_symbols_allowed_list" value="{$config->nickname_symbols_allowed_list ?: ''}" />
|
||||
<p class="x_help-block">{$lang->about_nickname_symbols}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" style="display:none"|cond="$config->allow_duplicate_nickname != 'Y'">
|
||||
<div class="x_control-label">{$lang->cmd_allow_duplicate_nickname}</div>
|
||||
<div class="x_controls">
|
||||
|
|
|
|||
|
|
@ -27,6 +27,19 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<form action="./" method="get" class="search center x_input-append" no-error-return-url="true">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<select name="search_target" style="margin-right:4px" title="{$lang->search_target}">
|
||||
<option value="before" selected="selected"|cond="$search_target=='before'">{$lang->nick_name_before_changing}</option>
|
||||
<option value="after" selected="selected"|cond="$search_target=='after'">{$lang->nick_name_after_changing}</option>
|
||||
<option value="user_id" selected="selected"|cond="$search_target=='user_id'">{$lang->user_id}</option>
|
||||
<option value="member_srl" selected="selected"|cond="$search_target=='member_srl'">{$lang->member_number}</option>
|
||||
</select>
|
||||
<input type="search" name="search_keyword" value="{htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" style="width:140px">
|
||||
<button class="x_btn x_btn-inverse" type="submit">{$lang->cmd_search}</button>
|
||||
</form>
|
||||
|
||||
<div class="x_clearfix">
|
||||
<div class="x_pagination x_pull-left">
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -37,110 +37,6 @@ class pointAdminController extends point
|
|||
|
||||
//module IO config is on
|
||||
$config->able_module = 'Y';
|
||||
|
||||
// Check the point name
|
||||
$config->point_name = $args->point_name;
|
||||
if(!$config->point_name)
|
||||
{
|
||||
$config->point_name = 'point';
|
||||
}
|
||||
|
||||
// Specify the default points
|
||||
$config->signup_point = (int)$args->signup_point;
|
||||
$config->login_point = (int)$args->login_point;
|
||||
$config->insert_document = (int)$args->insert_document;
|
||||
$config->insert_comment = (int)$args->insert_comment;
|
||||
$config->upload_file = (int)$args->upload_file;
|
||||
$config->download_file = (int)$args->download_file;
|
||||
$config->read_document = (int)$args->read_document;
|
||||
$config->voter = (int)$args->voter;
|
||||
$config->blamer = (int)$args->blamer;
|
||||
$config->voted = (int)$args->voted;
|
||||
$config->blamed = (int)$args->blamed;
|
||||
$config->download_file_author = (int)$args->download_file_author;
|
||||
$config->read_document_author = (int)$args->read_document_author;
|
||||
$config->voter_comment = (int)$args->voter_comment;
|
||||
$config->blamer_comment = (int)$args->blamer_comment;
|
||||
$config->voted_comment = (int)$args->voted_comment;
|
||||
$config->blamed_comment = (int)$args->blamed_comment;
|
||||
|
||||
// Specify notice exceptions
|
||||
$config->read_document_except_notice = ($args->read_document_except_notice === 'Y');
|
||||
$config->read_document_author_except_notice = ($args->read_document_author_except_notice === 'Y');
|
||||
|
||||
// Specify revert on delete
|
||||
$config->insert_document_revert_on_delete = ($args->insert_document_revert_on_delete === 'Y');
|
||||
$config->insert_comment_revert_on_delete = ($args->insert_comment_revert_on_delete === 'Y');
|
||||
$config->upload_file_revert_on_delete = ($args->upload_file_revert_on_delete === 'Y');
|
||||
|
||||
// Specify time limits
|
||||
$config->insert_comment_limit = $config->no_point_date = (int)$args->insert_comment_limit;
|
||||
$config->read_document_limit = (int)$args->read_document_limit;
|
||||
$config->voter_limit = (int)$args->voter_limit;
|
||||
$config->blamer_limit = (int)$args->blamer_limit;
|
||||
$config->voted_limit = (int)$args->voted_limit;
|
||||
$config->blamed_limit = (int)$args->blamed_limit;
|
||||
$config->read_document_author_limit = (int)$args->read_document_author_limit;
|
||||
$config->voter_comment_limit = (int)$args->voter_comment_limit;
|
||||
$config->blamer_comment_limit = (int)$args->blamer_comment_limit;
|
||||
$config->voted_comment_limit = (int)$args->voted_comment_limit;
|
||||
$config->blamed_comment_limit = (int)$args->blamed_comment_limit;
|
||||
|
||||
// The highest level
|
||||
$config->max_level = $args->max_level;
|
||||
if($config->max_level>1000) $config->max_level = 1000;
|
||||
if($config->max_level<1) $config->max_level = 1;
|
||||
|
||||
// Set the level icon
|
||||
$config->level_icon = $args->level_icon;
|
||||
|
||||
// Check if downloads are not allowed
|
||||
$config->disable_download = ($args->disable_download === 'Y') ? 'Y' : 'N';
|
||||
|
||||
// Check if reading a document is not allowed
|
||||
$config->disable_read_document = ($args->disable_read_document === 'Y') ? 'Y' : 'N';
|
||||
$config->disable_read_document_except_robots = ($args->disable_read_document_except_robots === 'Y') ? 'Y' : 'N';
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
$group_list = $oMemberModel->getGroups();
|
||||
$config->point_group = array();
|
||||
|
||||
// Per-level group configurations
|
||||
foreach($group_list as $group)
|
||||
{
|
||||
// Admin group should not be connected to point.
|
||||
if($group->is_admin == 'Y' || $group->is_default == 'Y') continue;
|
||||
|
||||
$group_srl = $group->group_srl;
|
||||
|
||||
if(isset($args->{'point_group_'.$group_srl}))
|
||||
{
|
||||
//if group level is higher than max level, change to max level
|
||||
if($args->{'point_group_'.$group_srl} > $args->max_level)
|
||||
{
|
||||
$args->{'point_group_'.$group_srl} = $args->max_level;
|
||||
}
|
||||
|
||||
//if group level is lower than 1, change to 1
|
||||
if($args->{'point_group_'.$group_srl} && $args->{'point_group_'.$group_srl} < 1)
|
||||
{
|
||||
$args->{'point_group_'.$group_srl} = 1;
|
||||
}
|
||||
$config->point_group[$group_srl] = $args->{'point_group_'.$group_srl};
|
||||
}
|
||||
}
|
||||
|
||||
$config->group_reset = $args->group_reset;
|
||||
$config->group_ratchet = $args->group_ratchet;
|
||||
// Per-level point configurations
|
||||
unset($config->level_step);
|
||||
for($i=1;$i<=$config->max_level;$i++)
|
||||
{
|
||||
$key = "level_step_".$i;
|
||||
$config->level_step[$i] = (int)$args->{$key};
|
||||
}
|
||||
// A function to calculate per-level points
|
||||
$config->expression = $args->expression;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -150,6 +46,111 @@ class pointAdminController extends point
|
|||
// Delete Triggers
|
||||
$oModuleController->deleteModuleTriggers('point');
|
||||
}
|
||||
|
||||
// Check the point name
|
||||
$config->point_name = $args->point_name;
|
||||
if(!$config->point_name)
|
||||
{
|
||||
$config->point_name = 'point';
|
||||
}
|
||||
|
||||
// Specify the default points
|
||||
$config->signup_point = (int)$args->signup_point;
|
||||
$config->login_point = (int)$args->login_point;
|
||||
$config->insert_document = (int)$args->insert_document;
|
||||
$config->insert_comment = (int)$args->insert_comment;
|
||||
$config->upload_file = (int)$args->upload_file;
|
||||
$config->download_file = (int)$args->download_file;
|
||||
$config->read_document = (int)$args->read_document;
|
||||
$config->voter = (int)$args->voter;
|
||||
$config->blamer = (int)$args->blamer;
|
||||
$config->voted = (int)$args->voted;
|
||||
$config->blamed = (int)$args->blamed;
|
||||
$config->download_file_author = (int)$args->download_file_author;
|
||||
$config->read_document_author = (int)$args->read_document_author;
|
||||
$config->voter_comment = (int)$args->voter_comment;
|
||||
$config->blamer_comment = (int)$args->blamer_comment;
|
||||
$config->voted_comment = (int)$args->voted_comment;
|
||||
$config->blamed_comment = (int)$args->blamed_comment;
|
||||
|
||||
// Specify notice exceptions
|
||||
$config->read_document_except_notice = ($args->read_document_except_notice === 'Y');
|
||||
$config->read_document_author_except_notice = ($args->read_document_author_except_notice === 'Y');
|
||||
|
||||
// Specify revert on delete
|
||||
$config->insert_document_revert_on_delete = ($args->insert_document_revert_on_delete === 'Y');
|
||||
$config->insert_comment_revert_on_delete = ($args->insert_comment_revert_on_delete === 'Y');
|
||||
$config->upload_file_revert_on_delete = ($args->upload_file_revert_on_delete === 'Y');
|
||||
|
||||
// Specify time limits
|
||||
$config->insert_comment_limit = $config->no_point_date = (int)$args->insert_comment_limit;
|
||||
$config->read_document_limit = (int)$args->read_document_limit;
|
||||
$config->voter_limit = (int)$args->voter_limit;
|
||||
$config->blamer_limit = (int)$args->blamer_limit;
|
||||
$config->voted_limit = (int)$args->voted_limit;
|
||||
$config->blamed_limit = (int)$args->blamed_limit;
|
||||
$config->read_document_author_limit = (int)$args->read_document_author_limit;
|
||||
$config->voter_comment_limit = (int)$args->voter_comment_limit;
|
||||
$config->blamer_comment_limit = (int)$args->blamer_comment_limit;
|
||||
$config->voted_comment_limit = (int)$args->voted_comment_limit;
|
||||
$config->blamed_comment_limit = (int)$args->blamed_comment_limit;
|
||||
|
||||
// The highest level
|
||||
$config->max_level = $args->max_level;
|
||||
if($config->max_level>1000) $config->max_level = 1000;
|
||||
if($config->max_level<1) $config->max_level = 1;
|
||||
|
||||
// Set the level icon
|
||||
$config->level_icon = $args->level_icon;
|
||||
|
||||
// Check if downloads are not allowed
|
||||
$config->disable_download = ($args->disable_download === 'Y') ? 'Y' : 'N';
|
||||
|
||||
// Check if reading a document is not allowed
|
||||
$config->disable_read_document = ($args->disable_read_document === 'Y') ? 'Y' : 'N';
|
||||
$config->disable_read_document_except_robots = ($args->disable_read_document_except_robots === 'Y') ? 'Y' : 'N';
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
$group_list = $oMemberModel->getGroups();
|
||||
$config->point_group = array();
|
||||
|
||||
// Per-level group configurations
|
||||
foreach($group_list as $group)
|
||||
{
|
||||
// Admin group should not be connected to point.
|
||||
if($group->is_admin == 'Y' || $group->is_default == 'Y') continue;
|
||||
|
||||
$group_srl = $group->group_srl;
|
||||
|
||||
if(isset($args->{'point_group_'.$group_srl}))
|
||||
{
|
||||
//if group level is higher than max level, change to max level
|
||||
if($args->{'point_group_'.$group_srl} > $args->max_level)
|
||||
{
|
||||
$args->{'point_group_'.$group_srl} = $args->max_level;
|
||||
}
|
||||
|
||||
//if group level is lower than 1, change to 1
|
||||
if($args->{'point_group_'.$group_srl} && $args->{'point_group_'.$group_srl} < 1)
|
||||
{
|
||||
$args->{'point_group_'.$group_srl} = 1;
|
||||
}
|
||||
$config->point_group[$group_srl] = $args->{'point_group_'.$group_srl};
|
||||
}
|
||||
}
|
||||
|
||||
$config->group_reset = $args->group_reset;
|
||||
$config->group_ratchet = $args->group_ratchet;
|
||||
// Per-level point configurations
|
||||
unset($config->level_step);
|
||||
for($i=1;$i<=$config->max_level;$i++)
|
||||
{
|
||||
$key = "level_step_".$i;
|
||||
$config->level_step[$i] = (int)$args->{$key};
|
||||
}
|
||||
// A function to calculate per-level points
|
||||
$config->expression = $args->expression;
|
||||
|
||||
// Save
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue