merger from branch luminous (~r11576)

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11580 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-10-04 05:04:23 +00:00
commit 51bb8d1985
91 changed files with 1157 additions and 703 deletions

View file

@ -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');
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');

View file

@ -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
@ -33,6 +37,7 @@
$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');

View file

@ -290,15 +290,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);

View file

@ -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);
}
}
/**
@ -81,6 +89,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 +117,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 +211,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 +237,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');

View file

@ -10,6 +10,15 @@
<input type="hidden" name="act" value="procCommunicationAdminInsertConfig">
<div class="table">
<table width="100%" border="1" cellspacing="0">
<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->editor_skin}</th>
<td>