english comments added

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
mosmartin 2011-04-06 16:48:06 +00:00
parent 693e215bc1
commit 4d272994dd
219 changed files with 6407 additions and 8705 deletions

View file

@ -2,29 +2,28 @@
/**
* @class communicationAdminController
* @author NHN (developers@xpressengine.com)
* @brief communication module의 admin controller class
* @brief communication module of the admin controller class
**/
class communicationAdminController extends communication {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief communication 모듈 설정 저장
* @brief save configurations of the communication module
**/
function procCommunicationAdminInsertConfig() {
// 기본 정보를 받음
// get the default information
$args = Context::gets('skin','colorset','editor_skin','editor_colorset');
if(!$args->skin) $args->skin = "default";
if(!$args->colorset) $args->colorset = "white";
if(!$args->editor_skin) $args->editor_skin = "default";
// module Controller 객체 생성하여 입력
// create the module module Controller object
$oModuleController = &getController('module');
$output = $oModuleController->insertModuleConfig('communication',$args);

View file

@ -2,19 +2,19 @@
/**
* @class communicationAdminModel
* @author NHN (developers@xpressengine.com)
* @brief communication module의 admin model class
* @brief communication module of the admin model class
**/
class communicationAdminModel extends communication {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 지정된 스킨의 컬러셋 선택을 위한 html을 return
* @brief return the html to select colorset of the skin
**/
function getCommunicationAdminColorset() {
$skin = Context::get('skin');

View file

@ -2,36 +2,32 @@
/**
* @class communicationAdminView
* @author NHN (developers@xpressengine.com)
* @brief communication module의 admin view class
* @brief communication module of the admin view class
**/
class communicationAdminView extends communication {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 쪽지 친구등의 관리를 위한 설정
* @brief configuration to manage messages and friends
**/
function dispCommunicationAdminConfig() {
// 객체 생성
// Creating an object
$oEditorModel = &getModel('editor');
$oModuleModel = &getModel('module');
$oCommunicationModel = &getModel('communication');
// communication 모듈의 모듈설정 읽음
// get the configurations of communication module
Context::set('communication_config', $oCommunicationModel->getConfig() );
// 에디터 스킨 목록을 구함
// get a list of editor skins
Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() );
// 커뮤니케이션 스킨 목록을 구함
// get a list of communication skins
Context::set('communication_skin_list', $oModuleModel->getSkins($this->module_path) );
// template 지정
// specify a template
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('index');
}

View file

@ -2,22 +2,22 @@
/**
* @class communication
* @author NHN (developers@xpressengine.com)
* @brief communication module의 high class
* @brief communication module of the high class
**/
class communication extends ModuleObject {
/**
* @brief 설치시 추가 작업이 필요할시 구현
* @brief Implement if additional tasks are necessary when installing
**/
function moduleInstall() {
// 새쪽지 알림을 위한 임시 파일 저장소 생성
// Create a temporary file storage for one new private message notification
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
return new Object();
}
/**
* @brief 설치가 이상이 없는지 체크하는 method
* @brief method to check if successfully installed.
**/
function checkUpdate() {
if(!is_dir("./files/member_extra_info/new_message_flags")) return true;
@ -25,7 +25,7 @@
}
/**
* @brief 업데이트 실행
* @brief Update
**/
function moduleUpdate() {
if(!is_dir("./files/member_extra_info/new_message_flags"))
@ -34,7 +34,7 @@
}
/**
* @brief 캐시 파일 재생성
* @brief Re-generate the cache file
**/
function recompileCache() {
}

View file

@ -2,19 +2,19 @@
/**
* @class communicationController
* @author NHN (developers@xpressengine.com)
* @brief communication module의 Controller class
* @brief communication module of the Controller class
**/
class communicationController extends communication {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 쪽지함 설정 변경
* @brief change the settings of message box
**/
function procCommunicationUpdateAllowMessage() {
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
@ -31,14 +31,13 @@
}
/**
* @brief 쪽지 발송
* @brief Send a message
**/
function procCommunicationSendMessage() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 검사
// Check variables
$receiver_srl = Context::get('receiver_srl');
if(!$receiver_srl) return new Object(-1, 'msg_not_exists_member');
@ -50,14 +49,12 @@
$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');
$receiver_member_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
if($receiver_member_info->member_srl != $receiver_srl) return new Object(-1, 'msg_not_exists_member');
// 받을 회원의 쪽지 수신여부 검사 (최고관리자이면 패스)
// check whether to allow to receive the message(pass if a top-administrator)
if($logged_info->is_admin != 'Y') {
if($receiver_member_info->allow_message == 'F') {
if(!$oCommunicationModel->isFriend($receiver_member_info->member_srl)) return new object(-1, 'msg_allow_message_to_friend');
@ -65,11 +62,9 @@
return new object(-1, 'msg_disallow_message');
}
}
// 쪽지 발송
// send a message
$output = $this->sendMessage($logged_info->member_srl, $receiver_srl, $title, $content);
// 메일로도 발송
// send an e-mail
if($output->toBool() && $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);
@ -87,8 +82,7 @@
function sendMessage($sender_srl, $receiver_srl, $title, $content, $sender_log = true) {
$content = removeHackTag($content);
$title = htmlspecialchars($title);
// 보내는 사용자의 쪽지함에 넣을 쪽지
// messages to save in the sendor's message box
$sender_args->sender_srl = $sender_srl;
$sender_args->receiver_srl = $receiver_srl;
$sender_args->message_type = 'S';
@ -99,8 +93,7 @@
$sender_args->related_srl = getNextSequence();
$sender_args->message_srl = getNextSequence();
$sender_args->list_order = getNextSequence()*-1;
// 받는 회원의 쪽지함에 넣을 쪽지
// messages to save in the receiver's message box
$receiver_args->message_srl = $sender_args->related_srl;
$receiver_args->related_srl = 0;
$receiver_args->list_order = $sender_args->related_srl*-1;
@ -115,8 +108,7 @@
$oDB = &DB::getInstance();
$oDB->begin();
// 발송하는 회원의 쪽지함에 넣을 쪽지
// messages to save in the sendor's message box
if($sender_srl && $sender_log) {
$output = executeQuery('communication.sendMessage', $sender_args);
if(!$output->toBool()) {
@ -124,15 +116,13 @@
return $output;
}
}
// 받을 회원의 쪽지함에 넣을 쪽지
// messages to save in the receiver's message box
$output = executeQuery('communication.sendMessage', $receiver_args);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// 받는 회원의 쪽지 발송 플래그 생성 (파일로 생성)
// create a flag that message is sent (in file format)
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($receiver_srl);
FileHandler::makeDir($flag_path);
$flag_file = sprintf('%s%s', $flag_path, $receiver_srl);
@ -145,18 +135,16 @@
}
/**
* @brief 특정 쪽지를 보관함으로 보냄
* @brief store a specific message into the archive
**/
function procCommunicationStoreMessage() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 체크
// Check variable
$message_srl = Context::get('message_srl');
if(!$message_srl) return new Object(-1,'msg_invalid_request');
// 쪽지를 가져옴
// get the message
$oCommunicationModel = &getModel('communication');
$message = $oCommunicationModel->getSelectedMessage($message_srl);
if(!$message || $message->message_type != 'R') return new Object(-1,'msg_invalid_request');
@ -170,31 +158,27 @@
}
/**
* @brief 쪽지 삭제
* @brief Delete a message
**/
function procCommunicationDeleteMessage() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
$member_srl = $logged_info->member_srl;
// 변수 체크
// Check the variable
$message_srl = Context::get('message_srl');
if(!$message_srl) return new Object(-1,'msg_invalid_request');
// 쪽지를 가져옴
// Get the message
$oCommunicationModel = &getModel('communication');
$message = $oCommunicationModel->getSelectedMessage($message_srl);
if(!$message) return new Object(-1,'msg_invalid_request');
// 발송인+type=S or 수신인+type=R 검사
// Check a message type if 'S' or 'R'
if($message->sender_srl == $member_srl && $message->message_type == 'S') {
if(!$message_srl) return new Object(-1, 'msg_invalid_request');
} elseif($message->receiver_srl == $member_srl && $message->message_type == 'R') {
if(!$message_srl) return new Object(-1, 'msg_invalid_request');
}
// 삭제
// Delete
$args->message_srl = $message_srl;
$output = executeQuery('communication.deleteMessage', $args);
if(!$output->toBool()) return $output;
@ -203,15 +187,14 @@
}
/**
* @brief 선택된 다수의 쪽지 삭제
* @brief Delete the multiple messages
**/
function procCommunicationDeleteMessages() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
$member_srl = $logged_info->member_srl;
// 변수 체크
// check variables
$message_srl_list = trim(Context::get('message_srl_list'));
if(!$message_srl_list) return new Object(-1, 'msg_cart_is_null');
@ -229,8 +212,7 @@
$target[] = $message_srl;
}
if(!count($target)) return new Object(-1,'msg_cart_is_null');
// 삭제
// Delete
$args->message_srls = implode(',',$target);
$args->message_type = $message_type;
@ -244,17 +226,16 @@
}
/**
* @brief 친구 추가
* @brief Add a friend
**/
function procCommunicationAddFriend() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
$target_srl = (int)trim(Context::get('target_srl'));
if(!$target_srl) return new Object(-1,'msg_invalid_request');
// 변수 정리
// Variable
$args->friend_srl = getNextSequence();
$args->list_order = $args->friend_srl * -1;
$args->friend_group_srl = Context::get('friend_group_srl');
@ -268,14 +249,13 @@
}
/**
* @brief 등록된 친구의 그룹 이동
* @brief Move a group of the friend
**/
function procCommunicationMoveFriend() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 체크
// Check variables
$friend_srl_list = trim(Context::get('friend_srl_list'));
if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null');
@ -290,8 +270,7 @@
$target[] = $friend_srl;
}
if(!count($target)) return new Object(-1,'msg_cart_is_null');
// 변수 정리
// Variables
$args->friend_srls = implode(',',$target);
$args->member_srl = $logged_info->member_srl;
$args->friend_group_srl = Context::get('target_friend_group_srl');
@ -303,15 +282,14 @@
}
/**
* @brief 친구 삭제
* @brief Delete a friend
**/
function procCommunicationDeleteFriend() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
$member_srl = $logged_info->member_srl;
// 변수 체크
// Check variables
$friend_srl_list = trim(Context::get('friend_srl_list'));
if(!$friend_srl_list) return new Object(-1, 'msg_cart_is_null');
@ -326,8 +304,7 @@
$target[] = $friend_srl;
}
if(!count($target)) return new Object(-1,'msg_cart_is_null');
// 삭제
// Delete
$args->friend_srls = implode(',',$target);
$args->member_srl = $logged_info->member_srl;
$output = executeQuery('communication.deleteFriend', $args);
@ -337,26 +314,23 @@
}
/**
* @brief 친구 그룹 추가
* @brief Add a group of friends
**/
function procCommunicationAddFriendGroup() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 정리
// Variables
$args->friend_group_srl = trim(Context::get('friend_group_srl'));
$args->member_srl = $logged_info->member_srl;
$args->title = Context::get('title');
$args->title = htmlspecialchars($args->title);
if(!$args->title) return new Object(-1, 'msg_invalid_request');
// friend_group_srl이 있으면 수정
// modify if friend_group_srl exists.
if($args->friend_group_srl) {
$output = executeQuery('communication.renameFriendGroup', $args);
$msg_code = 'success_updated';
// 아니면 입력
// add if not exists
} else {
$output = executeQuery('communication.addFriendGroup', $args);
$msg_code = 'success_registed';
@ -368,14 +342,13 @@
}
/**
* @brief 친구 그룹 이름 변경
* @brief change a name of friend group
**/
function procCommunicationRenameFriendGroup() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 정리
// Variables
$args->friend_group_srl= Context::get('friend_group_srl');
$args->member_srl = $logged_info->member_srl;
$args->title = Context::get('title');
@ -389,14 +362,13 @@
}
/**
* @brief 친구 그룹 삭제
* @brief Delete a group of friends
**/
function procCommunicationDeleteFriendGroup() {
// 로그인 정보 체크
// Check login information
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 정리
// Variables
$args->friend_group_srl = Context::get('friend_group_srl');
$args->member_srl = $logged_info->member_srl;
$output = executeQuery('communication.deleteFriendGroup', $args);
@ -406,7 +378,7 @@
}
/**
* @brief 특정 쪽지의 상태를 읽은 상태로 변경
* @brief set a message status to be 'already read'
**/
function setMessageReaded($message_srl) {
$args->message_srl = $message_srl;

View file

@ -2,19 +2,19 @@
/**
* @class communicationModel
* @author NHN (developers@xpressengine.com)
* @brief communication module의 Model class
* @brief communication module of the Model class
**/
class communicationModel extends communication {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 설정된 내용을 구함
* @brief get the configuration
**/
function getConfig() {
$oModuleModel = &getModel('module');
@ -28,7 +28,7 @@
}
/**
* @brief 쪽지 내용을 가져옴
* @brief get the message contents
**/
function getSelectedMessage($message_srl) {
$logged_info = Context::get('logged_info');
@ -37,12 +37,10 @@
$output = executeQuery('communication.getMessage',$args);
$message = $output->data;
if(!$message) return ;
// 보낸 쪽지일 경우 받는 사람 정보를 구함
// get recipient's information if it is a sent message
$oMemberModel = &getModel('member');
if($message->sender_srl == $logged_info->member_srl && $message->message_type == 'S') $member_info = $oMemberModel->getMemberInfoByMemberSrl($message->receiver_srl);
// 보관/받은 쪽지일 경우 보낸 사람 정보를 구함
// get sendor's information if it is a received/archived message
else $member_info = $oMemberModel->getMemberInfoByMemberSrl($message->sender_srl);
if($member_info) {
@ -50,8 +48,7 @@
if($key != 'regdate') $message->{$key} = $val;
}
}
// 받은 쪽지이고 아직 읽지 않았을 경우 읽은 상태로 변경
// change the status if is a received and not yet read message
if($message->message_type == 'R' && $message->readed != 'Y') {
$oCommunicationController = &getController('communication');
$oCommunicationController->setMessageReaded($message_srl);
@ -62,7 +59,7 @@
}
/**
* @brief 쪽지를 가져옴
* @brief get a new message
**/
function getNewMessage() {
$logged_info = Context::get('logged_info');
@ -80,10 +77,10 @@
}
/**
* @brief 쪽지 목록 가져오기
* type = R : 받은 쪽지
* type = S : 보낸 쪽지
* type = T : 보관함
* @brief get a message list
* type = R: Received Message
* type = S: Sent Message
* type = T: Archive
**/
function getMessages($message_type = "R") {
$logged_info = Context::get('logged_info');
@ -106,8 +103,7 @@
break;
}
// 기타 변수들 정리
// Other variables
$args->sort_index = 'message.list_order';
$args->page = Context::get('page');
$args->list_count = 20;
@ -116,15 +112,14 @@
}
/**
* @brief 친구 목록 가져오기
* @brief Get a list of friends
**/
function getFriends($friend_group_srl = 0) {
$logged_info = Context::get('logged_info');
$args->friend_group_srl = $friend_group_srl;
$args->member_srl = $logged_info->member_srl;
// 기타 변수들 정리
// Other variables
$args->page = Context::get('page');
$args->sort_index = 'friend.list_order';
$args->list_count = 10;
@ -134,7 +129,7 @@
}
/**
* @brief 이미 친구로 등록되었는지 검사
* @brief check if a friend is already added
**/
function isAddedFriend($member_srl) {
$logged_info = Context::get('logged_info');
@ -146,7 +141,7 @@
}
/**
* @brief 특정 친구 그룹 가져오기
* @brief Get a group of friends
**/
function getFriendGroupInfo($friend_group_srl) {
$logged_info = Context::get('logged_info');
@ -159,7 +154,7 @@
}
/**
* @brief 그룹 목록 가져오기
* @brief Get a list of groups
**/
function getFriendGroups() {
$logged_info = Context::get('logged_info');
@ -174,7 +169,7 @@
}
/**
* @brief 특정 회원의 친구 목록에 포함되어 있는지를 확인
* @brief check whether to be added in the friend list
**/
function isFriend($target_srl) {
$logged_info = Context::get('logged_info');

View file

@ -2,13 +2,13 @@
/**
* @class communicationView
* @author NHN (developers@xpressengine.com)
* @brief communication moduleView class
* @brief View class of communication module
**/
class communicationView extends communication {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
$oCommunicationModel = &getModel('communication');
@ -23,14 +23,13 @@
}
/**
* @brief 쪽지함 출력
* @brief Display message box
**/
function dispCommunicationMessages() {
// 로그인이 되어 있지 않으면 오류 표시
// Error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
$logged_info = Context::get('logged_info');
// 변수 설정
// Set the variables
$message_srl = Context::get('message_srl');
$message_type = Context::get('message_type');
if(!in_array($message_type, array('R','S','T'))) {
@ -39,8 +38,7 @@
}
$oCommunicationModel = &getModel('communication');
// message_srl이 있으면 내용 추출
// extract contents if message_srl exists
if($message_srl) {
$message = $oCommunicationModel->getSelectedMessage($message_srl);
if($message->message_srl == $message_srl && ($message->receiver_srl == $logged_info->member_srl || $message->sender_srl == $logged_info->member_srl) ) {
@ -48,11 +46,9 @@
Context::set('message', $message);
}
}
// 목록 추출
// Extract a list
$output = $oCommunicationModel->getMessages($message_type);
// 템플릿에 쓰기 위해서 context::set
// set a template file
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
@ -63,25 +59,23 @@
}
/**
* @brief 쪽지 보여줌
* @brief display a new message
**/
function dispCommunicationNewMessage() {
$this->setLayoutFile('popup_layout');
// 로그인이 되어 있지 않으면 오류 표시
// Error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
$logged_info = Context::get('logged_info');
$oCommunicationModel = &getModel('communication');
// 새 쪽지를 가져옴
// get a new message
$message = $oCommunicationModel->getNewMessage();
if($message) {
stripEmbedTagForAdmin($message->content, $message->sender_srl);
Context::set('message', $message);
}
// 플래그 삭제
// Delete a flag
$flag_path = './files/communication_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
FileHandler::removeFile($flag_file);
@ -90,22 +84,19 @@
}
/**
* @brief 쪽지 발송 출력
* @brief Display message sending
**/
function dispCommunicationSendMessage() {
$this->setLayoutFile("popup_layout");
$oCommunicationModel = &getModel('communication');
$oMemberModel = &getModel('member');
// 로그인이 되어 있지 않으면 오류 표시
// Error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
$logged_info = Context::get('logged_info');
// 쪽지 받을 사용자 정보 구함
// get receipient's information
$receiver_srl = Context::get('receiver_srl');
if(!$receiver_srl || $logged_info->member_srl == $receiver_srl) return $this->stop('msg_not_logged');
// 답글 쪽지일 경우 원본 메세지의 글번호를 구함
// get message_srl of the original message if it is a reply
$message_srl = Context::get('message_srl');
if($message_srl) {
$source_message = $oCommunicationModel->getSelectedMessage($message_srl);
@ -118,8 +109,7 @@
$receiver_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl);
Context::set('receiver_info', $receiver_info);
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
// set a signiture by calling getEditor of the editor module
$oEditorModel = &getModel('editor');
$option->primary_key_name = 'receiver_srl';
$option->content_key_name = 'content';
@ -139,21 +129,19 @@
}
/**
* @brief 친구 목록 보기
* @brief display a list of friends
**/
function dispCommunicationFriend() {
// 로그인이 되어 있지 않으면 오류 표시
// Error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
$oCommunicationModel = &getModel('communication');
// 그룹 목록을 가져옴
// get a group list
$tmp_group_list = $oCommunicationModel->getFriendGroups();
$group_count = count($tmp_group_list);
for($i=0;$i<$group_count;$i++) $friend_group_list[$tmp_group_list[$i]->friend_group_srl] = $tmp_group_list[$i];
Context::set('friend_group_list', $friend_group_list);
// 친구 목록을 가져옴
// get a list of friends
$friend_group_srl = Context::get('friend_group_srl');
$output = $oCommunicationModel->getFriends($friend_group_srl);
$friend_count = count($output->data);
@ -165,8 +153,7 @@
$output->data[$key]->group_title = $group_title;
}
}
// 템플릿에 쓰기 위해서 context::set
// set a template file
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
@ -177,26 +164,23 @@
}
/**
* @brief 친구 추가
* @brief Add a friend
**/
function dispCommunicationAddFriend() {
$this->setLayoutFile("popup_layout");
// 로그인이 되어 있지 않으면 오류 표시
// error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
$logged_info = Context::get('logged_info');
$target_srl = Context::get('target_srl');
if(!$target_srl) return $this->stop('msg_invalid_request');
// 대상 회원의 정보를 구함
// get information of the member
$oMemberModel = &getModel('member');
$oCommunicationModel = &getModel('communication');
$communication_info = $oMemberModel->getMemberInfoByMemberSrl($target_srl);
if($communication_info->member_srl != $target_srl) return $this->stop('msg_invalid_request');
Context::set('target_info', $communication_info);
// 그룹의 목록을 구함
// get a group list
$friend_group_list = $oCommunicationModel->getFriendGroups();
Context::set('friend_group_list', $friend_group_list);
@ -204,16 +188,14 @@
}
/**
* @brief 친구 그룹 추가
* @brief Add a group of friends
**/
function dispCommunicationAddFriendGroup() {
$this->setLayoutFile("popup_layout");
// 로그인이 되어 있지 않으면 오류 표시
// error apprears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
$logged_info = Context::get('logged_info');
// 그룹 번호가 넘어오면 수정모드로..
// change to edit mode when getting the group_srl
$friend_group_srl = Context::get('friend_group_srl');
if($friend_group_srl) {
$oCommunicationModel = &getModel('communication');