Просмотр исходного кода

Merge branch 'master' of ssh://git.dever.cc:10022/dever-product/dreamland

dever 4 лет назад
Родитель
Сommit
f25f551a9c
2 измененных файлов с 6 добавлено и 0 удалено
  1. 5 0
      app/collection/lib/Content.php
  2. 1 0
      app/content/database/pic.php

+ 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 {
+                        $text = Dever::param('text', $data);
+                        if ($text && isset($text[0]['pic']) && $text[0]['pic']) {
+                            $update['pic'] = Dever::load('upload/view')->get($text[0]['pic'], 'c', 1);
+                        }
                     }
                 }
                 $update['where_id'] = $content_id;

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

@@ -59,6 +59,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '',
 			'match' 	=> 'is_numeric',
+            'order'     => 'desc',
 			//'list'		=> true,
 		),