관리자 메인 페이지에서 rewrite mod설정 할 때 uncheck시 xml filter의 required동작 때문에 xml filter에서 required 제거

git-svn-id: http://xe-core.googlecode.com/svn/trunk@1894 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-10 07:25:38 +00:00
parent e92ed5fa77
commit 326101b8a0
4 changed files with 27 additions and 6 deletions

View file

@ -33,8 +33,11 @@
$running_module = strtolower(preg_replace('/([a-z]+)([A-Z]+)([a-z]+)(.*)/', '\\2\\3', $this->act));
Context::set('running_module', $running_module);
$db_info = Context::getDBInfo();
Context::set('time_zone_list', $GLOBALS['time_zone']);
Context::set('time_zone', $GLOBALS['_time_zone']);
Context::set('use_rewrite', $db_info->use_rewrite=='Y'?'Y':'N');
Context::setBrowserTitle("ZeroboardXE Admin Page");
}

View file

@ -1,4 +1,4 @@
<filter name="save_time_zone" module="install" act="procInstallAdminSaveTimeZone" >
<filter name="update_env_config" module="install" act="procInstallAdminSaveTimeZone" >
<form>
<node target="time_zone" required="true" />
</form>

View file

@ -1,10 +1,11 @@
<!--%import("./filter/save_time_zone.xml")-->
<!--%import("./filter/update_env_config.xml")-->
<!--%import("../../install/lang")-->
<h3>{$lang->welcome_to_zeroboard_xe}</h3>
<form action="./" method="get" onsubmit="return procFilter(this, save_time_zone);">
<form action="./" method="get" onsubmit="return procFilter(this, update_env_config);">
<table cellspacing="0" class="tableType4">
<col width="100" />
<col width="250" />
<col />
<tr>
<th scope="row">Lang</th>
@ -20,16 +21,30 @@
</td>
</tr>
<tr>
<th scope="row">Time zone</th>
<th scope="row">{$lang->use_rewrite}</th>
<td>
<input type="checkbox" name="use_rewrite" value="Y" <!--@if(function_exists('apache_get_modules')&&in_array('mod_rewrite',apache_get_modules())&&$use_rewrite=='Y')-->checked="checked"<!--@end--> />
<p>{$lang->about_rewrite}</p>
</td>
</tr>
<tr>
<th scope="row">{$lang->time_zone}</th>
<td>
<select name="time_zone" class="time_zone">
<!--@foreach($time_zone_list as $key => $val)-->
<option value="{$key}" <!--@if($time_zone==$key)-->selected="selected"<!--@end-->>{$val}</option>
<!--@end-->
</select>
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>
<p>{$lang->about_time_zone}</p>
</td>
</tr>
<tr>
<th scope="row" colspan="2">
<div class="tRight">
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>
</div>
</th>
</tr>
</table>
</form>

View file

@ -31,10 +31,13 @@
* @brief time zone변경
**/
function procInstallAdminSaveTimeZone() {
$use_rewrite = Context::get('use_rewrite');
if($use_rewrite!='Y') $use_rewrite = 'N';
$time_zone = Context::get('time_zone');
$db_info = Context::getDBInfo();
$db_info->time_zone = $time_zone;
$db_info->use_rewrite = $use_rewrite;
Context::setDBInfo($db_info);
$oInstallController = &getController('install');