add description of function

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10765 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2012-06-05 05:33:52 +00:00
parent ebfe89ca32
commit 1bd252610e
7 changed files with 102 additions and 54 deletions

View file

@ -8,13 +8,14 @@
class communicationAdminController extends communication { class communicationAdminController extends communication {
/** /**
* @brief Initialization * Initialization
**/ **/
function init() { function init() {
} }
/** /**
* @brief save configurations of the communication module * save configurations of the communication module
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationAdminInsertConfig() { function procCommunicationAdminInsertConfig() {
// get the default information // get the default information

View file

@ -8,13 +8,14 @@
class communicationAdminModel extends communication { class communicationAdminModel extends communication {
/** /**
* @brief Initialization * Initialization
**/ **/
function init() { function init() {
} }
/** /**
* @brief return the html to select colorset of the skin * the html to select colorset of the skin
* @return void
**/ **/
function getCommunicationAdminColorset() { function getCommunicationAdminColorset() {
$skin = Context::get('skin'); $skin = Context::get('skin');

View file

@ -2,19 +2,20 @@
/** /**
* @class communicationAdminView * @class communicationAdminView
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief communication module of the admin view class * communication module of the admin view class
**/ **/
class communicationAdminView extends communication { class communicationAdminView extends communication {
/** /**
* @brief Initialization * Initialization
**/ **/
function init() { function init() {
} }
/** /**
* @brief configuration to manage messages and friends * configuration to manage messages and friends
* @return void
**/ **/
function dispCommunicationAdminConfig() { function dispCommunicationAdminConfig() {
// Creating an object // Creating an object

View file

@ -2,13 +2,14 @@
/** /**
* @class communication * @class communication
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief communication module of the high class * communication module of the high class
**/ **/
class communication extends ModuleObject { class communication extends ModuleObject {
/** /**
* @brief Implement if additional tasks are necessary when installing * Implement if additional tasks are necessary when installing
* @return Object
**/ **/
function moduleInstall() { function moduleInstall() {
// Create a temporary file storage for one new private message notification // Create a temporary file storage for one new private message notification
@ -17,7 +18,8 @@
} }
/** /**
* @brief method to check if successfully installed. * method to check if successfully installed.
* @return boolean true : need to update false : don't need to update
**/ **/
function checkUpdate() { function checkUpdate() {
if(!is_dir("./files/member_extra_info/new_message_flags")) return true; if(!is_dir("./files/member_extra_info/new_message_flags")) return true;
@ -25,7 +27,8 @@
} }
/** /**
* @brief Update * Update
* @return Object
**/ **/
function moduleUpdate() { function moduleUpdate() {
if(!is_dir("./files/member_extra_info/new_message_flags")) if(!is_dir("./files/member_extra_info/new_message_flags"))
@ -34,7 +37,8 @@
} }
/** /**
* @brief Re-generate the cache file * Re-generate the cache file
* @return void
**/ **/
function recompileCache() { function recompileCache() {
} }

View file

@ -2,19 +2,20 @@
/** /**
* @class communicationController * @class communicationController
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief communication module of the Controller class * communication module of the Controller class
**/ **/
class communicationController extends communication { class communicationController extends communication {
/** /**
* @brief Initialization * Initialization
**/ **/
function init() { function init() {
} }
/** /**
* @brief change the settings of message box * change the settings of message box
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationUpdateAllowMessage() { function procCommunicationUpdateAllowMessage() {
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
@ -36,7 +37,8 @@
} }
/** /**
* @brief Send a message * Send a message
* @return Object
**/ **/
function procCommunicationSendMessage() { function procCommunicationSendMessage() {
// Check login information // Check login information
@ -93,6 +95,15 @@
return $output; return $output;
} }
/**
* Send a message (DB controll)
* @param int $sender_srl member_srl of sender
* @param int $receiver_srl member_srl of receiver_srl
* @param string $title
* @param string $content
* @param boolean $sender_log (default true)
* @return Object
**/
function sendMessage($sender_srl, $receiver_srl, $title, $content, $sender_log = true) { function sendMessage($sender_srl, $receiver_srl, $title, $content, $sender_log = true) {
$content = removeHackTag($content); $content = removeHackTag($content);
$title = htmlspecialchars($title); $title = htmlspecialchars($title);
@ -149,7 +160,8 @@
} }
/** /**
* @brief store a specific message into the archive * store a specific message into the archive
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationStoreMessage() { function procCommunicationStoreMessage() {
// Check login information // Check login information
@ -172,7 +184,8 @@
} }
/** /**
* @brief Delete a message * Delete a message
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationDeleteMessage() { function procCommunicationDeleteMessage() {
// Check login information // Check login information
@ -201,7 +214,8 @@
} }
/** /**
* @brief Delete the multiple messages * Delete the multiple messages
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationDeleteMessages() { function procCommunicationDeleteMessages() {
// Check login information // Check login information
@ -246,7 +260,8 @@
} }
/** /**
* @brief Add a friend * Add a friend
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationAddFriend() { function procCommunicationAddFriend() {
// Check login information // Check login information
@ -279,7 +294,8 @@
} }
/** /**
* @brief Move a group of the friend * Move a group of the friend
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationMoveFriend() { function procCommunicationMoveFriend() {
// Check login information // Check login information
@ -317,7 +333,8 @@
} }
/** /**
* @brief Delete a friend * Delete a friend
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationDeleteFriend() { function procCommunicationDeleteFriend() {
// Check login information // Check login information
@ -356,7 +373,8 @@
} }
/** /**
* @brief Add a group of friends * Add a group of friends
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationAddFriendGroup() { function procCommunicationAddFriendGroup() {
// Check login information // Check login information
@ -408,7 +426,8 @@
} }
/** /**
* @brief change a name of friend group * change a name of friend group
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationRenameFriendGroup() { function procCommunicationRenameFriendGroup() {
// Check login information // Check login information
@ -428,7 +447,8 @@
} }
/** /**
* @brief Delete a group of friends * Delete a group of friends
* @return void|Object (success : void, fail : Object)
**/ **/
function procCommunicationDeleteFriendGroup() { function procCommunicationDeleteFriendGroup() {
// Check login information // Check login information
@ -444,7 +464,9 @@
} }
/** /**
* @brief set a message status to be 'already read' * set a message status to be 'already read'
* @param int $message_srl
* @return Object
**/ **/
function setMessageReaded($message_srl) { function setMessageReaded($message_srl) {
$args->message_srl = $message_srl; $args->message_srl = $message_srl;

View file

@ -2,19 +2,21 @@
/** /**
* @class communicationModel * @class communicationModel
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief communication module of the Model class * communication module of the Model class
**/ **/
class communicationModel extends communication { class communicationModel extends communication {
/** /**
* @brief Initialization * Initialization
* @return void
**/ **/
function init() { function init() {
} }
/** /**
* @brief get the configuration * get the configuration
* @return object config of communication module
**/ **/
function getConfig() { function getConfig() {
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
@ -28,7 +30,10 @@
} }
/** /**
* @brief get the message contents * get the message contents
* @param int $message_srl
* @param array $columnList
* @return object message information
**/ **/
function getSelectedMessage($message_srl, $columnList = array()) { function getSelectedMessage($message_srl, $columnList = array()) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -54,12 +59,13 @@
$oCommunicationController->setMessageReaded($message_srl); $oCommunicationController->setMessageReaded($message_srl);
} }
return $message; return $message;
} }
/** /**
* @brief get a new message * get a new message
* @param array $columnList
* @return object message information
**/ **/
function getNewMessage($columnList = array()) { function getNewMessage($columnList = array()) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -77,10 +83,10 @@
} }
/** /**
* @brief get a message list * get a message list
* type = R: Received Message * @param string $message_type (R: Received Message, S: Sent Message, T: Archive)
* type = S: Sent Message * @param array $columnList
* type = T: Archive * @return Object
**/ **/
function getMessages($message_type = "R", $columnList = array()) { function getMessages($message_type = "R", $columnList = array()) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -112,7 +118,10 @@
} }
/** /**
* @brief Get a list of friends * Get a list of friends
* @param int $friend_group_srl (default 0)
* @param array $columnList
* @return Object
**/ **/
function getFriends($friend_group_srl = 0, $columnList = array()) { function getFriends($friend_group_srl = 0, $columnList = array()) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -129,7 +138,9 @@
} }
/** /**
* @brief check if a friend is already added * check if a friend is already added
* @param int $member_srl
* @return int
**/ **/
function isAddedFriend($member_srl) { function isAddedFriend($member_srl) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -141,7 +152,9 @@
} }
/** /**
* @brief Get a group of friends * Get a group of friends
* @param int $friend_group_srl
* @return object
**/ **/
function getFriendGroupInfo($friend_group_srl) { function getFriendGroupInfo($friend_group_srl) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
@ -154,22 +167,23 @@
} }
/** /**
* @brief Get a list of groups * Get a list of groups
* @return array
**/ **/
function getFriendGroups() { function getFriendGroups() {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');
$args->member_srl = $logged_info->member_srl; $args->member_srl = $logged_info->member_srl;
$output = executeQuery('communication.getFriendGroups', $args); $output = executeQueryArray('communication.getFriendGroups', $args);
$group_list = $output->data; $group_list = $output->data;
if(!$group_list) return; if(!$group_list) return;
if(!is_array($group_list)) $group_list = array($group_list);
return $group_list; return $group_list;
} }
/** /**
* @brief check whether to be added in the friend list * check whether to be added in the friend list
* @param int $target_srl
* @return boolean (true : friend, false : not friend)
**/ **/
function isFriend($target_srl) { function isFriend($target_srl) {
$logged_info = Context::get('logged_info'); $logged_info = Context::get('logged_info');

View file

@ -2,13 +2,14 @@
/** /**
* @class communicationView * @class communicationView
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @brief View class of communication module * View class of communication module
**/ **/
class communicationView extends communication { class communicationView extends communication {
/** /**
* @brief Initialization * Initialization
* @return void
**/ **/
function init() { function init() {
$oCommunicationModel = &getModel('communication'); $oCommunicationModel = &getModel('communication');
@ -28,7 +29,8 @@
} }
/** /**
* @brief Display message box * Display message box
* @return void|Object (void : success, Object : fail)
**/ **/
function dispCommunicationMessages() { function dispCommunicationMessages() {
// Error appears if not logged-in // Error appears if not logged-in
@ -75,7 +77,8 @@
} }
/** /**
* @brief display a new message * display a new message
* @return void|Object (void : success, Object : fail)
**/ **/
function dispCommunicationNewMessage() { function dispCommunicationNewMessage() {
$this->setLayoutFile('popup_layout'); $this->setLayoutFile('popup_layout');
@ -101,7 +104,8 @@
} }
/** /**
* @brief Display message sending * Display message sending
* @return void|Object (void : success, Object : fail)
**/ **/
function dispCommunicationSendMessage() { function dispCommunicationSendMessage() {
$this->setLayoutFile("popup_layout"); $this->setLayoutFile("popup_layout");
@ -156,7 +160,8 @@
} }
/** /**
* @brief display a list of friends * display a list of friends
* @return void|Object (void : success, Object : fail)
**/ **/
function dispCommunicationFriend() { function dispCommunicationFriend() {
// Error appears if not logged-in // Error appears if not logged-in
@ -192,7 +197,8 @@
} }
/** /**
* @brief Add a friend * display Add a friend
* @return void|Object (void : success, Object : fail)
**/ **/
function dispCommunicationAddFriend() { function dispCommunicationAddFriend() {
$this->setLayoutFile("popup_layout"); $this->setLayoutFile("popup_layout");
@ -216,7 +222,8 @@
} }
/** /**
* @brief Add a group of friends * display add a group of friends
* @return void|Object (void : success, Object : fail)
**/ **/
function dispCommunicationAddFriendGroup() { function dispCommunicationAddFriendGroup() {
$this->setLayoutFile("popup_layout"); $this->setLayoutFile("popup_layout");
@ -230,9 +237,7 @@
$friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl); $friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl);
if($friend_group->friend_group_srl == $friend_group_srl) Context::set('friend_group', $friend_group); if($friend_group->friend_group_srl == $friend_group_srl) Context::set('friend_group', $friend_group);
} }
$this->setTemplateFile('add_friend_group'); $this->setTemplateFile('add_friend_group');
} }
} }
?> ?>