增加了添加新闻时默认加入平台名称的功能

This commit is contained in:
Li Jianxuan 2014-05-29 02:02:12 +00:00
parent 3110ae7d9c
commit e00911af13
1 changed files with 649 additions and 646 deletions

View File

@ -372,8 +372,10 @@ class Archive
return 0;
}
$config = \Zend_Registry::get('config');
//执行SQL语句后返回插入文章表的ID
$sql = "INSERT INTO ".$this->tbl_archives." (userid,title,description,image,source,ts_published,is_pub,body)
$sql = "INSERT INTO ".$this->tbl_archives." (userid,title,description,image,source,ts_published,is_pub,body,sub)
VALUES (
".$data['userid'].",
".$data['title'].",
@ -382,7 +384,8 @@ class Archive
".$data['source'].",
".$data['ts_published'].",
".$data['is_pub'].",
".$data['body']."
".$data['body'].",
'".$config->sub->metadata."'
)
RETURNING id";
try{