Merge pull request #1780 from kijin/fix/xedition-login-ssl

SSL 선택적 사용시 XEDITION 레이아웃의 로그인 팝업에 SSL이 적용되지 않는 문제 수정
This commit is contained in:
bnu 2015-11-04 15:22:36 +09:00
commit 5fc1ee52f3
2 changed files with 14 additions and 2 deletions

View file

@ -471,6 +471,18 @@ function getFullSiteUrl()
return $url;
}
/**
* Return the exact url of the current page
*
* @return string
*/
function getCurrentPageUrl()
{
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
$url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
return htmlspecialchars($url, ENT_COMPAT, 'UTF-8', FALSE);
}
/**
* Return if domain of the virtual site is url type or id type
*

View file

@ -448,9 +448,9 @@
<h1>LOGIN</h1>
</div>
<div class="login-body">
<form action="{getUrl()}" method="post" autocomplete="off">
<form action="{getUrl('', 'act', 'procMemberLogin')}" method="post" autocomplete="off">
<input type="hidden" name="act" value="procMemberLogin" />
<input type="hidden" name="success_return_url" value="{htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', FALSE)}" />
<input type="hidden" name="success_return_url" value="{getCurrentPageUrl()}" />
<input type="hidden" name="xe_validator_id" value="layouts/xedition/layout/1" />
<fieldset>
<legend class="blind">{$lang->cmd_login}</legend>