mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 13:49:56 +09:00
merge from 1.5.3 (~r10943)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@10951 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7aa4798373
commit
54e3a72065
334 changed files with 13011 additions and 5561 deletions
|
|
@ -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
|
||||
|
|
@ -27,12 +28,8 @@
|
|||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('communication',$args);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
return;
|
||||
}
|
||||
else return $output;
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
@ -27,16 +28,13 @@
|
|||
|
||||
$output = executeQuery('communication.updateAllowMessage', $args);
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
return $output;
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a message
|
||||
* Send a message
|
||||
* @return Object
|
||||
**/
|
||||
function procCommunicationSendMessage() {
|
||||
// Check login information
|
||||
|
|
@ -93,6 +91,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 +156,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 +180,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete a message
|
||||
* Delete a message
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationDeleteMessage() {
|
||||
// Check login information
|
||||
|
|
@ -201,7 +210,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete the multiple messages
|
||||
* Delete the multiple messages
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationDeleteMessages() {
|
||||
// Check login information
|
||||
|
|
@ -238,15 +248,13 @@
|
|||
|
||||
$this->setMessage('success_deleted');
|
||||
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add a friend
|
||||
* Add a friend
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationAddFriend() {
|
||||
// Check login information
|
||||
|
|
@ -279,7 +287,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
|
||||
|
|
@ -309,15 +318,14 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_moved');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete a friend
|
||||
* Delete a friend
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationDeleteFriend() {
|
||||
// Check login information
|
||||
|
|
@ -325,10 +333,12 @@
|
|||
$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');
|
||||
$friend_srl_list = Context::get('friend_srl_list');
|
||||
|
||||
$friend_srl_list = explode('|@|', $friend_srl_list);
|
||||
if(!is_array($friend_srl_list))
|
||||
{
|
||||
$friend_srl_list = explode('|@|', $friend_srl_list);
|
||||
}
|
||||
if(!count($friend_srl_list)) return new Object(-1, 'msg_cart_is_null');
|
||||
|
||||
$friend_count = count($friend_srl_list);
|
||||
|
|
@ -346,15 +356,14 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
|
||||
header('location:'.$returnUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add a group of friends
|
||||
* Add a group of friends
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationAddFriendGroup() {
|
||||
// Check login information
|
||||
|
|
@ -406,7 +415,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
|
||||
|
|
@ -426,7 +436,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Delete a group of friends
|
||||
* Delete a group of friends
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationDeleteFriendGroup() {
|
||||
// Check login information
|
||||
|
|
@ -442,7 +453,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;
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<th>{$lang->friend_group}</th>
|
||||
<th>{$lang->nick_name}</th>
|
||||
<th>{$lang->regdate}</th>
|
||||
<th><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('friend_srl_list', { wrap:'fo_friend_list' });" /></th>
|
||||
<th><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('friend_srl_list[]', { wrap:'fo_friend_list' });" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<td>{$val->group_title?$val->group_title:" "}</td>
|
||||
<td><a href="#popup_menu_area" class="member_{$val->target_srl}">{$val->nick_name}</a></td>
|
||||
<td>{zdate($val->regdate,"Y-m-d")}</td>
|
||||
<td><input type="checkbox" name="friend_srl_list" value="{$val->friend_srl}" /></td>
|
||||
<td><input type="checkbox" name="friend_srl_list[]" value="{$val->friend_srl}" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
</th>
|
||||
<th scope="col">{$lang->regdate}</th>
|
||||
<th scope="col">{$lang->readed_date}</th>
|
||||
<th scope="col"><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('message_srl_list[]', { wrap:'fo_message_list' }); return false;" /></th>
|
||||
<th scope="col"><input name="check_all" type="checkbox" onclick="XE.checkboxToggleAll('message_srl_list[]', { wrap:'fo_message_list' });" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue