mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 18:59: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
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue