mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Merge pull request #1109 from bjrambo/pr/mailFromeSet
커뮤니케이션모듈의 메일 전송 기능을 삭제하고 알림센터에서 메일 전송 기능 연동
This commit is contained in:
commit
3f452a1cfe
8 changed files with 33 additions and 37 deletions
|
|
@ -78,12 +78,6 @@ class communicationController extends communication
|
|||
throw new Rhymix\Framework\Exception('msg_content_is_null');
|
||||
}
|
||||
|
||||
$send_mail = Context::get('send_mail');
|
||||
if($send_mail != 'Y')
|
||||
{
|
||||
$send_mail = 'N';
|
||||
}
|
||||
|
||||
// Check if there is a member to receive a message
|
||||
$oMemberModel = getModel('member');
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
|
@ -124,21 +118,6 @@ class communicationController extends communication
|
|||
return $output;
|
||||
}
|
||||
|
||||
// send an e-mail
|
||||
if($send_mail == 'Y')
|
||||
{
|
||||
$view_url = Context::getRequestUri();
|
||||
$content = sprintf("%s<br /><br />From : <a href=\"%s\" target=\"_blank\">%s</a>", $content, $view_url, $view_url);
|
||||
|
||||
$oMail = new \Rhymix\Framework\Mail();
|
||||
$oMail->setSubject($title);
|
||||
$oMail->setBody(utf8_mbencode(removeHackTag($content)));
|
||||
$oMail->setFrom(config('mail.default_from') ?: $logged_info->email_address, $logged_info->nick_name);
|
||||
$oMail->setReplyTo($logged_info->email_address);
|
||||
$oMail->addTo($receiver_member_info->email_address, $receiver_member_info->nick_name);
|
||||
$oMail->send();
|
||||
}
|
||||
|
||||
if(!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON')))
|
||||
{
|
||||
if(Context::get('is_popup') != 'Y')
|
||||
|
|
|
|||
|
|
@ -41,9 +41,6 @@
|
|||
<label for="message_content">{$lang->content}</label>
|
||||
<textarea id="message_content" name="new_content" rows="8" style="width:100%"></textarea>
|
||||
</li>
|
||||
<li>
|
||||
<span id="message_send_mail"><input type="checkbox" value="Y" name="send_mail" /> {$lang->cmd_send_mail}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bna">
|
||||
<span class="fl"><a href="{getUrl('act', 'dispCommunicationMessages')}" class="bn white">{$lang->cmd_back}</a></span>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
<a id="message_receiver" href="#popup_menu_area" class="member_{$receiver_info->member_srl}">{$receiver_info->nick_name}</a>
|
||||
<label for="message_title">{$lang->title}</label>
|
||||
<input type="text" name="title" id="message_title" value="{$source_message->title}" />
|
||||
<label for="message_send_mail"><input type="checkbox" value="Y" name="send_mail" id="message_send_mail" /> {$lang->cmd_send_mail}</label>
|
||||
<div class="rx_prn-notice info">{$lang->msg_send_mail_privacy}</div>
|
||||
</div>
|
||||
{$editor|noescape}
|
||||
<div class="control-group">
|
||||
|
|
@ -37,4 +35,4 @@
|
|||
</form>
|
||||
</section>
|
||||
</div>
|
||||
<include target="./common_footer.html" />
|
||||
<include target="./common_footer.html" />
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@
|
|||
<th scope="row">{$lang->title}</th>
|
||||
<td><input type="text" name="title" id="message_title" value="{$source_message->title}" style="width:90%" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->cmd_option}</th>
|
||||
<td><input type="checkbox" value="Y" name="send_mail" /> {$lang->cmd_send_mail} <span class="explanation">{$lang->msg_send_mail_privacy}</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
{$editor|noescape}
|
||||
<div class="btnArea">
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@
|
|||
<a id="message_receiver" href="#popup_menu_area" class="member_{$receiver_info->member_srl}">{$receiver_info->nick_name}</a>
|
||||
<label for="message_title">{$lang->title}</label>
|
||||
<input type="text" name="title" id="message_title" value="{$source_message->title}" />
|
||||
<label for="message_send_mail"><input type="checkbox" value="Y" name="send_mail" id="message_send_mail" /> {$lang->cmd_send_mail}</label>
|
||||
<div class="rx_member-notice info">{$lang->msg_send_mail_privacy}</div>
|
||||
<div class="rx_member-notice info" cond="$logged_info->allow_message !== 'Y'">
|
||||
{$lang->warning}
|
||||
<br>
|
||||
|
|
|
|||
|
|
@ -19,10 +19,12 @@ $lang->ncenterlite_userconfig_title = 'Notification Center Settings of %s';
|
|||
$lang->ncenterlite_userconfig_about = 'Personalized settings of notification center can be controlled by you.';
|
||||
$lang->ncenterlite_comment_noti = 'Comment notice';
|
||||
$lang->ncenterlite_comment_noti_about = 'Get notice of a comment after someone replies to my documents or comments.';
|
||||
$lang->ncenterlite_mention_noti = 'Mention notice';
|
||||
$lang->ncenterlite_mention_noti = 'New Direct Message';
|
||||
$lang->ncenterlite_mention_noti_about = 'Get notice of a mention after someone mention me on documents and/or comments. ( @Nickname to mention )';
|
||||
$lang->ncenterlite_message_noti = 'Message notice';
|
||||
$lang->ncenterlite_message_noti = 'New Message';
|
||||
$lang->ncenterlite_message_noti_about = 'Get notice of a message after someone send the message to me.';
|
||||
$lang->ncenterlite_comment_comment_noti = 'New Comment';
|
||||
$lang->ncenterlite_vote_noti = 'New Upvote';
|
||||
$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.';
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ $lang->ncenterlite_mention_noti = '멘션 알림';
|
|||
$lang->ncenterlite_mention_noti_about = '누군가 글, 혹은 댓글을 통해서 나를 멘션 했을 경우 알려줍니다. (멘션 방법 @닉네임 )';
|
||||
$lang->ncenterlite_message_noti = '쪽지 알림';
|
||||
$lang->ncenterlite_message_noti_about = '누군가에게 받은 쪽지를 알림을 받습니다.';
|
||||
$lang->ncenterlite_comment_comment_noti = '대댓글 알림';
|
||||
$lang->ncenterlite_vote_noti = '추천 알림';
|
||||
$lang->ncenterlite_activate = '사용';
|
||||
$lang->ncenterlite_inactivate = '사용 안함';
|
||||
$lang->ncenterlite_userconfig_about_warning = '주의! 당신은 관리자 권한으로 다른 사용자의 설정창에 접속하였습니다.';
|
||||
|
|
|
|||
|
|
@ -1313,8 +1313,32 @@ class ncenterliteController extends ncenterlite
|
|||
return false;
|
||||
}
|
||||
$content = $oNcenterliteModel->getNotificationText($args);
|
||||
$content_cut = preg_replace('/<\/?(strong|)[^>]*>/', '', $content);
|
||||
$mail_title = cut_str($content_cut, 20);
|
||||
|
||||
switch ($args->config_type)
|
||||
{
|
||||
case 'admin_content':
|
||||
$mail_title = Context::getSiteTitle() . ' ' . lang('ncenterlite_admin_content');
|
||||
break;
|
||||
case 'comment_comment':
|
||||
$mail_title = Context::getSiteTitle() . ' ' . lang('ncenterlite_comment_comment_noti');
|
||||
break;
|
||||
case 'comment':
|
||||
$mail_title = Context::getSiteTitle() . ' ' . lang('ncenterlite_comment_noti');
|
||||
break;
|
||||
case 'message':
|
||||
$mail_title = Context::getSiteTitle() . ' ' . lang('ncenterlite_message_noti');
|
||||
break;
|
||||
case 'vote':
|
||||
$mail_title = Context::getSiteTitle() . ' ' . lang('ncenterlite_vote_noti');
|
||||
break;
|
||||
case 'mention':
|
||||
$mail_title = Context::getSiteTitle() . ' ' . lang('ncenterlite_mention_noti');
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
$content = $content . '<br>' . Context::getSiteTitle() . '<br>' . Rhymix\Framework\URL::getCurrentDomainUrl($args->target_url);
|
||||
|
||||
$member_info = getModel('member')->getMemberInfoByMemberSrl($args->member_srl);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue