17523819 : enable setting SSL and HTTP port

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5109 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2008-12-17 09:42:07 +00:00
parent b92ae79baa
commit 3dc23c0223
11 changed files with 170 additions and 27 deletions

View file

@ -44,6 +44,15 @@
Context::set('use_rewrite', $db_info->use_rewrite=='Y'?'Y':'N');
Context::set('use_optimizer', $db_info->use_optimizer!='N'?'Y':'N');
Context::set('qmail_compatibility', $db_info->qmail_compatibility=='Y'?'Y':'N');
Context::set('use_ssl', $db_info->use_ssl?$db_info->use_ssl:"none");
if($db_info->http_port)
{
Context::set('http_port', $db_info->http_port);
}
if($db_info->https_port)
{
Context::set('https_port', $db_info->https_port);
}
Context::setBrowserTitle("XE Admin Page");
}
@ -205,6 +214,7 @@
**/
function dispAdminConfig() {
$db_info = Context::getDBInfo();
debugPrint($db_info);
Context::set('selected_lang', $db_info->lang_type);
Context::set('lang_supported', Context::loadLangSupported());

View file

@ -57,4 +57,13 @@
$lang->cmd_lang_select = "언어선택";
$lang->about_cmd_lang_select = "선택된 언어들만 서비스 됩니다";
$lang->about_recompile_cache = "쓸모 없어졌거나 잘못된 캐시파일들을 정리할 수 있습니다";
$lang->use_ssl = "SSL 사용";
$lang->ssl_options = array(
'none' => "사용안함",
'optional' => "선택적으로",
'always' => "항상사용"
);
$lang->about_use_ssl = "선택적으로에서는 회원가입/정보수정등의 지정된 action에서 SSL을 사용하고 항상 사용은 모든 서비스가 SSL을 이용하게 됩니다.";
$lang->server_ports = "서버포트지정";
$lang->about_server_ports = "HTTP는 80, HTTPS는 443이외의 다른 포트를 사용하는 경우에 포트를 지정해주어야합니다.";
?>

View file

@ -53,6 +53,25 @@
<p>{$lang->about_qmail_compatibility}</p>
</td>
</tr>
<tr class="row2">
<th><div>{$lang->use_ssl}</div></th>
<td>
<select name="use_ssl">
<!--@foreach($lang->ssl_options as $key => $val)-->
<option value="{$key}" <!--@if($key == $use_ssl)-->selected<!--@end--> >{$val}</option>
<!--@endforeach-->
</select>
<p>{$lang->about_use_ssl}</p>
</td>
</tr>
<tr>
<th><div>{$lang->server_ports}</div></th>
<td>
HTTP : <input type="text" name="http_port" class="inputTypeText" size="5" value="{$http_port}">,
HTTPS: <input type="text" name="https_port" class="inputTypeText" size="5" value="{$https_port}">
<p>{$lang->about_server_ports}</p>
</td>
</tr>
<tr class="row2">
<td colspan="2" class="right">
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>

View file

@ -56,12 +56,37 @@
$qmail_compatibility = Context::get('qmail_compatibility');
if($qmail_compatibility!='Y') $qmail_compatibility = 'N';
$use_ssl = Context::get('use_ssl');
if(!$use_ssl) $use_ssl = 'none';
$http_port = Context::get('http_port');
$https_port = Context::get('https_port');
$db_info = Context::getDBInfo();
$db_info->time_zone = $time_zone;
$db_info->qmail_compatibility = $qmail_compatibility;
$db_info->use_rewrite = $use_rewrite;
$db_info->use_optimizer = $use_optimizer;
$db_info->lang_type = Context::get('lang_type');
$db_info->use_ssl = $use_ssl;
if($http_port)
{
$db_info->http_port = (int) $http_port;
}
else if($db_info->http_port)
{
unset($db_info->http_port);
}
if($https_port)
{
$db_info->https_port = (int) $https_port;
}
else if($db_info->https_port)
{
unset($db_info->https_port);
}
Context::setDBInfo($db_info);
$oInstallController = &getController('install');

View file

@ -83,13 +83,12 @@
**/
function procMemberAdminInsertConfig() {
// 기본 정보를 받음
$args = Context::gets('webmaster_name','webmaster_email','skin','colorset','enable_openid','enable_join','enable_confirm','enable_ssl','limit_day','after_login_url','after_logout_url','redirect_url','agreement','profile_image','profile_image_max_width','profile_image_max_height','image_name','image_mark', 'image_name_max_width', 'image_name_max_height','image_mark_max_width','image_mark_max_height','signature_max_height','editor_skin','editor_colorset', 'ssl_port');
$args = Context::gets('webmaster_name','webmaster_email','skin','colorset','enable_openid','enable_join','enable_confirm','limit_day','after_login_url','after_logout_url','redirect_url','agreement','profile_image','profile_image_max_width','profile_image_max_height','image_name','image_mark', 'image_name_max_width', 'image_name_max_height','image_mark_max_width','image_mark_max_height','signature_max_height','editor_skin','editor_colorset');
if(!$args->skin) $args->skin = "default";
if(!$args->colorset) $args->colorset = "white";
if(!$args->editor_skin) $args->editor_skin= "default";
if(!$args->editor_colorset) $args->editor_colorset = "white";
if($args->enable_join!='Y') $args->enable_join = 'N';
if($args->enable_ssl!='Y') $args->enable_ssl = 'N';
if($args->enable_openid!='Y') $args->enable_openid= 'N';
if($args->profile_image !='Y') $args->profile_image = 'N';
if($args->image_name!='Y') $args->image_name = 'N';

View file

@ -28,10 +28,6 @@
Context::addSSLAction('procMemberInsert');
Context::addSSLAction('procMemberModifyInfo');
Context::addSSLAction('procMemberOpenIDLogin');
if($member_config->ssl_port)
{
Context::setSSLPort($member_config->ssl_port);
}
}
}

View file

@ -43,14 +43,6 @@
{$lang->about_enable_confirm}
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->enable_ssl}</div></th>
<td>
<input type="checkbox" name="enable_ssl" value="Y" <!--@if($config->enable_ssl=='Y')-->checked="checked"<!--@end--> class="checkbox" />
{$lang->about_enable_ssl} <BR />
<input type="text" name="ssl_port" value="{$config->ssl_port}" size="5" class="inputTypeText" /> {$lang->about_ssl_port}
</td>
</tr>
<tr class="row2">
<th scope="row"><div>{$lang->limit_day}</div></th>
<td>