public static function filterSettings($button_setting, $isDefault = false) { //自定义按钮才可能需要处理 if (isset($button_setting['name'])) { $button_setting['name'] = Utils::converGbkString($button_setting['name']); } if (!isset($button_setting['tab_cfg'])) { return $button_setting; } if ($isDefault) { //默认配置中汉字仍然需要进行gbk转码 AppDesign::filterViews($button_setting['tab_cfg']); } else { AppDesign::filterViews($button_setting['tab_cfg'], false); } return $button_setting; }
if ('-1' === $view_id) { $result['code'] = '1'; $result['msg'] = "Fail"; echo BIGAPPJSON::encode($result); die(0); } //保存或者修改配置 if (!empty($_REQUEST["settings"])) { runlog('bigapp', "post view info [ settings:" . $_REQUEST['settings'] . "]"); if ($_REQUEST['settings'] == base64_encode(base64_decode($_REQUEST['settings']))) { $setting = json_decode(base64_decode($_REQUEST['settings']), true); runlog('bigapp', "post info:request is base64_encode, setting:" . json_encode($setting)); } else { $setting = json_decode($_REQUEST['settings'], true); } AppDesign::filterViews($setting); $settings = array("bigapp_view_" . $view_id => $setting); $ret = C::t('common_setting')->update_batch($settings); if ($ret) { $succRet['data'] = C::t('common_setting')->fetch("bigapp_view_" . $view_id, true); //更新view视图列表 $ret = C::t("common_setting")->fetch("bigapp_view_list", true); $ret[$view_id] = $succRet['data']['name']; $settings = array("bigapp_view_list" => $ret); C::t('common_setting')->update_batch($settings); $result['code'] = '0'; $result['msg'] = "Succ"; $result['views'] = AppDesign::getViewsData(); //$result['data'] = $succRet['data']; } else { $result['code'] = '1';