dever 4 years ago
parent
commit
3ad8c4ee1e
2 changed files with 6 additions and 0 deletions
  1. 1 0
      app/collection/database/content.php
  2. 5 0
      app/collection/lib/Content.php

+ 1 - 0
app/collection/database/content.php

@@ -208,6 +208,7 @@ return array
             'desc'      => '',
             # 只有insert时才生效
             'insert'    => true,
+            'order'     => 'desc',
             //'search'    => 'date',
             //'list'      => 'date("Y-m-d H:i:s", {cdate})',
         ),

+ 5 - 0
app/collection/lib/Content.php

@@ -22,6 +22,11 @@ class Content
                     $pic = Dever::param('pic', $data);
                     if ($pic) {
                         $update['pic'] = Dever::load('upload/view')->get($pic, 'c', 1);
+                    } else {
+                        $pic = Dever::param('text_c_0_i_pic', $data);
+                        if ($pic) {
+                            $update['pic'] = Dever::load('upload/view')->get($pic, 'c', 1);
+                        }
                     }
                 }
                 $update['where_id'] = $content_id;