|
@@ -6,18 +6,12 @@ use Dever;
|
|
|
|
|
|
class Comment
|
|
|
{
|
|
|
- private function table($type)
|
|
|
- {
|
|
|
- $table = Dever::db('community/comment')->config['set']['table_name'][$type];
|
|
|
- return $table;
|
|
|
- }
|
|
|
-
|
|
|
public function getData($method = 'getAll', $uid, $type = false, $type_id = false)
|
|
|
{
|
|
|
$where['type'] = $type;
|
|
|
$where['type_id'] = $type_id;
|
|
|
$info = Dever::db('community/comment')->$method($where);
|
|
|
- $data['info'] = $info;
|
|
|
+ $data['info'] = array();
|
|
|
$data['total'] = Dever::total();
|
|
|
if ($info) {
|
|
|
foreach ($info as $k => $v) {
|
|
@@ -30,7 +24,7 @@ class Comment
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function submit($uid, $id, $type, $pic, $content, $to_id, $to_uid)
|
|
|
+ public function submit($uid, $id, $type, $content)
|
|
|
{
|
|
|
$where['uid'] = $uid;
|
|
|
$where['type_id'] = $id;
|
|
@@ -38,7 +32,6 @@ class Comment
|
|
|
$where['content'] = $content;
|
|
|
$table = 'community/comment';
|
|
|
$info = false;
|
|
|
- $data_table = $this->table($type);
|
|
|
if (!$info) {
|
|
|
Dever::db($table)->insert($where);
|
|
|
Dever::score($uid, 'submit_comment', '发布弹幕');
|