dever 4 anni fa
parent
commit
60f6711d04
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      app/community/lib/Core.php

+ 4 - 4
app/community/lib/Core.php

@@ -48,14 +48,14 @@ class Core
             $where += $data;
         }
         if (!$info) {
-            $state = 1;
+            $up = 1;
             Dever::db($this->table)->insert($where);
         } else {
             if ($info['state'] == 1) {
-                $state = 2;
+                $up = 2;
                 Dever::db($this->table)->update(array('where_id' => $info['id'], 'state' => 2));
             } else {
-                $state = 1;
+                $up = 1;
                 Dever::db($this->table)->update(array('where_id' => $info['id'], 'state' => 1));
             }
         }
@@ -69,7 +69,7 @@ class Core
         $table = Dever::config('base')->table_name[$type];
         $state = Dever::db($table)->update(array('where_id' => $id, 'num_' . $this->name => $total));
 
-        if ($state == 1) {
+        if ($up == 1) {
             Dever::score($uid, 'submit_' . $this->name, $this->lang);
         } else {
             Dever::score($uid, 'submit_no_' . $this->name, '取消' . $this->lang);