dever преди 6 години
родител
ревизия
a873717f66
променени са 6 файла, в които са добавени 59 реда и са изтрити 14 реда
  1. 3 1
      content/database/article.php
  2. 48 9
      journal/database/info.php
  3. 1 1
      tag/database/info.php
  4. 1 1
      tag/lib/Core.php
  5. 3 1
      video/database/live.php
  6. 3 1
      video/database/vod.php

+ 3 - 1
content/database/article.php

@@ -211,10 +211,12 @@ return array
 		(
 			'type' 		=> 'int-11',
 			'name' 		=> '发布时间',
-			'match' 	=> 'option',
+			'match' 	=> array('is_numeric', time()),
+			'default'	=> '',
 			'desc' 		=> '',
 			'update'	=> 'date',
 			'callback'	=> 'maketime',
+			'insert'	=> true,
 			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
 			'auth'		=> '"{pdate}" > 0',
 		),

+ 48 - 9
journal/database/info.php

@@ -1,4 +1,13 @@
 <?php
+
+$audit = Dever::config('base')->audit;
+
+$audit = array
+(
+	1 => '未上线',
+	2 => '上线发布',
+);
+
 $page = 15;
 return array
 (
@@ -7,6 +16,20 @@ return array
 	# 显示给用户看的名称
 	'lang' => '小刊管理',
 	'order' => 100,
+
+	# 同步更新另外一个或多个表的数据 小刊不需要同步到审核页面
+	/*
+	'syncone' => array
+	(
+		'audit/data' => array
+		(
+			# 更新另外一个表的字段 => 本表的字段
+			'where' => array('data_id' => 'id', 'type' => 4),
+			# 要更新的数据
+			'update' => array('data_id' => 'id', 'type' => 4, 'pdate' => 'pdate', 'reorder' => 'reorder', 'name' => 'name', 'audit' => 'audit'),
+		)
+	),
+	*/
 	# 数据结构
 	'struct' => array
 	(
@@ -21,8 +44,8 @@ return array
 		
 		'name'		=> array
 		(
-			'type' 		=> 'varchar-80',
-			'name' 		=> '标题',
+			'type' 		=> 'varchar-180',
+			'name' 		=> '杂志标题',
 			'default' 	=> '',
 			'desc' 		=> '标题',
 			'match' 	=> 'is_string',
@@ -30,12 +53,12 @@ return array
 			'list'		=> true,
 		),
 
-		'name'		=> array
+		'subname'		=> array
 		(
 			'type' 		=> 'varchar-80',
-			'name' 		=> '标题',
+			'name' 		=> '标题-一般为杂志的期数,如第1期',
 			'default' 	=> '',
-			'desc' 		=> '标题',
+			'desc' 		=> '标题',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
 			'list'		=> true,
@@ -48,7 +71,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '列表封面图',
 			'match' 	=> 'option',
-			'update'	=> 'image',
+			//'update'	=> 'image',
 			'key' 		=> '1',
 			'place'		=> '150',
 		),
@@ -68,7 +91,7 @@ return array
 		'num_add_ding'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '手动增加订阅数',
+			'name' 		=> '订阅数基数',
 			'default' 	=> '0',
 			'desc' 		=> '手动增加阅读数',
 			'match' 	=> 'option',
@@ -89,7 +112,7 @@ return array
 		'num_add_view'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '手动增加阅读数',
+			'name' 		=> '阅读数基数',
 			'default' 	=> '0',
 			'desc' 		=> '手动增加阅读数',
 			'match' 	=> 'option',
@@ -139,6 +162,20 @@ return array
 			'match' 	=> 'is_numeric',
 		),
 
+		'audit'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '审核',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $audit,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
 		'admin_founder'		=> array
 		(
 			'type' 		=> 'int-11',
@@ -161,10 +198,12 @@ return array
 		(
 			'type' 		=> 'int-11',
 			'name' 		=> '发布时间',
-			'match' 	=> 'option',
+			'match' 	=> array('is_numeric', time()),
+			'default'	=> '',
 			'desc' 		=> '',
 			'update'	=> 'date',
 			'callback'	=> 'maketime',
+			'insert'	=> true,
 			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
 			'auth'		=> '"{pdate}" > 0',
 		),

+ 1 - 1
tag/database/info.php

@@ -124,7 +124,7 @@ return array
 			'type' => 'all',
 			'order' => array('reorder' => 'desc', 'id' => 'desc'),
 			'limit' => '0,1000',
-			'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
+			'col' => 'name as name, id, id as value, "" as selected, "" as disabled',
 		),
 	),
 );

+ 1 - 1
tag/lib/Core.php

@@ -83,7 +83,7 @@ class Core
 
             $data = array_merge($data, array());
         } else {
-            $data = $insert;
+            $data = $insert + $data;
         }
 
         return $data;

+ 3 - 1
video/database/live.php

@@ -171,10 +171,12 @@ return array
 		(
 			'type' 		=> 'int-11',
 			'name' 		=> '发布时间',
-			'match' 	=> 'option',
+			'match' 	=> array('is_numeric', time()),
+			'default'	=> '',
 			'desc' 		=> '',
 			'update'	=> 'date',
 			'callback'	=> 'maketime',
+			'insert'	=> true,
 			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
 			'auth'		=> '"{pdate}" > 0',
 		),

+ 3 - 1
video/database/vod.php

@@ -197,10 +197,12 @@ return array
 		(
 			'type' 		=> 'int-11',
 			'name' 		=> '发布时间',
-			'match' 	=> 'option',
+			'match' 	=> array('is_numeric', time()),
+			'default'	=> '',
 			'desc' 		=> '',
 			'update'	=> 'date',
 			'callback'	=> 'maketime',
+			'insert'	=> true,
 			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
 			'auth'		=> '"{pdate}" > 0',
 		),