parent
bbd23ffb11
commit
3ff76d21be
|
@ -1,3 +1,7 @@
|
||||||
|
###ver3.12 `2015/3/31`
|
||||||
|
-----
|
||||||
|
####update:
|
||||||
|
- 兼容ie中文,导致菜单保存丢失问题
|
||||||
|
|
||||||
###ver3.11 `2015/3/30`
|
###ver3.11 `2015/3/30`
|
||||||
-----
|
-----
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
define('KOD_VERSION','3.11');
|
define('KOD_VERSION','3.12');
|
|
@ -33,6 +33,9 @@ class setting extends Controller{
|
||||||
}
|
}
|
||||||
public function get_setting(){
|
public function get_setting(){
|
||||||
$setting = $GLOBALS['config']['setting_system']['menu'];
|
$setting = $GLOBALS['config']['setting_system']['menu'];
|
||||||
|
if (!$setting) {
|
||||||
|
$setting = $this->config['setting_menu_default'];
|
||||||
|
}
|
||||||
show_json($setting);
|
show_json($setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +49,12 @@ class setting extends Controller{
|
||||||
}
|
}
|
||||||
$setting = $GLOBALS['config']['setting_system'];
|
$setting = $GLOBALS['config']['setting_system'];
|
||||||
foreach ($data as $key => $value){
|
foreach ($data as $key => $value){
|
||||||
|
if ($key=='menu') {
|
||||||
|
$setting[$key] = $value;
|
||||||
|
}else{
|
||||||
$setting[$key] = rawurldecode($value);
|
$setting[$key] = rawurldecode($value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//$setting['menu'] = $GLOBALS['config']['setting_menu_default'];
|
//$setting['menu'] = $GLOBALS['config']['setting_menu_default'];
|
||||||
//为了保存更多的数据;不直接覆盖文件 $data->setting_file;
|
//为了保存更多的数据;不直接覆盖文件 $data->setting_file;
|
||||||
fileCache::save($setting_file,$setting);
|
fileCache::save($setting_file,$setting);
|
||||||
|
|
|
@ -169,6 +169,13 @@ function init_setting(){
|
||||||
}else{
|
}else{
|
||||||
$setting = fileCache::load($setting_file);
|
$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']->setDefaultController($setting['first_in']);//设置默认控制器
|
||||||
$GLOBALS['app']->setDefaultAction('index'); //设置默认控制器函数
|
$GLOBALS['app']->setDefaultAction('index'); //设置默认控制器函数
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue