作者 邓超

body bug

... ... @@ -834,13 +834,7 @@ class Home extends Base {
$body = db()->first(bodySql::first($id));
if($body){
$data['body'] = json_decode($body['text_html'],true);
if(count($data['body']) == 1){
if(count($data['body'][0])==1){
if(isset($data['body'][0]['body'])){
$data['body'][0]['type'] = 'text/html';
}
}
}
$charset = 'utf-8';
$htmlbody = '';
foreach ($data['body'] as $bd){
... ... @@ -853,6 +847,12 @@ class Home extends Base {
}
foreach ($data['body'] as $bdk=>$bd){
if(count($bd)==1){
if(isset($bd['body'])){
$data['body'][$bdk]['type'] = 'text/html';
}
}
if(!empty($bd['path'])){
$data['body'][$bdk]['name'] = @base64_decode($bd['name']);
... ...