Merge branch 'hotfix/gitbag_op' of wmtx/platform into master

优化后台礼包
master
万盟天下 4 years ago committed by Gogs
commit 00d99897b0

@ -135,6 +135,13 @@ class GiftbagController extends ThinkController {
// var_dump($data);die();
if($data){
$data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']);
$noviceList = explode(',', $data['novice']);
$noviceList = array_filter($noviceList, function ($value) {
return $value != '';
});
$data['novice'] = implode(',', $noviceList);
$data['server_name']=get_server_name($data['server_id']);
$data['novice_num'] = count(explode(',',$data['novice']));
$Model->add($data);
@ -194,6 +201,13 @@ class GiftbagController extends ThinkController {
if($data){
$data['novice'] = str_replace(array("\r\n", "\r", "\n"), ",", $_POST['novice']);
$noviceList = explode(',', $data['novice']);
$noviceList = array_filter($noviceList, function ($value) {
return $value != '';
});
$data['novice'] = implode(',', $noviceList);
$data['novice_num'] = count(explode(',',$data['novice']));
$Model->save($data);
addOperationLog(array(

Loading…
Cancel
Save