Also support plain window for adding friend & friend group #2154

This commit is contained in:
Kijin Sung 2023-07-17 21:50:04 +09:00
parent e635970c6a
commit 64b2918559
6 changed files with 95 additions and 30 deletions

View file

@ -374,8 +374,22 @@ class communicationView extends communication
*/
function dispCommunicationAddFriend()
{
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
// If window type is self, use member module layout.
// Otherwise, assume it's a popup window on PC for backward compatibility.
if(Context::get('window_type') === 'self')
{
$oMemberView = MemberView::getInstance();
if (!$oMemberView->checkMidAndRedirect())
{
$this->setRedirectUrl($oMemberView->getRedirectUrl());
return;
}
}
elseif(!Context::get('m'))
{
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
}
if($this->config->enable_friend == 'N')
{
@ -432,8 +446,22 @@ class communicationView extends communication
*/
function dispCommunicationAddFriendGroup()
{
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
// If window type is self, use member module layout.
// Otherwise, assume it's a popup window on PC for backward compatibility.
if(Context::get('window_type') === 'self')
{
$oMemberView = MemberView::getInstance();
if (!$oMemberView->checkMidAndRedirect())
{
$this->setRedirectUrl($oMemberView->getRedirectUrl());
return;
}
}
elseif(!Context::get('m'))
{
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
}
if($this->config->enable_friend == 'N')
{