|
@@ -23,11 +23,18 @@ class Vote extends Base
|
|
$data = Dever::load('comment/vote-one', array('option_info_id' => $this->data['info']['id'], 'option_source_table' => $source_table, 'option_source_id' => $source_id, 'option_uid' => $uid));
|
|
$data = Dever::load('comment/vote-one', array('option_info_id' => $this->data['info']['id'], 'option_source_table' => $source_table, 'option_source_id' => $source_id, 'option_uid' => $uid));
|
|
|
|
|
|
if ($data) {
|
|
if ($data) {
|
|
- Dever::alert('已赞过');
|
|
+ if ($source_table == 4) {
|
|
|
|
+ Dever::alert('已赞过');
|
|
|
|
+ } else {
|
|
|
|
+ $id = $data['id'];
|
|
|
|
+ Dever::load('comment/vote-delete', $id);
|
|
|
|
+ }
|
|
|
|
+
|
|
$id = $data['id'];
|
|
$id = $data['id'];
|
|
$update['set_cdate'] = time();
|
|
$update['set_cdate'] = time();
|
|
$update['where_id'] = $id;
|
|
$update['where_id'] = $id;
|
|
Dever::load('comment/vote-update', $update);
|
|
Dever::load('comment/vote-update', $update);
|
|
|
|
+ */
|
|
} else {
|
|
} else {
|
|
$insert['add_source_table'] = $source_table;
|
|
$insert['add_source_table'] = $source_table;
|
|
$insert['add_source_id'] = $source_id;
|
|
$insert['add_source_id'] = $source_id;
|