mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 04:09:55 +09:00
merge from branch luminous (version 1.5.4.2, ~r12561)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@12611 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2263200ce4
commit
cc47d2b247
196 changed files with 3655 additions and 2033 deletions
|
|
@ -19,12 +19,13 @@
|
|||
**/
|
||||
function procCommunicationAdminInsertConfig() {
|
||||
// get the default information
|
||||
$args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin');
|
||||
$args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin', 'layout_srl', 'mlayout_srl');
|
||||
|
||||
if(!$args->skin) $args->skin = 'default';
|
||||
if(!$args->colorset) $args->colorset = 'white';
|
||||
if(!$args->editor_skin) $args->editor_skin = 'default';
|
||||
if(!$args->mskin) $args->mskin = 'default';
|
||||
if(!$args->layout_srl) $args->layout_srl = null;
|
||||
|
||||
// create the module module Controller object
|
||||
$oModuleController = &getController('module');
|
||||
|
|
|
|||
|
|
@ -17,13 +17,17 @@
|
|||
* configuration to manage messages and friends
|
||||
* @return void
|
||||
**/
|
||||
function dispCommunicationAdminConfig() {
|
||||
function dispCommunicationAdminConfig()
|
||||
{
|
||||
// Creating an object
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oModuleModel = &getModel('module');
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
// get the configurations of communication module
|
||||
Context::set('communication_config', $oCommunicationModel->getConfig() );
|
||||
// get a list of layout
|
||||
Context::set('layout_list', $oLayoutModel->getLayoutList() );
|
||||
// get a list of editor skins
|
||||
Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() );
|
||||
// get a list of communication skins
|
||||
|
|
@ -31,8 +35,16 @@
|
|||
// get a list of communication skins
|
||||
Context::set('communication_mobile_skin_list', $oModuleModel->getSkins($this->module_path, 'm.skins') );
|
||||
|
||||
// Get a layout list
|
||||
$layout_list = $oLayoutModel->getLayoutList();
|
||||
Context::set('layout_list', $layout_list);
|
||||
|
||||
$mlayout_list = $oLayoutModel->getLayoutList(0, 'M');
|
||||
Context::set('mlayout_list', $mlayout_list);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('communication_config..');
|
||||
$security->encodeHTML('layout_list..');
|
||||
$security->encodeHTML('editor_skin_list..');
|
||||
$security->encodeHTML('communication_skin_list..title');
|
||||
$security->encodeHTML('communication_mobile_skin_list..title');
|
||||
|
|
|
|||
|
|
@ -195,12 +195,16 @@
|
|||
$oCommunicationModel = &getModel('communication');
|
||||
$message = $oCommunicationModel->getSelectedMessage($message_srl);
|
||||
if(!$message) return new Object(-1,'msg_invalid_request');
|
||||
// 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');
|
||||
}
|
||||
// Check the grant
|
||||
switch($message->message_type)
|
||||
{
|
||||
case 'S':
|
||||
if($message->sender_srl != $member_srl) return new Object(-1, 'msg_invalid_request');
|
||||
break;
|
||||
case 'R':
|
||||
if($message->receiver_srl != $member_srl) return new Object(-1, 'msg_invalid_request');
|
||||
break;
|
||||
}
|
||||
// Delete
|
||||
$args->message_srl = $message_srl;
|
||||
$output = executeQuery('communication.deleteMessage', $args);
|
||||
|
|
@ -290,15 +294,27 @@
|
|||
* Move a group of the friend
|
||||
* @return void|Object (success : void, fail : Object)
|
||||
**/
|
||||
function procCommunicationMoveFriend() {
|
||||
function procCommunicationMoveFriend()
|
||||
{
|
||||
// Check login information
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged');
|
||||
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');
|
||||
$friend_srl_list = Context::get('friend_srl_list');
|
||||
if(!$friend_srl_list)
|
||||
{
|
||||
return new Object(-1, 'msg_cart_is_null');
|
||||
}
|
||||
|
||||
if(!is_array($friend_srl_list))
|
||||
{
|
||||
$friend_srl_list = explode('|@|', $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);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,14 @@ class communicationMobile extends communicationView {
|
|||
|
||||
$tpl_path = sprintf('%sm.skins/%s', $this->module_path, $skin);
|
||||
$this->setTemplatePath($tpl_path);
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->communication_config->mlayout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->mlayout_srl = $this->communication_config->mlayout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
}
|
||||
|
||||
function dispCommunicationMessages()
|
||||
|
|
|
|||
|
|
@ -26,6 +26,14 @@
|
|||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||
}
|
||||
$this->setTemplatePath($tpl_path);
|
||||
|
||||
$oLayoutModel = &getModel('layout');
|
||||
$layout_info = $oLayoutModel->getLayout($this->communication_config->layout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->layout_srl = $this->communication_config->layout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -54,6 +62,27 @@
|
|||
if($message_srl) {
|
||||
$columnList = array('message_srl', 'sender_srl', 'receiver_srl', 'message_type', 'title', 'content', 'readed', 'regdate');
|
||||
$message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
|
||||
switch($message->message_type)
|
||||
{
|
||||
case 'R':
|
||||
if($message->receiver_srl != $logged_info->member_srl)
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
break;
|
||||
case 'S':
|
||||
if($message->sender_srl != $logged_info->member_srl)
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
break;
|
||||
case 'T':
|
||||
if($message->receiver_srl != $logged_info->member_srl && $message->sender_srl != $logged_info->member_srl)
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
break;
|
||||
}
|
||||
if($message->message_srl == $message_srl && ($message->receiver_srl == $logged_info->member_srl || $message->sender_srl == $logged_info->member_srl) ) {
|
||||
stripEmbedTagForAdmin($message->content, $message->sender_srl);
|
||||
Context::set('message', $message);
|
||||
|
|
@ -81,6 +110,7 @@
|
|||
* @return void|Object (void : success, Object : fail)
|
||||
**/
|
||||
function dispCommunicationNewMessage() {
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile('popup_layout');
|
||||
// Error appears if not logged-in
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
|
|
@ -108,6 +138,7 @@
|
|||
* @return void|Object (void : success, Object : fail)
|
||||
**/
|
||||
function dispCommunicationSendMessage() {
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
$oMemberModel = &getModel('member');
|
||||
|
|
@ -201,6 +232,7 @@
|
|||
* @return void|Object (void : success, Object : fail)
|
||||
**/
|
||||
function dispCommunicationAddFriend() {
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
// error appears if not logged-in
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
|
|
@ -226,6 +258,7 @@
|
|||
* @return void|Object (void : success, Object : fail)
|
||||
**/
|
||||
function dispCommunicationAddFriendGroup() {
|
||||
$this->setLayoutPath('./common/tpl/');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
// error apprears if not logged-in
|
||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||
|
|
|
|||
|
|
@ -25,6 +25,15 @@
|
|||
//]]></script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->layout}</th>
|
||||
<td>
|
||||
<select id="layout" name="layout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$layout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->layout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td>
|
||||
|
|
@ -39,6 +48,15 @@
|
|||
<th scope="row">{$lang->colorset}</th>
|
||||
<td><div id="communication_colorset"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->mobile_layout}</th>
|
||||
<td>
|
||||
<select id="layout" name="mlayout_srl">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<option loop="$mlayout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->mlayout_srl">{$val->title} ({$val->layout})</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->mobile_skin}</th>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue