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 {
/**
* @brief Initialization
* Initialization
**/
function init() {
}
/**
* @brief save configurations of the communication module
* save configurations of the communication module
* @return void|Object (success : void, fail : Object)
**/
function procCommunicationAdminInsertConfig() {
// get the default information

View file

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

View file

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

View file

@ -2,13 +2,14 @@
/**
* @class communication
* @author NHN (developers@xpressengine.com)
* @brief communication module of the high class
* communication module of the high class
**/
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() {
// 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() {
if(!is_dir("./files/member_extra_info/new_message_flags")) return true;
@ -25,7 +27,8 @@
}
/**
* @brief Update
* Update
* @return Object
**/
function moduleUpdate() {
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() {
}

View file

@ -2,19 +2,20 @@
/**
* @class communicationController
* @author NHN (developers@xpressengine.com)
* @brief communication module of the Controller class
* communication module of the Controller class
**/
class communicationController extends communication {
/**
* @brief Initialization
* Initialization
**/
function init() {
}
/**
* @brief change the settings of message box
* change the settings of message box
* @return void|Object (success : void, fail : Object)
**/
function procCommunicationUpdateAllowMessage() {
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() {
// Check login information
@ -93,6 +95,15 @@
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) {
$content = removeHackTag($content);
$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() {
// Check login information
@ -172,7 +184,8 @@
}
/**
* @brief Delete a message
* Delete a message
* @return void|Object (success : void, fail : Object)
**/
function procCommunicationDeleteMessage() {
// 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() {
// Check login information
@ -246,7 +260,8 @@
}
/**
* @brief Add a friend
* Add a friend
* @return void|Object (success : void, fail : Object)
**/
function procCommunicationAddFriend() {
// 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() {
// Check login information
@ -317,7 +333,8 @@
}
/**
* @brief Delete a friend
* Delete a friend
* @return void|Object (success : void, fail : Object)
**/
function procCommunicationDeleteFriend() {
// 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() {
// 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() {
// 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() {
// 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) {
$args->message_srl = $message_srl;

View file

@ -2,19 +2,21 @@
/**
* @class communicationModel
* @author NHN (developers@xpressengine.com)
* @brief communication module of the Model class
* communication module of the Model class
**/
class communicationModel extends communication {
/**
* @brief Initialization
* Initialization
* @return void
**/
function init() {
}
/**
* @brief get the configuration
* get the configuration
* @return object config of communication module
**/
function getConfig() {
$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()) {
$logged_info = Context::get('logged_info');
@ -54,12 +59,13 @@
$oCommunicationController->setMessageReaded($message_srl);
}
return $message;
}
/**
* @brief get a new message
* get a new message
* @param array $columnList
* @return object message information
**/
function getNewMessage($columnList = array()) {
$logged_info = Context::get('logged_info');
@ -77,10 +83,10 @@
}
/**
* @brief get a message list
* type = R: Received Message
* type = S: Sent Message
* type = T: Archive
* get a message list
* @param string $message_type (R: Received Message, S: Sent Message, T: Archive)
* @param array $columnList
* @return Object
**/
function getMessages($message_type = "R", $columnList = array()) {
$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()) {
$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) {
$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) {
$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() {
$logged_info = Context::get('logged_info');
$args->member_srl = $logged_info->member_srl;
$output = executeQuery('communication.getFriendGroups', $args);
$output = executeQueryArray('communication.getFriendGroups', $args);
$group_list = $output->data;
if(!$group_list) return;
if(!is_array($group_list)) $group_list = array($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) {
$logged_info = Context::get('logged_info');

View file

@ -2,13 +2,14 @@
/**
* @class communicationView
* @author NHN (developers@xpressengine.com)
* @brief View class of communication module
* View class of communication module
**/
class communicationView extends communication {
/**
* @brief Initialization
* Initialization
* @return void
**/
function init() {
$oCommunicationModel = &getModel('communication');
@ -28,7 +29,8 @@
}
/**
* @brief Display message box
* Display message box
* @return void|Object (void : success, Object : fail)
**/
function dispCommunicationMessages() {
// 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() {
$this->setLayoutFile('popup_layout');
@ -101,7 +104,8 @@
}
/**
* @brief Display message sending
* Display message sending
* @return void|Object (void : success, Object : fail)
**/
function dispCommunicationSendMessage() {
$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() {
// 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() {
$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() {
$this->setLayoutFile("popup_layout");
@ -230,9 +237,7 @@
$friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl);
if($friend_group->friend_group_srl == $friend_group_srl) Context::set('friend_group', $friend_group);
}
$this->setTemplateFile('add_friend_group');
}
}
?>