dever 6 years ago
parent
commit
e8352bb0ab
2 changed files with 13 additions and 1 deletions
  1. 12 0
      journal/database/info.php
  2. 1 1
      main/src/Journal.php

+ 12 - 0
journal/database/info.php

@@ -605,6 +605,18 @@ $config = array
             'type' => 'one',
             'col' => $col,
         ),
+
+        'getNew' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'state' => 1,
+            ),
+            'type' => 'one',
+            'order' => array('ssdate' => 'desc'),
+            'col' => $col . ',pdate as ssdate',
+        ),
 	),
 );
 

+ 1 - 1
main/src/Journal.php

@@ -62,7 +62,7 @@ class Journal extends Core
             $this->data['push'] = Dever::db('journal/info')->getOne($cate['journal_id']);
         } else {
             # 获取最新的小刊
-            $this->data['push'] = Dever::db('journal/info')->getNew(array(''));
+            $this->data['push'] = Dever::db('journal/info')->getNew(array('time' => time()));
         }