菜单修改保存错误
pull/19/head
warlee 2015-03-31 12:29:36 +08:00
parent bbd23ffb11
commit 3ff76d21be
4 changed files with 21 additions and 3 deletions

View File

@ -1,3 +1,7 @@
###ver3.12 `2015/3/31`
-----
####update:
- 兼容ie中文导致菜单保存丢失问题
###ver3.11 `2015/3/30`
-----

View File

@ -1,2 +1,2 @@
<?php
define('KOD_VERSION','3.11');
define('KOD_VERSION','3.12');

View File

@ -33,6 +33,9 @@ class setting extends Controller{
}
public function get_setting(){
$setting = $GLOBALS['config']['setting_system']['menu'];
if (!$setting) {
$setting = $this->config['setting_menu_default'];
}
show_json($setting);
}
@ -46,7 +49,11 @@ class setting extends Controller{
}
$setting = $GLOBALS['config']['setting_system'];
foreach ($data as $key => $value){
$setting[$key] = rawurldecode($value);
if ($key=='menu') {
$setting[$key] = $value;
}else{
$setting[$key] = rawurldecode($value);
}
}
//$setting['menu'] = $GLOBALS['config']['setting_menu_default'];
//为了保存更多的数据;不直接覆盖文件 $data->setting_file;

View File

@ -168,7 +168,14 @@ function init_setting(){
fileCache::save($setting_file,$setting);
}else{
$setting = fileCache::load($setting_file);
}
}
if (!is_array($setting)) {
$setting = $GLOBALS['config']['setting_system_default'];
}
if (!is_array($setting['menu'])) {
$setting['menu'] = $GLOBALS['config']['setting_menu_default'];
}
$GLOBALS['app']->setDefaultController($setting['first_in']);//设置默认控制器
$GLOBALS['app']->setDefaultAction('index'); //设置默认控制器函数