| @@ 190-211 (lines=22) @@ | ||
| 187 | { |
|
| 188 | switch ($action) |
|
| 189 | { |
|
| 190 | case 'votes': |
|
| 191 | switch ($this->db->get_sql_layer()) |
|
| 192 | { |
|
| 193 | case 'sqlite': |
|
| 194 | case 'firebird': |
|
| 195 | $this->db->sql_query('DELETE FROM ' . $this->votes_table); |
|
| 196 | break; |
|
| 197 | ||
| 198 | default: |
|
| 199 | $this->db->sql_query('TRUNCATE TABLE ' . $this->votes_table); |
|
| 200 | break; |
|
| 201 | } |
|
| 202 | ||
| 203 | $sql = 'UPDATE ' . $this->links_table . ' |
|
| 204 | SET link_vote = 0, link_note = 0'; |
|
| 205 | $this->db->sql_query($sql); |
|
| 206 | ||
| 207 | if ($this->request->is_ajax()) |
|
| 208 | { |
|
| 209 | trigger_error('DIR_RESET_VOTES_SUCCESS'); |
|
| 210 | } |
|
| 211 | break; |
|
| 212 | ||
| 213 | case 'comments': |
|
| 214 | switch ($this->db->get_sql_layer()) |
|
| @@ 213-235 (lines=23) @@ | ||
| 210 | } |
|
| 211 | break; |
|
| 212 | ||
| 213 | case 'comments': |
|
| 214 | switch ($this->db->get_sql_layer()) |
|
| 215 | { |
|
| 216 | case 'sqlite': |
|
| 217 | case 'firebird': |
|
| 218 | $this->db->sql_query('DELETE FROM ' . $this->comments_table); |
|
| 219 | break; |
|
| 220 | ||
| 221 | default: |
|
| 222 | $this->db->sql_query('TRUNCATE TABLE ' . $this->comments_table); |
|
| 223 | break; |
|
| 224 | } |
|
| 225 | ||
| 226 | $sql = 'UPDATE ' . $this->links_table . ' |
|
| 227 | SET link_comment = 0'; |
|
| 228 | $this->db->sql_query($sql); |
|
| 229 | ||
| 230 | if ($this->request->is_ajax()) |
|
| 231 | { |
|
| 232 | trigger_error('DIR_RESET_COMMENTS_SUCCESS'); |
|
| 233 | } |
|
| 234 | ||
| 235 | break; |
|
| 236 | ||
| 237 | case 'clicks': |
|
| 238 | $sql = 'UPDATE ' . $this->links_table . ' |
|