Merge branch 'offical/develop' into pr/document-trash

This commit is contained in:
BJRambo 2016-05-15 15:31:33 +09:00
commit c8da469758
37 changed files with 329 additions and 487 deletions

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon version="0.2">
<title xml:lang="ko">커뮤니케이션</title>
<title xml:lang="jp">コミュニケーション</title>
<title xml:lang="zh-CN">会员交流</title>
<title xml:lang="en">Communication</title>
<title xml:lang="vi">Truyền thông</title>
<title xml:lang="ge">Communication</title>
<title xml:lang="es">Communication</title>
<title xml:lang="ru">Общение</title>
<title xml:lang="zh-TW">交流</title>
<description xml:lang="ko">
이 애드온은 빈 애드온입니다. 모든 기능은 커뮤니케이션 모듈로 이전되었습니다.
</description>
<version>1.7</version>
<date>2013-11-27</date>
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
<name xml:lang="ko">NAVER</name>
<name xml:lang="jp">NAVER</name>
<name xml:lang="zh-CN">NAVER</name>
<name xml:lang="en">NAVER</name>
<name xml:lang="vi">NAVER</name>
<name xml:lang="ge">NAVER</name>
<name xml:lang="es">NAVER</name>
<name xml:lang="ru">NAVER</name>
<name xml:lang="zh-TW">NAVER</name>
</author>
<extra_vars>
</extra_vars>
</addon>

View file

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

View file

@ -112,7 +112,7 @@ function getScreen() {
body.append(xScreen).append(controls);
imgframe.live('load', function(){
imgframe.bind('load', function(){
var clientWidth = $(window).width();
var clientHeight = $(window).height();
imgframe.css({
@ -256,7 +256,7 @@ $(window).load(function(){
});
/* live 이벤트로 적용 (image_gallery 컴포넌트와의 호환 위함) */
$('img[rel=xe_gallery]', this).live('mouseover', function() {
$(this).on('mouseover', 'img[rel=xe_gallery]', function() {
var $img = $(this);
if(!$img.parent('a').length && !$img.attr('onclick')) {
$img.css('cursor', 'pointer').click(slideshow);

View file

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

View file

@ -155,7 +155,7 @@
jQuery(function($) {
/* select - option의 disabled=disabled 속성을 IE에서도 체크하기 위한 함수 */
if($.browser.msie) {
if(navigator.userAgent.match(/MSIE/)) {
$('select').each(function(i, sels) {
var disabled_exists = false;
var first_enable = [];

View file

@ -49,11 +49,7 @@
</td>
<td><span style="color:#aaa"|cond="$addon->isBlacklisted">{$addon->path}</span></td>
<td>
<!--@if($addon->isBlacklisted)-->
<span style="color:#aaa">{$lang->cmd_setup}</span>
<!--@else-->
<a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a>
<!--@end-->
<a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon_name)}">{$lang->cmd_setup}</a>
</td>
<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->activated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>
<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}" checked="checked"|cond="$addon->mactivated && !$addon->isBlacklisted" disabled="disabled"|cond="$addon->isBlacklisted" /></td>

View file

@ -32,7 +32,7 @@
</tbody>
</table>
<div cond="Context::isBlacklistedPlugin($addon_info->addon_name)" class="message error">
<p><em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}</p>
<p><em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}<br />{$lang->get('admin.msg_blacklisted_reason.'.$addon_info->addon_name)}</p>
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/addon/tpl/setup_addon/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>

View file

@ -546,7 +546,7 @@ class adminAdminController extends admin
// Favicon and mobicon
$this->_saveFavicon('favicon.ico', $vars->is_delete_favicon);
$this->_saveFavicon('mobicon.png', $vars->is_delete_mobicon);
$this->_saveDefaultImage($vars->is_delete_site_default_image);
$this->_saveDefaultImage($vars->is_delete_default_image);
// Save
Rhymix\Framework\Config::save();

View file

@ -65,6 +65,13 @@ $lang->msg_blacklisted_module = 'This module has been disabled because it confli
$lang->msg_blacklisted_addon = 'This addon has been disabled because it conflicts with a feature that Rhymix supports by default, or is known to have other compatibility problems.';
$lang->msg_blacklisted_widget = 'This widget has been disabled because it conflicts with a feature that Rhymix supports by default, or is known to have other compatibility problems.';
$lang->msg_blacklisted_layout = 'This layout has been disabled because it conflicts with a feature that Rhymix supports by default, or is known to have other compatibility problems.';
$lang->msg_blacklisted_reason['autolang'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigGeneral">System Settings</a> page.';
$lang->msg_blacklisted_reason['errorlogger'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigDebug">Debug Settings</a> page.';
$lang->msg_blacklisted_reason['fix_mysql_utf8'] = 'The functionality that this addon used to provide is included by default in Rhymix.';
$lang->msg_blacklisted_reason['member_communication'] = 'The functionality that this addon used to provide has been moved to the member and ncenterlite modules.';
$lang->msg_blacklisted_reason['seo'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigSEO">SEO Settings</a> page.';
$lang->msg_blacklisted_reason['smartphone'] = 'This module was disabled in XE long before Rhymix even existed.';
$lang->msg_blacklisted_reason['zipperupper'] = 'Similar functionality can be configured in the <a href="./index.php?module=admin&act=dispAdminConfigAdvanced">Advanced Settings</a> page.';
$lang->msg_warning = 'Warning';
$lang->welcome_to_xe = 'Welcome to the Rhymix admin page.';
$lang->about_lang_env = 'If you want to make the language setting same for first-time visitors, change the language setting to what you want and click [Save] button below.';

View file

@ -65,6 +65,13 @@ $lang->msg_blacklisted_module = '이 모듈은 Rhymix에서 기본 제공하는
$lang->msg_blacklisted_addon = '이 애드온은 Rhymix에서 기본 제공하는 기능과 충돌하거나 그 밖의 호환성 문제가 있으므로 사용이 중단되었습니다.';
$lang->msg_blacklisted_widget = '이 위젯은 Rhymix에서 기본 제공하는 기능과 충돌하거나 그 밖의 호환성 문제가 있으므로 사용이 중단되었습니다.';
$lang->msg_blacklisted_layout = '이 레이아웃은 Rhymix에서 기본 제공하는 기능과 충돌하거나 그 밖의 호환성 문제가 있으므로 사용이 중단되었습니다.';
$lang->msg_blacklisted_reason['autolang'] = '이 애드온에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigGeneral">시스템 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['errorlogger'] = '이 모듈에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigDebug">디버그 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['fix_mysql_utf8'] = '이 애드온에서 제공하던 기능은 Rhymix에 포함되어 있습니다.';
$lang->msg_blacklisted_reason['member_communication'] = '이 애드온에서 제공하던 기능은 알림센터 모듈에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['seo'] = '이 모듈에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigSEO">SEO 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_blacklisted_reason['smartphone'] = '이 모듈은 XE에서도 사용되지 않고 있었습니다.';
$lang->msg_blacklisted_reason['zipperupper'] = '이 애드온에서 제공하던 기능은 <a href="./index.php?module=admin&act=dispAdminConfigAdvanced">고급 설정</a> 페이지에서 관리할 수 있습니다.';
$lang->msg_warning = '경고';
$lang->welcome_to_xe = 'Rhymix 관리자';
$lang->about_lang_env = '처음 방문하는 사용자들의 언어 설정을 동일하게 하려면, 원하는 언어로 변경 후 아래 [저장] 버튼을 클릭하면 됩니다.';

View file

@ -144,7 +144,7 @@
<p id="default_imagePreview">
<img src="{$site_default_image_url}" alt="Default Image" style="width:200px;height:auto" />
</p>
<label><input type="checkbox" name="is_delete_site_default_image" value="1" /> {$lang->cmd_delete}</label>
<label><input type="checkbox" name="is_delete_default_image" value="1" /> {$lang->cmd_delete}</label>
<form action="./" enctype="multipart/form-data" method="post" target="hiddenIframe" class="imageUpload" style="margin:0">
<input type="hidden" name="module" value="admin">
<input type="hidden" name="act" value="procAdminFaviconUpload">
@ -166,10 +166,17 @@
<iframe name="hiddenIframe" src="about:blank" hidden></iframe>
<script>
jQuery(function() {
if (jQuery("#default_imagePreview img").attr("src") == "") {
jQuery("#default_imagePreview").hide();
jQuery("input[name='is_delete_default_image']").parent().hide();
}
});
function afterUploadConfigImage(name, tmpFileName) {
jQuery('#' + name + 'Preview img').attr('src', tmpFileName);
jQuery('#' + name + 'Preview img').attr('src', tmpFileName).parent().show();
jQuery('#' + name).val('');
jQuery("input[name='is_delete_'" + name + "']").prop('checked', false);
jQuery("input[name='is_delete_" + name + "']").prop('checked', false).parent().show();
}
function alertUploadMessage(msg) {

View file

@ -81,9 +81,8 @@
jQuery(function($)
{
// check browser version
if($.browser.msie == true ) {
var arrBrowserVersion = $.browser.version.split('.');
if(parseInt(arrBrowserVersion[0], 10) <= 8) {
if (var msie = navigator.userAgent.match(/MSIE (\d)/)) {
if (parseInt(msie[1], 10) <== 8) {
$('#checkBrowserMessage').show();
}
}

View file

@ -1,7 +1,10 @@
<include target="./_header.html" />
<div class="content" id="content">
<div cond="Context::isBlacklistedPlugin(strtolower(preg_replace('/^disp([A-Z][a-z0-9_]+)[A-Z].+$/', '$1', $act)))" class="message error" style="margin-top:15px">
<p><em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}</p>
<div cond="Context::isBlacklistedPlugin($blacklisted_plugin_name = strtolower(preg_replace('/^disp([A-Z][a-z0-9_]+)[A-Z].+$/', '$1', $act)))" class="message error" style="margin-top:15px">
<p>
<em class="x_label x_label-important">{$lang->msg_warning}</em> {$lang->msg_blacklisted_module}<br />
{$lang->get('admin.msg_blacklisted_reason.'.$blacklisted_plugin_name)}
</p>
</div>
{$content}
</div>

View file

@ -200,8 +200,8 @@ class boardAdminView extends board {
// get the addtional setup trigger
// the additional setup triggers can be used in many modules
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
// setup the template file

View file

@ -179,12 +179,9 @@ class commentController extends comment
$obj->before_point = ($point < 0) ? $oComment->get('blamed_count') : $oComment->get('voted_count');
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$obj->cancel = 1;
$trigger_output = ModuleHandler::triggerCall('comment.updateVotedCountCancel', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('comment.updateVotedCountCancel', 'after', $obj);
$oDB->commit();
return $output;
}
@ -578,15 +575,7 @@ class commentController extends comment
}
// call a trigger(after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
// commit
$oDB->commit();
@ -905,15 +894,7 @@ class commentController extends comment
}
// call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('comment.updateComment', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('comment.updateComment', 'after', $obj);
// commit
$oDB->commit();
@ -1054,17 +1035,9 @@ class commentController extends comment
}
// call a trigger (after)
if($output->toBool())
{
$comment->isMoveToTrash = $isMoveToTrash;
$trigger_output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
unset($comment->isMoveToTrash);
}
$comment->isMoveToTrash = $isMoveToTrash;
ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
unset($comment->isMoveToTrash);
if(!$isMoveToTrash)
{
@ -1144,11 +1117,7 @@ class commentController extends comment
}
// call a trigger (after)
$output = ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
if(!$output->toBool())
{
continue;
}
ModuleHandler::triggerCall('comment.deleteComment', 'after', $comment);
}
}
@ -1299,13 +1268,8 @@ class commentController extends comment
$obj->point = $point;
$obj->before_point = ($point < 0) ? $oComment->get('blamed_count') : $oComment->get('voted_count');
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$trigger_output = ModuleHandler::triggerCall('comment.updateVotedCount', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('comment.updateVotedCount', 'after', $obj);
$oDB->commit();
// Return the result
@ -1437,12 +1401,7 @@ class commentController extends comment
// Call a trigger (after)
$trigger_obj->declared_count = $declared_count + 1;
$trigger_output = ModuleHandler::triggerCall('comment.declaredComment', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('comment.declaredComment', 'after', $trigger_obj);
// commit
$oDB->commit();

View file

@ -219,10 +219,10 @@ class communicationController extends communication
$trigger_obj->title = $title;
$trigger_obj->content = $content;
$trigger_obj->sender_log = $sender_log;
$triggerOutput = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
if(!$triggerOutput->toBool())
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_obj);
if(!$trigger_output->toBool())
{
return $triggerOutput;
return $trigger_output;
}
$oDB = DB::getInstance();
@ -248,12 +248,7 @@ class communicationController extends communication
}
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_obj);
$oDB->commit();

View file

@ -35,7 +35,7 @@ class counterModel extends counter
$group_key = 'counterIpLogged_' . $args->regdate;
$iplogged = Rhymix\Framework\Cache::get($group_key . ':' . $cache_key);
if($iplogged === false)
if(!$iplogged)
{
$output = executeQuery('counter.getCounterLog', $args);
if($output->data->count) $iplogged = TRUE;

View file

@ -209,13 +209,9 @@ class documentAdminController extends document
$oDB->rollback();
return $output;
}
// Call a trigger (before)
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
// Call a trigger (after)
ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
$oDB->commit();
@ -433,12 +429,7 @@ class documentAdminController extends document
// Call a trigger (before)
$triggerObj->copied_srls = $copied_srls;
$output = ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
if(!$output->toBool())
{
$oDB->rollback();
return $output;
}
ModuleHandler::triggerCall('document.copyDocumentModule', 'after', $triggerObj);
$oDB->commit();
@ -899,15 +890,7 @@ class documentAdminController extends document
}
// call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('document.restoreTrash', 'after', $originObject);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('document.restoreTrash', 'after', $originObject);
// commit
$oDB->commit();

View file

@ -176,13 +176,8 @@ class documentController extends document
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$obj->cancel = 1;
$trigger_output = ModuleHandler::triggerCall('document.updateVotedCountCancel', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.updateVotedCountCancel', 'after', $obj);
$oDB->commit();
return $output;
}
@ -467,29 +462,23 @@ class documentController extends document
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
}
// Update the category if the category_srl exists.
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
// Call a trigger (after)
if($output->toBool())
if($obj->update_log_setting === 'Y')
{
if($obj->update_log_setting === 'Y')
{
$obj->extra_vars = serialize($extra_vars);
$update_output = $this->insertDocumentUpdateLog($obj);
$obj->extra_vars = serialize($extra_vars);
$update_output = $this->insertDocumentUpdateLog($obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
}
$trigger_output = ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
if(!$trigger_output->toBool())
if(!$update_output->toBool())
{
$oDB->rollback();
return $trigger_output;
return $update_output;
}
}
ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
// commit
$oDB->commit();
@ -738,36 +727,30 @@ class documentController extends document
if($extra_content->title) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -1, $extra_content->title, 'title_'.Context::getLangType());
if($extra_content->content) $this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, -2, $extra_content->content, 'content_'.Context::getLangType());
}
// Update the category if the category_srl exists.
if($source_obj->get('category_srl') != $obj->category_srl || $source_obj->get('module_srl') == $logged_info->member_srl)
{
if($source_obj->get('category_srl') != $obj->category_srl) $this->updateCategoryCount($obj->module_srl, $source_obj->get('category_srl'));
if($obj->category_srl) $this->updateCategoryCount($obj->module_srl, $obj->category_srl);
}
// Call a trigger (after)
if($output->toBool())
if($obj->update_log_setting === 'Y')
{
if($obj->update_log_setting === 'Y')
$obj->extra_vars = serialize($extra_vars);
if($this->grant->manager)
{
$obj->extra_vars = serialize($extra_vars);
if($this->grant->manager)
{
$obj->is_admin = 'Y';
}
$update_output = $this->insertDocumentUpdateLog($obj, $source_obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $update_output;
}
$obj->is_admin = 'Y';
}
$trigger_output = ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
if(!$trigger_output->toBool())
$update_output = $this->insertDocumentUpdateLog($obj, $source_obj);
if(!$update_output->toBool())
{
$oDB->rollback();
return $trigger_output;
return $update_output;
}
}
ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
// commit
$oDB->commit();
@ -888,18 +871,10 @@ class documentController extends document
// Delete extra variable
$this->deleteDocumentExtraVars($oDocument->get('module_srl'), $oDocument->document_srl);
//this
// Call a trigger (after)
if($output->toBool())
{
$trigger_obj = $oDocument->getObjectVars();
$trigger_output = ModuleHandler::triggerCall('document.deleteDocument', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
$trigger_obj = $oDocument->getObjectVars();
ModuleHandler::triggerCall('document.deleteDocument', 'after', $trigger_obj);
// declared document, log delete
$this->_deleteDeclaredDocuments($args);
$this->_deleteDocumentReadedLog($args);
@ -1053,16 +1028,9 @@ class documentController extends document
$args->isvalid = 'N';
executeQuery('file.updateFileValid', $args);
}
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('document.moveDocumentToTrash', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('document.moveDocumentToTrash', 'after', $obj);
// commit
$oDB->commit();
@ -1135,12 +1103,7 @@ class documentController extends document
executeQuery('document.updateReadedCount', $args);
// Call a trigger when the read count is updated (after)
$trigger_output = ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.updateReadedCount', 'after', $oDocument);
$oDB->commit();
@ -1396,12 +1359,8 @@ class documentController extends document
$obj->point = $point;
$obj->before_point = ($point < 0) ? $oDocument->get('blamed_count') : $oDocument->get('voted_count');
$obj->after_point = ($point < 0) ? $args->blamed_count : $args->voted_count;
$trigger_output = ModuleHandler::triggerCall('document.updateVotedCount', 'after', $obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.updateVotedCount', 'after', $obj);
$oDB->commit();
@ -1539,12 +1498,7 @@ class documentController extends document
// Call a trigger (after)
$trigger_obj->declared_count = $declared_count + 1;
$trigger_output = ModuleHandler::triggerCall('document.declaredDocument', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('document.declaredDocument', 'after', $trigger_obj);
// commit
$oDB->commit();

View file

@ -282,7 +282,7 @@ class fileController extends file
executeQuery('file.updateFileDownloadCount', $args);
// Call a trigger (after)
$output = ModuleHandler::triggerCall('file.downloadFile', 'after', $file_obj);
ModuleHandler::triggerCall('file.downloadFile', 'after', $file_obj);
// Redirect to procFileOutput using file key
if(!isset($_SESSION['__XE_FILE_KEY__']) || !is_string($_SESSION['__XE_FILE_KEY__']) || strlen($_SESSION['__XE_FILE_KEY__']) != 32)
@ -805,9 +805,9 @@ class fileController extends file
$output = executeQuery('file.insertFile', $args);
if(!$output->toBool()) return $output;
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('file.insertFile', 'after', $args);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('file.insertFile', 'after', $args);
$_SESSION['__XE_UPLOADING_FILES_INFO__'][$args->file_srl] = true;
@ -895,8 +895,7 @@ class fileController extends file
if(!$output->toBool()) return $output;
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('file.deleteFile', 'after', $trigger_obj);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('file.deleteFile', 'after', $trigger_obj);
// If successfully deleted, remove the file
FileHandler::removeFile($uploaded_filename);

View file

@ -99,11 +99,12 @@ class memberController extends member
$logged_info = Context::get('logged_info');
$trigger_output = ModuleHandler::triggerCall('member.doLogout', 'before', $logged_info);
if(!$trigger_output->toBool()) return $trigger_output;
// Destroy session information
$this->destroySessionInfo();
// Call a trigger after log-out (after)
$trigger_output = ModuleHandler::triggerCall('member.doLogout', 'after', $logged_info);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('member.doLogout', 'after', $logged_info);
$output = new Object();
@ -426,9 +427,9 @@ class memberController extends member
return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), new Object(-12, $msg));
}
else $this->setMessage('success_registed');
// Call a trigger (after)
$trigger_output = ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config);
if($config->redirect_url)
{
@ -616,12 +617,10 @@ class memberController extends member
// Get user_id information
$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl);
// Call a trigger after successfully log-in (after)
$trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
if(!$trigger_output->toBool()) return $trigger_output;
// Call a trigger after successfully modified (after)
ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo);
$this->setSessionInfo();
// Return result
$this->add('member_srl', $args->member_srl);
$this->setMessage('success_updated');
@ -1543,7 +1542,7 @@ class memberController extends member
// Add
$output = executeQuery('member.addMemberToGroup',$args);
$output2 = ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args);
$this->_clearMemberCache($member_srl, $site_srl);
@ -1822,9 +1821,10 @@ class memberController extends member
}
}
}
// Call a trigger after successfully log-in (after)
$trigger_output = ModuleHandler::triggerCall('member.doLogin', 'after', $this->memberInfo);
if(!$trigger_output->toBool()) return $trigger_output;
ModuleHandler::triggerCall('member.doLogin', 'after', $this->memberInfo);
// When user checked to use auto-login
if($keep_signed)
{
@ -2181,16 +2181,8 @@ class memberController extends member
}
$this->_sendAuthMail($auth_args, $args);
}
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('member.insertMember', 'after', $args);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('member.insertMember', 'after', $args);
$oDB->commit(true);
@ -2447,15 +2439,9 @@ class memberController extends member
$this->_updatePointByGroup($orgMemberInfo->member_srl, $group_srl_list);
}
}
// Call a trigger (after)
if($output->toBool()) {
$trigger_output = ModuleHandler::triggerCall('member.updateMember', 'after', $args);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('member.updateMember', 'after', $args);
$oDB->commit();
@ -2564,15 +2550,7 @@ class memberController extends member
return $output;
}
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('member.deleteMember', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('member.deleteMember', 'after', $trigger_obj);
$oDB->commit();
// Name, image, image, mark, sign, delete

View file

@ -413,8 +413,7 @@ class menuAdminModel extends menu
}
// after trigger
$output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
if(!$output->toBool()) return $output;
ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
$localModuleList = array_unique($moduleList);

View file

@ -227,7 +227,7 @@ class moduleAdminController extends module
$triggerObj->moduleSrlList[] = $module_srl;
}
$output = ModuleHandler::triggerCall('module.procModuleAdminCopyModule', 'after', $triggerObj);
ModuleHandler::triggerCall('module.procModuleAdminCopyModule', 'after', $triggerObj);
$oDB->commit();

View file

@ -115,8 +115,8 @@ class moduleAdminModel extends module
$content = '';
// Call a trigger for additional settings
// Considering uses in the other modules, trigger name cen be publicly used
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
if(count($tabChoice) == 0)

View file

@ -206,8 +206,8 @@ class moduleAdminView extends module
$content = '';
// Call a trigger for additional settings
// Considering uses in the other modules, trigger name cen be publicly used
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
$output = ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'before', $content);
ModuleHandler::triggerCall('module.dispAdditionSetup', 'after', $content);
Context::set('setup_content', $content);
// Set the layout to be pop-up
$this->setLayoutPath('./common/tpl');

View file

@ -726,15 +726,7 @@ class moduleController extends module
// Remove the module manager
$this->deleteAdminId($module_srl);
// Call a trigger (after)
if($output->toBool())
{
$trigger_output = ModuleHandler::triggerCall('module.deleteModule', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
}
ModuleHandler::triggerCall('module.deleteModule', 'after', $trigger_obj);
// commit
$oDB->commit();

View file

@ -1508,7 +1508,6 @@ class moduleModel extends module
// Get information of the module
$info = NULL;
$info = $this->getModuleInfoXml($module_name);
if(!$info) continue;
$info->module = $module_name;
@ -1517,21 +1516,30 @@ class moduleModel extends module
$info->table_count = $table_count;
$info->path = $path;
$info->admin_index_act = $info->admin_index_act;
// Check if DB is installed
if($table_count > $created_table_count) $info->need_install = true;
else $info->need_install = false;
// Check if it is upgraded to module.class.php on each module
$oDummy = null;
$oDummy = getModule($module_name, 'class');
if($oDummy && method_exists($oDummy, "checkUpdate"))
if(!Context::isBlacklistedPlugin($module_name))
{
$info->need_update = $oDummy->checkUpdate();
// Check if DB is installed
if($table_count > $created_table_count)
{
$info->need_install = true;
}
else
{
$info->need_install = false;
}
// Check if it is upgraded to module.class.php on each module
$oDummy = null;
$oDummy = getModule($module_name, 'class');
if($oDummy && method_exists($oDummy, "checkUpdate"))
{
$info->need_update = $oDummy->checkUpdate();
}
else
{
continue;
}
}
else
{
continue;
}
$list[] = $info;
}
return $list;

View file

@ -28,6 +28,10 @@
<strong cond="!$val->admin_index_act">{$val->title}</strong>
</p>
<p>{$val->description}</p>
<p cond="Context::isBlacklistedPlugin($val->module)" class="message error" style="margin-top:6px;padding:6px 10px">
{$lang->msg_blacklisted_module}<br />
{$lang->get('admin.msg_blacklisted_reason.'.$val->module)}
</p>
<p cond="$val->need_install" class="x_alert x_alert-info">{$lang->msg_avail_install} <button class="text" type="button" onclick="doInstallModule('{$val->module}')">{$lang->msg_do_you_like_install}</button></p>
<p cond="$val->need_update" class="x_alert x_alert-info">{$lang->msg_avail_update} <button class="text" type="button" onclick="doUpdateModule('{$val->module}')">{$lang->msg_do_you_like_update}</button></p>
<p cond="$val->need_autoinstall_update == 'Y'" class="x_alert x_alert-info">{$lang->msg_avail_easy_update} <a href="{$val->update_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a></p>
@ -59,4 +63,4 @@ jQuery(function($){
$('.dsTg>tbody>tr[data-type1]').prependTo('tbody');
$('.dsTg>tbody>tr[data-type2]').prependTo('tbody');
});
</script>
</script>

View file

@ -6,10 +6,10 @@ $lang->ncenterlite_document = 'document';
$lang->ncenterlite_comment = 'comment';
$lang->ncenterlite_type_message = 'message';
$lang->ncenterlite_sender = 'Sender';
$lang->ncenterlite_addressee = 'Addressee';
$lang->ncenterlite_addressee = 'Recipient';
$lang->ncenterlite_noti_contents = 'Contents';
$lang->ncenterlite_read = 'Have read';
$lang->ncenterlite_read_y = 'Have read';
$lang->ncenterlite_read_y = 'Read';
$lang->ncenterlite_read_n = 'Not read';
$lang->ncenterlite_no_target = 'no target';
$lang->ncenterlite_my_list = 'My notification list';
@ -26,26 +26,27 @@ $lang->ncenterlite_message_noti_about = 'Get notice of a message after someone s
$lang->ncenterlite_activate = 'Activate';
$lang->ncenterlite_inactivate = 'Inactivate';
$lang->ncenterlite_userconfig_about_warning = 'Watch out! You are controlling other user\'s settings via this page.';
$lang->ncenterlite_article = '<strong>%1$s</strong> wrote an article as "%2$s".';
$lang->ncenterlite_board = '<strong>%1$s</strong> wrote "%3$s" on %2$s.';
$lang->ncenterlite_commented = '<strong>%1$s</strong> commented as "%3$s" on your %2$s.';
$lang->ncenterlite_commented_board = '<strong>%1$s</strong> commented as "%3$s" on the board %2$s.';
$lang->ncenterlite_mentioned = '<strong>%s</strong> mentioned you on <strong>"%s"board</strong> to <strong>"%s"</strong> .';
$lang->ncenterlite_message_string = 'You have <strong>%d</strong> new <strong>message(s)</strong>.';
$lang->ncenterlite_message_mention = '<strong>%1$s</strong> sent a message as <strong>"%2$s"</strong>.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>! Skin test notification has been done.';
$lang->ncenterlite_vote = '<strong>%1$s</strong> marked the article "%2$s" with a recommendation.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong> wrote "%3$s" on %2$s.';
$lang->ncenterlite_article = '<strong>%1$s</strong> wrote "%2$s".';
$lang->ncenterlite_board = '<strong>%1$s</strong> wrote "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_commented = '<strong>%1$s</strong> commented "%3$s" on your %2$s.';
$lang->ncenterlite_commented_board = '<strong>%1$s</strong> commented "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_mentioned = '<strong>%1$s</strong> mentioned you in a %4$s, "%3$s", on <strong>"%2$s"</strong>.';
$lang->ncenterlite_message_string = 'You have <strong>%d</strong> unread message.';
$lang->ncenterlite_message_string_plural = 'You have <strong>%d</strong> unread messages.';
$lang->ncenterlite_message_mention = '<strong>%1$s</strong> sent you a message, "%2$s".';
$lang->ncenterlite_test_noti = 'Hello, <strong>%s</strong>! This is a test notification.';
$lang->ncenterlite_vote = '<strong>%1$s</strong> upvoted your %3$s, "%2$s".';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong> wrote "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_ago = 'ago';
$lang->ncenterlite_date['0'] = 'Year';
$lang->ncenterlite_date['1'] = 'Month';
$lang->ncenterlite_date['2'] = 'Day';
$lang->ncenterlite_date['3'] = 'Hour';
$lang->ncenterlite_date['4'] = 'Minute';
$lang->ncenterlite_date['5'] = 'Second';
$lang->ncenterlite_date['0'] = 'year';
$lang->ncenterlite_date['1'] = 'month';
$lang->ncenterlite_date['2'] = 'day';
$lang->ncenterlite_date['3'] = 'hour';
$lang->ncenterlite_date['4'] = 'minute';
$lang->ncenterlite_date['5'] = 'second';
$lang->ncenterlite_sir = ' ';
$lang->ncenterlite_message = 'You have <strong class="num">%s</strong> notification.';
$lang->ncenterlite_messages = 'you have <strong class="num">%s</strong> notifications.';
$lang->ncenterlite_message = 'You have <strong class="num">%s</strong> new notification.';
$lang->ncenterlite_messages = 'You have <strong class="num">%s</strong> new notifications.';
$lang->ncenterlite_thisistest = '[*] This is a test notice.';
$lang->ncenterlite_delete_all = 'delete all';
$lang->ncenterlite_more = 'More';
@ -89,3 +90,6 @@ $lang->ncenterlite_commnet_event_noti_all = 'Notice every comments to the author
$lang->ncenterlite_commnet_event_noti_some = 'Notice only direct replies to the author';
$lang->ncenterlite_message_event = 'Notify message';
$lang->ncenterlite_message_event_about = 'Do not notify message (Use XE Core message notification system).';
$lang->ncenterlite_all_delete = 'Delete all';
$lang->ncenterlite_month_before_delete = 'Delete older than 1 month';
$lang->dont_check_notify_delete = 'Unread notifications will be deleted, too.';

View file

@ -1,13 +1,14 @@
<?php
$lang->ncenterlite = '알림센터 Lite';
$lang->ncenterlite_install_version = '설치된 버전';
$lang->ncenterlite_advenced_config = '고급설정';
$lang->ncenterlite_advenced_config = '고급 설정';
$lang->ncenterlite_document = '글';
$lang->ncenterlite_comment = '댓글';
$lang->ncenterlite_mention = '멘션';
$lang->ncenterlite_cmd_vote = '추천';
$lang->ncenterlite_comment_comment = '대댓글';
$lang->ncenterlite_type_message = '쪽지';
$lang->ncenterlite_type_test = '테스트';
$lang->ncenterlite_sender = '보낸 사람';
$lang->ncenterlite_addressee = '받는 사람';
$lang->ncenterlite_noti_contents = '내용';
@ -36,15 +37,16 @@ $lang->ncenterlite_activate = '사용';
$lang->ncenterlite_inactivate = '사용 안함';
$lang->ncenterlite_userconfig_about_warning = '주의! 당신은 관리자 권한으로 다른 사용자의 설정창에 접속하였습니다.';
$lang->ncenterlite_article = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_board = '<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_board = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong> 게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_commented = '<strong>%1$s</strong>님이 회원님의 %2$s에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.';
$lang->ncenterlite_commented_board = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong>게시판에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.';
$lang->ncenterlite_mentioned = '<strong>%s</strong>님이 <strong>"%s"</strong>게시판에서 <strong>"%s" </strong>게시글을 작성하며 회원님을 언급하였습니다.';
$lang->ncenterlite_mentioned = '<strong>%s</strong>님이 <strong>"%s"</strong> 게시판의 <strong>"%s"</strong> %s에서 회원님을 언급하였습니다.';
$lang->ncenterlite_message_string = '<strong>%d</strong>개의 읽지 않은 <strong>메시지</strong>가 있습니다.';
$lang->ncenterlite_message_mention = '<strong>%s</strong>님께서 <strong>"%s"</strong>라고 메시지를 보내셨습니다.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>님! 스킨 테스트 알림을 완료했습니다.';
$lang->ncenterlite_vote = '<strong>%s</strong>님이 <strong>"%s"</strong> 글을 추천하였습니다.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong>게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_message_string_plural = '<strong>%d</strong>개의 읽지 않은 <strong>메시지</strong>가 있습니다.';
$lang->ncenterlite_message_mention = '<strong>%s</strong>님이 <strong>"%s"</strong>라고 메시지를 보내셨습니다.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>님! 테스트 알림입니다.';
$lang->ncenterlite_vote = '<strong>%s</strong>님이 회원님의 <strong>"%s"</strong> %s을 추천하였습니다.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong> 게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_ago = '전';
$lang->ncenterlite_date['0'] = '년';
$lang->ncenterlite_date['1'] = '개월';
@ -107,12 +109,6 @@ $lang->ncenterlite_no_notify = '알림 내역이 없습니다.';
$lang->ncenterlite_all_delete = '전체 삭제';
$lang->ncenterlite_month_before_delete = '한 달 이전의 알림 삭제';
$lang->dont_check_notify_delete = '회원이 확인하지 않은 알림도 삭제됩니다.';
$lang->send_member = '보낸 사람';
$lang->resiver_member = '받는 사람';
$lang->notify_content = '알림 내용';
$lang->notify_read_check = '알림 읽음 여부';
$lang->notify_readed = '읽음';
$lang->notify_dont_readed = '읽지않음';
$lang->anonymous_nick_name_setting = '익명 닉네임 대체';
$lang->about_anonymous_nick_name = '익명 게시판에서 발생한 알림에 표시할 이름을 지정합니다.';
$lang->mention_suffixes = '멘션 접미사';
@ -121,4 +117,6 @@ $lang->mention_suffix_always_cut = '접미사가 포함된 이름 처리';
$lang->mention_suffix_always_cut_y = '접미사를 제외한 이름의 회원 우선';
$lang->mention_suffix_always_cut_n = '접미사를 포함한 이름의 회원 우선';
$lang->about_mention_suffix_always_cut = '\'알림센터님\'이라는 회원과 \'알림센터\'라는 회원이 모두 있을 경우 @알림센터님을 멘션하면 누구에게 알릴지 선택합니다.';
$lang->mention_limit = '멘션 갯수 제한';
$lang->about_mention_limit = '서버 과부하와 스팸을 방지하기 위해 한 글에서 지나치게 많은 회원들을 호출하지 못하도록 합니다.';
$lang->ncenterlite_msg_setting_error = '설정에 오류가 있습니다. 다시 설정해 주세요.';

View file

@ -14,6 +14,7 @@ class ncenterliteAdminController extends ncenterlite
'mention_names',
'mention_suffixes',
'mention_suffix_always_cut',
'mention_limit',
'hide_module_srls',
'admin_notify_module_srls',
'skin',

View file

@ -18,75 +18,7 @@ class ncenterliteAdminModel extends ncenterlite
foreach($list as $k => $v)
{
$target_member = $v->target_nick_name;
switch($v->type)
{
case 'D':
$type = $lang->ncenterlite_document; //$type = '글';
break;
case 'C':
$type = $lang->ncenterlite_comment; //$type = '댓글';
break;
// 메시지. 쪽지
case 'E':
$type = $lang->ncenterlite_type_message; //$type = '쪽지';
break;
}
switch($v->target_type)
{
case 'C':
$str = sprintf($lang->ncenterlite_commented, $target_member, $type, $v->target_summary);
//$str = sprintf('<strong>%s</strong>님이 회원님의 %s에 <strong>"%s" 댓글</strong>을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'A':
$str = sprintf($lang->ncenterlite_commented_board, $target_member, $v->target_browser, $v->target_summary);
//$str = sprintf('<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'M':
$str = sprintf($lang->ncenterlite_mentioned, $target_member, $v->target_summary, $type);
//$str = sprintf('<strong>%s</strong>님이 <strong>"%s" %s</strong>에서 회원님을 언급하였습니다.', $target_member, $v->target_summary, $type);
break;
// 메시지. 쪽지
case 'E':
if(version_compare(__XE_VERSION__, '1.7.4', '>='))
{
$str = sprintf($lang->ncenterlite_message_mention, $target_member, $v->target_summary);
//<strong>%s</strong>님께서 <strong>"%s"</strong>라고 메세지를 보내셨습니다.
}
else
{
$str = sprintf($lang->ncenterlite_message_string, $v->target_summary);
}
break;
case 'T':
$str = sprintf($lang->ncenterlite_test_noti, $target_member);
break;
case 'P':
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
//<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 글을 남겼습니다.
break;
case 'S':
if($v->target_browser)
{
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
}
else
{
$str = sprintf($lang->ncenterlite_article, $target_member, $v->target_summary);
}
break;
case 'V':
$str = sprintf($lang->ncenterlite_vote, $target_member, $v->target_summary);
break;
}
if($v->type=='U')
{
$str = $oNcenterliteModel->getNotifyTypeString($v->notify_type,unserialize($v->target_body));
}
$v->text = $str;
$v->text = $oNcenterliteModel->getNotificationText($v);
$v->ago = $oNcenterliteModel->getAgo($v->regdate);
$v->url = getUrl('','act','procNcenterliteRedirect', 'notify', $v->notify, 'url', $v->target_url);
if($v->target_member_srl)
@ -102,4 +34,4 @@ class ncenterliteAdminModel extends ncenterlite
return $output;
}
}
}

View file

@ -751,6 +751,7 @@ class ncenterliteController extends ncenterlite
Context::set('ncenterlite_list', $_output->data);
Context::set('ncenterlite_page_navigation', $_output->page_navigation);
Context::set('_ncenterlite_num', $_output->page_navigation->total_count);
if(Mobile::isFromMobilePhone())
{
@ -1096,6 +1097,16 @@ class ncenterliteController extends ncenterlite
// Find members.
foreach ($mentions as $mention)
{
if (isset($members[$mention]))
{
continue;
}
if (count($members) >= $config->mention_limit)
{
break;
}
if ($config->mention_suffix_always_cut != 'Y')
{
if ($config->mention_names === 'id')

View file

@ -28,6 +28,10 @@ class ncenterliteModel extends ncenterlite
$config->mention_suffixes = array('님', '様', 'さん', 'ちゃん');
}
unset($config->mention_format);
if(!isset($config->mention_limit))
{
$config->mention_limit = 20;
}
if(!$config->hide_module_srls) $config->hide_module_srls = array();
if(!is_array($config->hide_module_srls)) $config->hide_module_srls = explode('|@|', $config->hide_module_srls);
if(!$config->document_read) $config->document_read = 'Y';
@ -120,8 +124,6 @@ class ncenterliteModel extends ncenterlite
function getMyNotifyList($member_srl=null, $page=1, $readed='N')
{
global $lang;
$act = Context::get('act');
if($act=='dispNcenterliteNotifyList')
{
@ -137,71 +139,7 @@ class ncenterliteModel extends ncenterlite
foreach($list as $k => $v)
{
$target_member = $v->target_nick_name;
switch($v->type)
{
case 'D':
$type = $lang->ncenterlite_document; //$type = '글';
break;
case 'C':
$type = $lang->ncenterlite_comment; //$type = '댓글';
break;
// 메시지. 쪽지
case 'E':
$type = $lang->ncenterlite_type_message; //$type = '쪽지';
break;
}
switch($v->target_type)
{
case 'C':
$str = sprintf($lang->ncenterlite_commented, $target_member, $type, $v->target_summary);
//$str = sprintf('<strong>%s</strong>님이 회원님의 %s에 <strong>"%s" 댓글</strong>을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'A':
$str = sprintf($lang->ncenterlite_commented_board, $target_member, $v->target_browser, $v->target_summary);
//$str = sprintf('<strong>%1$s</strong>님이 게시판 <strong>"%2$s"</strong>에 <strong>"%3$s"</strong>라고 댓글을 남겼습니다.', $target_member, $type, $v->target_summary);
break;
case 'M':
$str = sprintf($lang->ncenterlite_mentioned, $target_member, $v->target_browser, $v->target_summary);
//$str = sprintf('<strong>%s</strong>님이 <strong>"%s" %s</strong>에서 회원님을 언급하였습니다.', $target_member, $v->target_summary, $type);
break;
// 메시지. 쪽지
case 'E':
$str = sprintf($lang->ncenterlite_message_mention,$target_member, $v->target_summary);
break;
case 'T':
$str = sprintf($lang->ncenterlite_test_noti, $target_member);
break;
case 'P':
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
break;
case 'S':
if($v->target_browser)
{
$str = sprintf($lang->ncenterlite_board, $target_member, $v->target_browser, $v->target_summary);
}
else
{
$str = sprintf($lang->ncenterlite_article, $target_member, $v->target_summary);
}
break;
case 'V':
$str = sprintf($lang->ncenterlite_vote, $target_member, $v->target_summary);
break;
case 'B':
$str = sprintf($lang->ncenterlite_admin_content_message, $target_member, $v->target_browser, $v->target_summary);
break;
}
if($v->type=='U')
{
$str = $this->getNotifyTypeString($v->notify_type,unserialize($v->target_body));
}
$v->text = $str;
$v->text = $this->getNotificationText($v);
$v->ago = $this->getAgo($v->regdate);
$v->url = getUrl('','act','procNcenterliteRedirect', 'notify', $v->notify, 'url', $v->target_url);
if($v->target_member_srl)
@ -356,7 +294,109 @@ class ncenterliteModel extends ncenterlite
if(count($colorset_list)) $colorsets = implode("\n", $colorset_list);
$this->add('colorset_list', $colorsets);
}
/**
* Return the notification text.
*
* @param object $notification
* @return string
*/
public function getNotificationText($notification)
{
global $lang;
// Get the type of notification.
switch ($notification->type)
{
// Document.
case 'D':
$type = $lang->ncenterlite_document;
break;
// Comment.
case 'C':
$type = $lang->ncenterlite_comment;
break;
// Message.
case 'E':
$type = $lang->ncenterlite_type_message;
break;
// Test.
case 'T':
$type = $lang->ncenterlite_type_test;
break;
// Other.
case 'U':
default:
return $this->getNotifyTypeString($notification->notify_type, unserialize($notification->target_body)) ?: $lang->ncenterlite;
}
// Get the notification text.
switch ($notification->target_type)
{
// Comment on your document.
case 'C':
$str = sprintf($lang->ncenterlite_commented, $notification->target_nick_name, $type, $notification->target_summary);
break;
// Comment on a board.
case 'A':
$str = sprintf($lang->ncenterlite_commented_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
break;
// Mentioned.
case 'M':
$str = sprintf($lang->ncenterlite_mentioned, $notification->target_nick_name, $notification->target_browser, $notification->target_summary, $type);
break;
// Message arrived.
case 'E':
$str = sprintf($lang->ncenterlite_message_mention, $notification->target_nick_name, $notification->target_summary);
break;
// Test notification.
case 'T':
$str = sprintf($lang->ncenterlite_test_noti, $notification->target_nick_name);
break;
// New document on a board.
case 'P':
$str = sprintf($lang->ncenterlite_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
break;
// New document.
case 'S':
if($notification->target_browser)
{
$str = sprintf($lang->ncenterlite_board, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
}
else
{
$str = sprintf($lang->ncenterlite_article, $notification->target_nick_name, $notification->target_summary);
}
break;
// Voted.
case 'V':
$str = sprintf($lang->ncenterlite_vote, $notification->target_nick_name, $notification->target_summary, $type);
break;
// Admin notification.
case 'B':
$str = sprintf($lang->ncenterlite_admin_content_message, $notification->target_nick_name, $notification->target_browser, $notification->target_summary);
break;
// Other.
default:
$str = $lang->ncenterlite;
}
return $str;
}
/**
* @brief 주어진 시간이 얼마 인지 반환
* @param string YmdHis
@ -367,9 +407,8 @@ class ncenterliteModel extends ncenterlite
global $lang;
$lang_type = Context::getLangType();
$display = $lang->ncenterlite_date; // array('Year', 'Month', 'Day', 'Hour', 'Minute', 'Second')
$ago = $lang->ncenterlite_ago; // 'Ago'
$display = $lang->ncenterlite_date;
$ago = $lang->ncenterlite_ago;
$date = getdate(strtotime(zdate($datetime, 'Y-m-d H:i:s')));

View file

@ -39,6 +39,15 @@
<p class="x_help-block">{$lang->about_mention_suffix_always_cut}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->mention_limit}</label>
<div class="x_controls">
<label class="x_inline">
<input type="number" name="mention_limit" value="{intval($config->mention_limit)}" />
</label>
<p class="x_help-block">{$lang->about_mention_limit}</p>
</div>
</div>
</section>
<div class="x_clearfix btnArea">
<div class="x_pull-right">

View file

@ -2,7 +2,7 @@
<include target="header.html" />
<section class="section">
<h1>알림 목록</h1>
<h1>{$lang->ncenterlite_notice_list}</h1>
<p class="x_well x_well-small" cond="!$ncenterlite_list">{$lang->ncenterlite_no_notify}</p>
@ -22,10 +22,10 @@
<table class="x_table x_table-striped x_table-hover" style="margin-top:20px;">
<thead>
<tr>
<th scope="col" class="nowr" style="width:100px;">{$lang->send_member}</th>
<th scope="col" style="width:100px;">{$lang->resiver_member}</th>
<th scope="col" style="width:500px;">{$lang->notify_content}</th>
<th scope="col" style="width:50px;">{$lang->notify_read_check}</th>
<th scope="col" class="nowr" style="width:100px;">{$lang->ncenterlite_sender}</th>
<th scope="col" style="width:100px;">{$lang->ncenterlite_addressee}</th>
<th scope="col" style="width:500px;">{$lang->ncenterlite_noti_contents}</th>
<th scope="col" style="width:50px;">{$lang->ncenterlite_read}</th>
<th scope="col" style="width:100px;">{$lang->date}</th>
</tr>
</thead>
@ -40,8 +40,8 @@
<td cond="$member_info->member_srl">{$member_info->nick_name}</td> <td cond="!$member_info->member_srl">타겟없음</td>
<td><a href="{$val->target_url}">{$val->text}</a></td>
<td>
<span cond="$val->readed == 'Y'" style="color:#8582E6">{$lang->notify_readed}</span>
<span cond="$val->readed != 'Y'" style="color:#FF2828">{$lang->notify_dont_readed}</span>
<span cond="$val->readed == 'Y'" style="color:#8582E6">{$lang->ncenterlite_read_y}</span>
<span cond="$val->readed != 'Y'" style="color:#FF2828">{$lang->ncenterlite_read_n}</span>
</td>
<td>
{zdate($val->regdate,"Y-m-d")}
@ -67,4 +67,4 @@
</ul>
</div>
</block>
</section>
</section>

View file

@ -672,12 +672,7 @@ class pointController extends point
$trigger_obj->new_group_list = $new_group_list;
$trigger_obj->del_group_list = $del_group_list;
$trigger_obj->new_level = $level;
$trigger_output = ModuleHandler::triggerCall('point.setPoint', 'after', $trigger_obj);
if(!$trigger_output->toBool())
{
$oDB->rollback();
return $trigger_output;
}
ModuleHandler::triggerCall('point.setPoint', 'after', $trigger_obj);
$oDB->commit();