Remove trailing whitespace

This commit is contained in:
Kijin Sung 2023-01-30 21:43:21 +09:00
parent c5267b42fd
commit 37b0d3a1e6
71 changed files with 806 additions and 806 deletions

View file

@ -38,7 +38,7 @@ class communicationAdminController extends communication
$output = $oModuleController->insertModuleConfig('communication', $args);
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
return $this->setRedirectUrl($returnUrl, $output);
}

View file

@ -46,7 +46,7 @@ class communicationAdminModel extends communication
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin, $dir);
Context::set('skin_info', $skin_info);
Context::set('communication_config', CommunicationModel::getConfig());
$security = new Security();
$security->encodeHTML('skin_info.colorset..title', 'skin_info.colorset..name');
$security->encodeHTML('skin_info.colorset..name');

View file

@ -2,7 +2,7 @@
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @class communication
* @class communication
* @author NAVER (developers@xpressengine.com)
* communication module of the high class
*/
@ -22,7 +22,7 @@ class communication extends ModuleObject
function moduleInstall()
{
$oModuleController = getController('module');
foreach($this->triggers as $trigger)
{
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
@ -39,7 +39,7 @@ class communication extends ModuleObject
function checkUpdate()
{
$oModuleModel = getModel('module');
foreach($this->triggers as $trigger)
{
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]))
@ -65,7 +65,7 @@ class communication extends ModuleObject
return TRUE;
}
}
return FALSE;
}
@ -77,7 +77,7 @@ class communication extends ModuleObject
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
foreach($this->triggers as $trigger)
{
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]))
@ -106,7 +106,7 @@ class communication extends ModuleObject
*/
function recompileCache()
{
}
}

View file

@ -42,7 +42,7 @@ class communicationController extends communication
{
return $output;
}
MemberController::clearMemberCache($args->member_srl);
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationMessages', 'message_type', Context::get('message_type'));
@ -82,7 +82,7 @@ class communicationController extends communication
{
throw new Rhymix\Framework\Exception('msg_content_is_null');
}
$temp_srl = intval(Context::get('temp_srl')) ?: null;
if($temp_srl && !$_SESSION['upload_info'][$temp_srl]->enabled)
{
@ -241,7 +241,7 @@ class communicationController extends communication
$oDB->rollback();
return $output;
}
// update attached files
if ($temp_srl)
{
@ -251,10 +251,10 @@ class communicationController extends communication
// Call a trigger (after)
ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_obj);
$oDB->commit();
// create a flag that message is sent (in file format)
// create a flag that message is sent (in file format)
$this->updateFlagFile($receiver_srl);
return new BaseObject(0, 'success_sended');
@ -395,7 +395,7 @@ class communicationController extends communication
{
return $output;
}
// Delete attachment, only if related message has also been deleted
$related = $message->related_srl ? $oCommunicationModel->getSelectedMessage($message->related_srl) : true;
if (!$related)
@ -404,7 +404,7 @@ class communicationController extends communication
$oFileController->deleteFiles($message->message_srl);
$oFileController->deleteFiles($message->related_srl);
}
$this->updateFlagFile($member_srl);
$this->setMessage('success_deleted');
}
@ -467,7 +467,7 @@ class communicationController extends communication
// Organize variables
$args = new stdClass();
$args->message_srls = implode(',', $target);
if ($message_type === 'N')
{
$args->message_type = 'R';
@ -476,7 +476,7 @@ class communicationController extends communication
{
$args->message_type = $message_type;
}
if($message_type == 'S')
{
$args->sender_srl = $member_srl;
@ -503,14 +503,14 @@ class communicationController extends communication
unset($related[$item->message_srl]);
}
}
// Delete
$output = executeQuery('communication.deleteMessages', $args);
if(!$output->toBool())
{
return $output;
}
// Delete attachment, only if related message has also been deleted
$oFileController = getController('file');
foreach ($related as $message_srl => $related_srl)
@ -518,7 +518,7 @@ class communicationController extends communication
$oFileController->deleteFiles($message_srl);
$oFileController->deleteFiles($related_srl);
}
$this->updateFlagFile($member_srl);
$this->setMessage('success_deleted');
@ -549,7 +549,7 @@ class communicationController extends communication
{
throw new Rhymix\Framework\Exception('msg_no_self_friend');
}
// Check duplicate friend
$args = new stdClass();
$args->member_srl = $logged_info->member_srl;
@ -567,7 +567,7 @@ class communicationController extends communication
{
return $trigger_output;
}
// Variable
$args->friend_srl = getNextSequence();
$args->list_order = $args->friend_srl * -1;
@ -579,7 +579,7 @@ class communicationController extends communication
// Call trigger (after)
$trigger_output = ModuleHandler::triggerCall('communication.addFriend', 'after', $args);
$this->add('member_srl', $target_srl);
$this->setMessage('success_registed');
@ -663,7 +663,7 @@ class communicationController extends communication
}
/**
* Delete a friend
* Delete a friend
* @return void|Object (success : void, fail : Object)
*/
function procCommunicationDeleteFriend()
@ -693,14 +693,14 @@ class communicationController extends communication
$args = new stdClass();
$args->member_srl = $logged_info->member_srl;
$args->friend_srl_list = $friend_srl_list;
// Call trigger (before)
$trigger_output = ModuleHandler::triggerCall('communication.deleteFriend', 'before', $args);
if(!$trigger_output->toBool())
{
return $trigger_output;
}
// Delete
$output = executeQuery('communication.deleteFriend', $args);
if(!$output->toBool())
@ -710,7 +710,7 @@ class communicationController extends communication
// Call trigger (after)
$trigger_output = ModuleHandler::triggerCall('communication.deleteFriend', 'after', $args);
$this->setMessage('success_deleted');
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispCommunicationFriend');
@ -855,7 +855,7 @@ class communicationController extends communication
/**
* set a message status to be 'already read'
* @param int $message_srl
* @param int $message_srl
* @return Object
*/
function setMessageReaded($message_srl)
@ -864,14 +864,14 @@ class communicationController extends communication
$args->message_srl = $message_srl;
$args->related_srl = $message_srl;
$output = executeQuery('communication.setMessageReaded', $args);
// Update flag file
$logged_info = Context::get('logged_info');
$this->updateFlagFile($logged_info->member_srl);
return $output;
}
/**
* Update flag file
* @param int $member_srl
@ -897,12 +897,12 @@ class communicationController extends communication
// Add menus on the member login information
$config = getModel('communication')->getConfig();
$oMemberController = getController('member');
if($config->enable_message == 'Y')
{
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
}
if($config->enable_friend == 'Y')
{
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
@ -921,10 +921,10 @@ class communicationController extends communication
{
return;
}
$oCommunicationModel = getModel('communication');
$config = $oCommunicationModel->getConfig();
if($config->enable_message == 'N' && $config->enable_friend == 'N')
{
return;
@ -933,12 +933,12 @@ class communicationController extends communication
{
return;
}
$mid = Context::get('cur_mid');
$member_srl = Context::get('target_srl');
$logged_info = Context::get('logged_info');
$oMemberController = getController('member');
// Add a feature to display own message box.
if($logged_info->member_srl == $member_srl)
{
@ -947,7 +947,7 @@ class communicationController extends communication
{
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationMessages'), 'cmd_view_message_box', '', 'self');
}
// Display a list of friends
if($config->enable_friend == 'Y')
{
@ -970,7 +970,7 @@ class communicationController extends communication
{
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup');
}
// Add a menu for listing friends (if a friend is new)
if($config->enable_friend == 'Y' && !$oCommunicationModel->isAddedFriend($member_srl))
{

View file

@ -41,7 +41,7 @@ class communicationMobile extends communicationView
$this->module_info->mlayout_srl = $this->config->mlayout_srl;
$this->setLayoutPath($layout_info->path);
}
$this->setTemplatePath($template_path);
}

View file

@ -30,7 +30,7 @@ class communicationModel extends communication
{
$config = new stdClass();
}
$config->enable_message = $config->enable_message ?? 'Y';
$config->enable_friend = $config->enable_friend ?? 'Y';
$config->enable_attachment = $config->enable_attachment ?? 'N';
@ -42,12 +42,12 @@ class communicationModel extends communication
$config->mskin = $config->mskin ?? 'default';
$config->mcolorset = $config->mcolorset ?? 'white';
$config->grant_send = $config->grant_send ?? array('default' => 'member');
return $config;
}
/**
* @brief get grant array for insert to database. table module_config's config field
* @brief get grant array for insert to database. table module_config's config field
* @param string $default
* @param array $group
* @return array
@ -59,17 +59,17 @@ class communicationModel extends communication
{
$grant = array('default' => $default);
}
else if(is_array($group))
else if(is_array($group))
{
$grant_group = array();
foreach($group as $group_srl)
{
$grant_group[$group_srl] = true;
}
$grant = array('group' => $grant_group);
}
}
return $grant;
}
@ -81,7 +81,7 @@ class communicationModel extends communication
public static function checkGrant($arrGrant)
{
if(!$arrGrant) return false;
$logged_info = Context::get('logged_info');
if($logged_info->is_admin == 'Y') return true;
@ -194,7 +194,7 @@ class communicationModel extends communication
$oCommunicationController = getController('communication');
$oCommunicationController->setMessageReaded($message->message_srl);
if (!$message->member_srl)
{
$message->member_srl = $message->sender_srl;
@ -280,13 +280,13 @@ class communicationModel extends communication
$message->user_name = $message->nick_name;
}
}
return $output;
}
/**
* Get a list of files attached to a message.
*
*
* @param object $message
* @return array
*/
@ -318,7 +318,7 @@ class communicationModel extends communication
$args->page_count = 10;
$output = executeQuery('communication.getFriends', $args, $columnList);
return $output;
}
@ -334,7 +334,7 @@ class communicationModel extends communication
$args = new stdClass();
$args->member_srl = $logged_info->member_srl;
$args->target_srl = $member_srl;
$output = executeQuery('communication.isAddedFriend', $args);
return $output->data->count;
@ -354,7 +354,7 @@ class communicationModel extends communication
$args->friend_group_srl = $friend_group_srl;
$output = executeQuery('communication.getFriendGroup', $args);
return $output->data;
}
@ -372,15 +372,15 @@ class communicationModel extends communication
$friend_group_list = array();
foreach ($output->data as $item)
{
$friend_group_list[$item->friend_group_srl] = $item;
$friend_group_list[$item->friend_group_srl] = $item;
}
return $friend_group_list;
}
/**
* check whether to be added in the friend list
* @param int $target_srl
* @return boolean (true : friend, false : not friend)
* @param int $target_srl
* @return boolean (true : friend, false : not friend)
*/
public static function isFriend($target_srl)
{

View file

@ -54,7 +54,7 @@ class communicationView extends communication
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
// Error appears if not logged-in
if(!Context::get('is_logged'))
{
@ -117,7 +117,7 @@ class communicationView extends communication
stripEmbedTagForAdmin($message->content, $message->sender_srl);
Context::set('message', $message);
Context::set('message_files', CommunicationModel::getMessageFiles($message));
if(Mobile::isFromMobilePhone() && file_exists($this->getTemplatePath() . 'read_message.html'))
{
$template_filename = 'read_message';
@ -132,7 +132,7 @@ class communicationView extends communication
// Extract a list
$columnList = array('message_srl', 'message_type', 'related_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
$output = $oCommunicationModel->getMessages($message_type, $columnList);
// set a template file
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
@ -159,7 +159,7 @@ class communicationView extends communication
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
// Error appears if not logged-in
if(!Context::get('is_logged'))
{
@ -200,13 +200,13 @@ class communicationView extends communication
{
throw new Rhymix\Framework\Exceptions\NotPermitted;
}
// Fix missing mid (it causes errors when uploading)
if(!Context::get('mid'))
{
Context::set('mid', Context::get('site_module_info')->mid);
}
// Error appears if not logged-in
if(!Context::get('is_logged'))
{
@ -231,7 +231,7 @@ class communicationView extends communication
$oCommunicationModel = getModel('communication');
$oMemberModel = getModel('member');
// get message_srl of the original message if it is a reply
$message_srl = Context::get('message_srl');
if($message_srl)
@ -292,13 +292,13 @@ class communicationView extends communication
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
// Error appears if not logged-in
if(!Context::get('is_logged'))
{
throw new Rhymix\Framework\Exceptions\MustLogin;
}
$oCommunicationModel = getModel('communication');
// get a group list
@ -346,12 +346,12 @@ class communicationView extends communication
{
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
if($this->config->enable_friend == 'N')
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
// error appears if not logged-in
if(!Context::get('is_logged'))
{
@ -396,12 +396,12 @@ class communicationView extends communication
{
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
if($this->config->enable_friend == 'N')
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
// error apprears if not logged-in
if(!Context::get('is_logged'))
{