mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 20:32:14 +09:00
Merge branch 'develop' into pr/cache-refactor
Conflicts: modules/ncenterlite/ncenterlite.controller.php
This commit is contained in:
commit
3b8db58954
30 changed files with 192 additions and 144 deletions
|
|
@ -1524,7 +1524,6 @@ class Context
|
|||
if ($status != 200)
|
||||
{
|
||||
$oMessageObject->setHttpStatusCode($status);
|
||||
ModuleHandler::_setHttpStatusMessage($status);
|
||||
}
|
||||
|
||||
if (in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON', 'JS_CALLBACK')))
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class DisplayHandler extends Handler
|
|||
|
||||
// header output
|
||||
$httpStatusCode = $oModule->getHttpStatusCode();
|
||||
if($httpStatusCode && $httpStatusCode != 200 && !in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON', 'JS_CALLBACK')))
|
||||
if($httpStatusCode !== 200 && !in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON', 'JS_CALLBACK')))
|
||||
{
|
||||
self::_printHttpStatusCode($httpStatusCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -207,6 +207,20 @@ class ModuleHandler extends Handler
|
|||
{
|
||||
unset($module_info);
|
||||
}
|
||||
|
||||
// if the secret document permission does not have, specify HTTP 403
|
||||
if(Context::getRequestMethod() == 'GET')
|
||||
{
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($this->document_srl);
|
||||
if($oDocument->isSecret() || $oDocument->get('status') === $oDocumentModel->getConfigStatus('temp'))
|
||||
{
|
||||
if(!$oDocument->isGranted() && !$oDocument->isAccessible())
|
||||
{
|
||||
$this->httpStatusCode = '403';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +646,7 @@ class ModuleHandler extends Handler
|
|||
{
|
||||
self::_setInputErrorToContext();
|
||||
|
||||
$this->error = 'msg_is_not_administrator';
|
||||
$this->error = 'admin.msg_is_not_administrator';
|
||||
$oMessageObject = self::getModuleInstance('message', $display_mode);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
|
|
@ -646,7 +660,7 @@ class ModuleHandler extends Handler
|
|||
if(!$grant->manager)
|
||||
{
|
||||
self::_setInputErrorToContext();
|
||||
$this->error = 'msg_is_not_administrator';
|
||||
$this->error = 'admin.msg_is_not_administrator';
|
||||
$oMessageObject = self::getModuleInstance('message', $display_mode);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
|
|
@ -658,7 +672,7 @@ class ModuleHandler extends Handler
|
|||
if(!$grant->is_admin && $this->module != $this->orig_module->module && $xml_info->permission->{$this->act} != 'manager')
|
||||
{
|
||||
self::_setInputErrorToContext();
|
||||
$this->error = 'msg_is_not_administrator';
|
||||
$this->error = 'admin.msg_is_not_administrator';
|
||||
$oMessageObject = self::getModuleInstance('message', $display_mode);
|
||||
$oMessageObject->setError(-1);
|
||||
$oMessageObject->setMessage($this->error);
|
||||
|
|
@ -897,7 +911,6 @@ class ModuleHandler extends Handler
|
|||
$methodList = array('XMLRPC' => 1, 'JSON' => 1, 'JS_CALLBACK' => 1);
|
||||
if(!isset($methodList[Context::getRequestMethod()]))
|
||||
{
|
||||
|
||||
if($_SESSION['XE_VALIDATOR_RETURN_URL'])
|
||||
{
|
||||
header('location: ' . $_SESSION['XE_VALIDATOR_RETURN_URL']);
|
||||
|
|
@ -914,24 +927,25 @@ class ModuleHandler extends Handler
|
|||
$oMessageObject->setMessage($this->error);
|
||||
$oMessageObject->dispMessage();
|
||||
|
||||
if($oMessageObject->getHttpStatusCode() && $oMessageObject->getHttpStatusCode() != '200')
|
||||
// display Error Page
|
||||
if(!in_array($oMessageObject->getHttpStatusCode(), array(200, 403)))
|
||||
{
|
||||
self::_setHttpStatusMessage($oMessageObject->getHttpStatusCode());
|
||||
$oMessageObject->setTemplateFile('http_status_code');
|
||||
}
|
||||
|
||||
|
||||
// If module was called normally, change the templates of the module into ones of the message view module
|
||||
if($oModule)
|
||||
{
|
||||
$oModule->setTemplatePath($oMessageObject->getTemplatePath());
|
||||
$oModule->setTemplateFile($oMessageObject->getTemplateFile());
|
||||
$oModule->setHttpStatusCode($oMessageObject->getHttpStatusCode());
|
||||
// Otherwise, set message instance as the target module
|
||||
}
|
||||
else
|
||||
{
|
||||
$oModule = $oMessageObject;
|
||||
}
|
||||
|
||||
|
||||
self::_clearErrorSession();
|
||||
}
|
||||
|
||||
|
|
@ -1049,7 +1063,16 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Set http status code
|
||||
if($this->httpStatusCode && $oModule->getHttpStatusCode() === 200)
|
||||
{
|
||||
$oModule->setHttpStatusCode($this->httpStatusCode);
|
||||
}
|
||||
|
||||
// Set http status message
|
||||
self::_setHttpStatusMessage($oModule->getHttpStatusCode());
|
||||
|
||||
// Display contents
|
||||
$oDisplayHandler = new DisplayHandler();
|
||||
$oDisplayHandler->printContent($oModule);
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ class ModuleObject extends Object
|
|||
{
|
||||
case 'root' :
|
||||
case 'manager' :
|
||||
$this->stop('msg_is_not_administrator');
|
||||
$this->stop('admin.msg_is_not_administrator');
|
||||
return;
|
||||
case 'member' :
|
||||
if(!$is_logged)
|
||||
|
|
@ -236,7 +236,8 @@ class ModuleObject extends Object
|
|||
|
||||
$this->setTemplatePath($oMessageObject->getTemplatePath());
|
||||
$this->setTemplateFile($oMessageObject->getTemplateFile());
|
||||
|
||||
$this->setHttpStatusCode($oMessageObject->getHttpStatusCode());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class Object
|
|||
* http status code.
|
||||
* @var int
|
||||
*/
|
||||
var $httpStatusCode = NULL;
|
||||
var $httpStatusCode = 200;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -73,9 +73,9 @@ class Object
|
|||
* @param int $code HTTP status code. Default value is `200` that means successful
|
||||
* @return void
|
||||
*/
|
||||
function setHttpStatusCode($code = '200')
|
||||
function setHttpStatusCode($code = 200)
|
||||
{
|
||||
$this->httpStatusCode = $code;
|
||||
$this->httpStatusCode = (int) $code;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
// If the response contains an error, display the error message.
|
||||
if(data.error != "0" && data.error > -1000) {
|
||||
if(data.error == -1 && data.message == "msg_is_not_administrator") {
|
||||
if(data.error == -1 && data.message == "admin.msg_is_not_administrator") {
|
||||
alert("You are not logged in as an administrator.");
|
||||
if ($.isFunction(callback_error)) {
|
||||
callback_error(data);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class adminAdminController extends admin
|
|||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
return $this->stop("msg_is_not_administrator");
|
||||
return $this->stop("admin.msg_is_not_administrator");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class adminAdminView extends admin
|
|||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
return $this->stop("msg_is_not_administrator");
|
||||
return $this->stop("admin.msg_is_not_administrator");
|
||||
}
|
||||
|
||||
// change into administration layout
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class adminloggingController extends adminlogging
|
|||
$logged_info = $oMemberModel->getLoggedInfo();
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
return $this->stop("msg_is_not_administrator");
|
||||
return $this->stop("admin.msg_is_not_administrator");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1136,9 +1136,9 @@ class boardView extends board
|
|||
**/
|
||||
function dispBoardMessage($msg_code)
|
||||
{
|
||||
$msg = lang($msg_code);
|
||||
if(!$msg) $msg = $msg_code;
|
||||
Context::set('message', $msg);
|
||||
Context::set('message', lang($msg_code));
|
||||
|
||||
$this->setHttpStatusCode(403);
|
||||
$this->setTemplateFile('message');
|
||||
}
|
||||
|
||||
|
|
@ -1189,7 +1189,9 @@ class boardView extends board
|
|||
function alertMessage($message)
|
||||
{
|
||||
$script = sprintf('<script> jQuery(function(){ alert("%s"); } );</script>', lang($message));
|
||||
Context::addHtmlFooter( $script );
|
||||
Context::addHtmlFooter($script);
|
||||
|
||||
$this->setHttpStatusCode(403);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ $lang->webmaster_email = '웹마스터 메일주소';
|
|||
$lang->column_id = '입력항목 ID';
|
||||
$lang->about_column_id = '입력항목의 구분자로 사용될 ID입니다. 영문으로 시작하고 영문 숫자만 사용가능합니다.';
|
||||
$lang->options = '선택 옵션';
|
||||
$lang->about_keep_signed = '브라우저를 닫더라도 로그인이 계속 유지될 수 있습니다.\\n\\n로그인 유지 기능을 사용할 경우 다음 접속부터는 로그인할 필요가 없습니다.\\n\\n단, 게임방, 학교 등 공공장소에서 이용 시 개인정보가 유출될 수 있으니 꼭 로그아웃을 해주세요.';
|
||||
$lang->about_keep_warning = '브라우저를 닫더라도 로그인이 계속 유지될 수 있습니다. 로그인 유지 기능을 사용할 경우 다음 접속부터는 로그인할 필요가 없습니다. 단, 게임방, 학교 등 공공장소에서 이용 시 개인정보가 유출될 수 있으니 꼭 로그아웃을 해주세요.';
|
||||
$lang->about_keep_signed = '브라우저를 닫더라도 로그인이 계속 유지될 수 있습니다.\\n\\n로그인 유지 기능을 사용할 경우 다음 접속부터는 로그인할 필요가 없습니다.\\n\\n단, PC방, 학교, 도서관 등 공공장소에서 이용 시 개인정보가 유출될 수 있으니 꼭 로그아웃을 해주세요.';
|
||||
$lang->about_keep_warning = '브라우저를 닫더라도 로그인이 계속 유지될 수 있습니다. 로그인 유지 기능을 사용할 경우 다음 접속부터는 로그인할 필요가 없습니다. 단, PC방, 학교, 도서관 등 공공장소에서 이용 시 개인정보가 유출될 수 있으니 꼭 로그아웃을 해주세요.';
|
||||
$lang->about_webmaster_name = '인증 메일이나 기타 사이트 관리 시 사용될 웹마스터의 이름을 입력해주세요. (기본 : webmaster)';
|
||||
$lang->about_webmaster_email = '인증 메일이나 기타 사이트 관리 시 사용될 웹마스터의 메일 주소를 입력해주세요.';
|
||||
$lang->search_target_list['email_address'] = '이메일';
|
||||
|
|
|
|||
|
|
@ -1910,9 +1910,14 @@ class memberController extends member
|
|||
function addMemberMenu($act, $str)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
|
||||
if(!is_object($logged_info))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$logged_info->menu_list[$act] = lang($str);
|
||||
|
||||
|
||||
Context::set('logged_info', $logged_info);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,12 +20,15 @@ class messageMobile extends messageView
|
|||
$config = $oModuleModel->getModuleConfig('message');
|
||||
if(!is_object($config)) $config = new stdClass;
|
||||
if(!$config->mskin) $config->mskin = 'default';
|
||||
|
||||
// Set the template path
|
||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin);
|
||||
|
||||
// Get the member configuration
|
||||
$oModuleModel = getModel('module');
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
Context::set('member_config', $member_config);
|
||||
|
||||
// Set a flag to check if the https connection is made when using SSL and create https url
|
||||
$ssl_mode = false;
|
||||
if($member_config->enable_ssl == 'Y')
|
||||
|
|
@ -41,6 +44,12 @@ class messageMobile extends messageView
|
|||
|
||||
$this->setTemplatePath($template_path);
|
||||
$this->setTemplateFile('system_message');
|
||||
|
||||
// Default 403 Error
|
||||
if($this->getHttpStatusCode() === 200)
|
||||
{
|
||||
$this->setHttpStatusCode(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of file message.mobile.php */
|
||||
|
|
|
|||
|
|
@ -31,27 +31,16 @@ class messageView extends message
|
|||
if(!$config->skin)
|
||||
{
|
||||
$config->skin = 'xedition';
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
|
||||
}
|
||||
else
|
||||
{
|
||||
//check theme
|
||||
$config_parse = explode('|@|', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
|
||||
}
|
||||
}
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
|
||||
|
||||
// Template path
|
||||
$this->setTemplatePath($template_path);
|
||||
|
||||
// Get the member configuration
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
Context::set('member_config', $member_config);
|
||||
|
||||
// Set a flag to check if the https connection is made when using SSL and create https url
|
||||
$ssl_mode = false;
|
||||
if($member_config->enable_ssl == 'Y')
|
||||
|
|
@ -64,6 +53,12 @@ class messageView extends message
|
|||
Context::set('system_message_detail', nl2br($detail));
|
||||
|
||||
$this->setTemplateFile('system_message');
|
||||
|
||||
// Default 403 Error
|
||||
if($this->getHttpStatusCode() === 200)
|
||||
{
|
||||
$this->setHttpStatusCode(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of file message.view.php */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ section{margin-top:20px}
|
|||
</style>
|
||||
<section>
|
||||
<div>
|
||||
<h1>404 Not Found</h1>
|
||||
<h1>{$http_status_code} {$http_status_message}</h1>
|
||||
<p>{$lang->msg_module_is_not_exists}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<!--// BODY -->
|
||||
<section class="xedition-error">
|
||||
<h1>404</h1>
|
||||
<p>Oops, Sorry.<br>Page is not found!</p>
|
||||
<h1>{$http_status_code}</h1>
|
||||
<p>Oops, Sorry.<br>Page is {$http_status_message}!</p>
|
||||
<img src="./img/error.png" width="340" height="400" />
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<action name="dispNcenterliteAdminSeletedmid" type="view" />
|
||||
<action name="dispNcenterliteAdminTest" type="view" />
|
||||
<action name="dispNcenterliteAdminSkinsetting" type="view" />
|
||||
<action name="dispNcenterliteAdminAdvancedconfig" type="view" />
|
||||
<action name="dispNcenterliteNotifyList" type="view" />
|
||||
<action name="dispNcenterliteAdminList" type="view" />
|
||||
<action name="dispNcenterliteUserConfig" type="view" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
$lang->ncenterlite = 'Notification Center Lite';
|
||||
$lang->ncenterlite_install_version = 'Installed version';
|
||||
$lang->ncenterlite_advenced_config = 'Advenced Setting';
|
||||
$lang->ncenterlite_document = 'document';
|
||||
$lang->ncenterlite_comment = 'comment';
|
||||
$lang->ncenterlite_type_message = 'message';
|
||||
|
|
@ -26,14 +27,15 @@ $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 an article as "%3$s" on the board %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" %s</strong>.';
|
||||
$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_ago = 'ago';
|
||||
$lang->ncenterlite_date['0'] = 'Year';
|
||||
$lang->ncenterlite_date['1'] = 'Month';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
$lang->ncenterlite = '알림센터 Lite';
|
||||
$lang->ncenterlite_install_version = '설치된 버전';
|
||||
$lang->ncenterlite_advenced_config = '고급설정';
|
||||
$lang->ncenterlite_document = '글';
|
||||
$lang->ncenterlite_comment = '댓글';
|
||||
$lang->ncenterlite_mention = '멘션';
|
||||
|
|
@ -38,7 +39,7 @@ $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_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" %s</strong>에서 회원님을 언급하였습니다.';
|
||||
$lang->ncenterlite_mentioned = '<strong>%s</strong>님이 <strong>"%s"</strong>게시판에서 <strong>"%s" </strong>게시글을 작성하며 회원님을 언급하였습니다.';
|
||||
$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>님! 스킨 테스트 알림을 완료했습니다.';
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ class ncenterliteAdminController extends ncenterlite
|
|||
'mention_names',
|
||||
'mention_suffixes',
|
||||
'mention_suffix_always_cut',
|
||||
'document_notify',
|
||||
'hide_module_srls',
|
||||
'admin_notify_module_srls',
|
||||
'skin',
|
||||
|
|
@ -26,7 +25,6 @@ class ncenterliteAdminController extends ncenterlite
|
|||
'document_read',
|
||||
'layout_srl',
|
||||
'mlayout_srl',
|
||||
'document_notify'
|
||||
);
|
||||
|
||||
foreach($config_vars as $val)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,14 @@ class ncenterliteAdminView extends ncenterlite
|
|||
$security->encodeHTML('colorset_list..name','colorset_list..title');
|
||||
}
|
||||
|
||||
function dispNcenterliteAdminAdvancedconfig()
|
||||
{
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
|
||||
$config = $oNcenterliteModel->getConfig();
|
||||
Context::set('config', $config);
|
||||
}
|
||||
|
||||
function dispNcenterliteAdminList()
|
||||
{
|
||||
$oNcenterliteAdminModel = getAdminModel('ncenterlite');
|
||||
|
|
|
|||
|
|
@ -88,48 +88,14 @@ class ncenterliteController extends ncenterlite
|
|||
$logged_info = Context::get('logged_info');
|
||||
$admin_list = $oNcenterliteModel->getMemberAdmins();
|
||||
|
||||
$admin_document_notify = false;
|
||||
if(isset($config->use['admin_content']) && is_array($config->admin_notify_module_srls) && in_array($module_info->module_srl, $config->admin_notify_module_srls))
|
||||
{
|
||||
foreach($admin_list as $admins)
|
||||
{
|
||||
if($logged_info->member_srl == $admins)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $admins->member_srl;
|
||||
$args->srl = $obj->document_srl;
|
||||
$args->target_p_srl = $obj->document_srl;
|
||||
$args->target_srl = $obj->document_srl;
|
||||
$args->type = $this->_TYPE_DOCUMENT;
|
||||
$args->target_type = $this->_TYPE_ADMIN_DOCUMENT;
|
||||
$args->target_url = getNotEncodedFullUrl('', 'document_srl', $obj->document_srl);
|
||||
$args->target_summary = cut_str(strip_tags($obj->title), 50);
|
||||
$args->regdate = date('YmdHis');
|
||||
$args->target_browser = $module_info->browser_title;
|
||||
$args->notify = $this->_getNotifyId($args);
|
||||
$output = $this->_insertNotify($args, $is_anonymous);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
else
|
||||
{
|
||||
$admin_document_notify = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$mention_targets || !count($mention_targets) || !isset($config->use['mention']))
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
// 맨션 알림일경우 맨션알림 시작.
|
||||
if($mention_targets)
|
||||
if(!empty($mention_targets))
|
||||
{
|
||||
if(!$mention_targets && !count($mention_targets) || !isset($config->use['mention']))
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
// !TODO 공용 메소드로 분리
|
||||
foreach($mention_targets as $mention_member_srl)
|
||||
{
|
||||
|
|
@ -141,11 +107,6 @@ class ncenterliteController extends ncenterlite
|
|||
continue;
|
||||
}
|
||||
|
||||
if(is_array($admin_list) && in_array($mention_member_srl, $admin_list) && isset($config->use['admin_content']) && $admin_document_notify == true)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $mention_member_srl;
|
||||
$args->srl = $obj->document_srl;
|
||||
|
|
@ -168,6 +129,35 @@ class ncenterliteController extends ncenterlite
|
|||
}
|
||||
}
|
||||
|
||||
if(isset($config->use['admin_content']) && is_array($config->admin_notify_module_srls) && in_array($module_info->module_srl, $config->admin_notify_module_srls) && empty($mention_targets))
|
||||
{
|
||||
foreach($admin_list as $admins)
|
||||
{
|
||||
if($logged_info->member_srl == $admins)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->member_srl = $admins;
|
||||
$args->srl = $obj->document_srl;
|
||||
$args->target_p_srl = $obj->document_srl;
|
||||
$args->target_srl = $obj->document_srl;
|
||||
$args->type = $this->_TYPE_DOCUMENT;
|
||||
$args->target_type = $this->_TYPE_ADMIN_DOCUMENT;
|
||||
$args->target_url = getNotEncodedFullUrl('', 'document_srl', $obj->document_srl);
|
||||
$args->target_summary = cut_str(strip_tags($obj->title), 50);
|
||||
$args->regdate = date('YmdHis');
|
||||
$args->target_browser = $module_info->browser_title;
|
||||
$args->notify = $this->_getNotifyId($args);
|
||||
$output = $this->_insertNotify($args, $is_anonymous);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +222,7 @@ class ncenterliteController extends ncenterlite
|
|||
if(isset($config->use['mention']))
|
||||
{
|
||||
$mention_targets = $this->_getMentionTarget($content);
|
||||
|
||||
|
||||
// !TODO 공용 메소드로 분리
|
||||
foreach($mention_targets as $mention_member_srl)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,11 +28,9 @@ class ncenterliteModel extends ncenterlite
|
|||
$config->mention_suffixes = array('님', '様', 'さん', 'ちゃん');
|
||||
}
|
||||
unset($config->mention_format);
|
||||
if(!$config->document_notify) $config->document_notify = 'direct-comment';
|
||||
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 = 'N';
|
||||
if(!$config->voted_format) $config->voted_format = 'N';
|
||||
if(!$config->document_read) $config->document_read = 'Y';
|
||||
if(!$config->skin) $config->skin = 'default';
|
||||
if(!$config->colorset) $config->colorset = 'black';
|
||||
if(!$config->zindex) $config->zindex = '9999';
|
||||
|
|
@ -168,7 +166,7 @@ class ncenterliteModel extends ncenterlite
|
|||
//$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($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;
|
||||
// 메시지. 쪽지
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
<field name="display_use" />
|
||||
<field name="mention_suffixes" />
|
||||
<field name="mention_names" />
|
||||
<field name="document_notify" />
|
||||
<field name="skin" />
|
||||
<field name="colorset" />
|
||||
<field name="zindex" />
|
||||
|
|
|
|||
56
modules/ncenterlite/tpl/advancedconfig.html
Normal file
56
modules/ncenterlite/tpl/advancedconfig.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<include target="header.html" />
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal" id="fo_ncenterlite">
|
||||
<input type="hidden" name="module" value="ncenterlite" />
|
||||
<input type="hidden" name="disp_act" value="dispNcenterliteAdminAdvancedconfig" />
|
||||
<input type="hidden" name="act" value="procNcenterliteAdminInsertConfig" />
|
||||
|
||||
<section class="section">
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->ncenterlite_mention_target}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_names_id" name="mention_names" value="id" checked="checked"|cond="$config->mention_names == 'id'" /> {$lang->user_id}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_names_nick_name" name="mention_names" value="nick_name" checked="checked"|cond="$config->mention_names == 'nick_name'" /> {$lang->nick_name}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->ncenterlite_mention_target_about}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mention_suffixes}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="text" name="mention_suffixes" value="{escape(implode(', ', $config->mention_suffixes), false)}" />
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_mention_suffixes}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mention_suffix_always_cut}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_suffix_always_cut_y" name="mention_suffix_always_cut" value="Y" checked="checked"|cond="$config->mention_suffix_always_cut == 'Y'" /> {$lang->mention_suffix_always_cut_y}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_suffix_always_cut_n" name="mention_suffix_always_cut" value="N" checked="checked"|cond="$config->mention_suffix_always_cut != 'Y'" /> {$lang->mention_suffix_always_cut_n}
|
||||
</label>
|
||||
<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->anonymous_nick_name_setting}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="anonymous_name" value="{escape($config->anonymous_name, false)}" />
|
||||
<p class="x_help-block">{$lang->about_anonymous_nick_name}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -44,39 +44,6 @@
|
|||
<p class="x_help-block">{$lang->about_member_menu_view}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->ncenterlite_mention_target}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_names_id" name="mention_names" value="id" checked="checked"|cond="$config->mention_names == 'id'" /> {$lang->user_id}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_names_nick_name" name="mention_names" value="nick_name" checked="checked"|cond="$config->mention_names == 'nick_name'" /> {$lang->nick_name}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->ncenterlite_mention_target_about}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mention_suffixes}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="text" name="mention_suffixes" value="{escape(implode(', ', $config->mention_suffixes), false)}" />
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_mention_suffixes}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mention_suffix_always_cut}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_suffix_always_cut_y" name="mention_suffix_always_cut" value="Y" checked="checked"|cond="$config->mention_suffix_always_cut == 'Y'" /> {$lang->mention_suffix_always_cut_y}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<input type="radio" id="mention_suffix_always_cut_n" name="mention_suffix_always_cut" value="N" checked="checked"|cond="$config->mention_suffix_always_cut != 'Y'" /> {$lang->mention_suffix_always_cut_n}
|
||||
</label>
|
||||
<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->ncenterlite_document_event_read}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -85,13 +52,6 @@
|
|||
<p class="x_help-block">{$lang->ncenterlite_document_event_read_about}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->anonymous_nick_name_setting}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="anonymous_name" value="{escape($config->anonymous_name, false)}" />
|
||||
<p class="x_help-block">{$lang->about_anonymous_nick_name}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<div class="header4">
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$act=='dispNcenterliteAdminConfig'"><a href="{getUrl('act','dispNcenterliteAdminConfig')}">{$lang->ncenterlite_basic_settings}</a></li>
|
||||
<li class="x_active"|cond="$act=='dispNcenterliteAdminAdvancedconfig'"><a href="{getUrl('act', 'dispNcenterliteAdminAdvancedconfig')}">{$lang->ncenterlite_advenced_config}</a></li>
|
||||
<li class="x_active"|cond="$act=='dispNcenterliteAdminSeletedmid'"><a href="{getUrl('act','dispNcenterliteAdminSeletedmid')}">{$lang->ncenterlite_mid_use}</a></li>
|
||||
<li class="x_active"|cond="$act=='dispNcenterliteAdminSkinsetting'"><a href="{getUrl('act','dispNcenterliteAdminSkinsetting')}">{$lang->ncenterlite_skin_settings}</a></li>
|
||||
<li class="x_active"|cond="$act=='dispNcenterliteAdminTest'"><a href="{getUrl('act','dispNcenterliteAdminTest')}">{$lang->ncenterlite_test}</a></li>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<input type="text" name="orgpoint" value="{$val->point}" disabled="disabled" style="width:40px;text-align:right" />
|
||||
->
|
||||
<span class="x_input-append">
|
||||
<input type="number" id="point_{$val->member_srl}" value="{$val->point}" name="point" required style="width:60px;text-align:right" />
|
||||
<input type="text" id="point_{$val->member_srl}" value="{$val->point}" name="point" required style="width:60px;text-align:right" />
|
||||
<input type="button" value="{$lang->cmd_update}" onclick="updatePoint({$val->member_srl})" class="x_btn" />
|
||||
</span>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue