| @@ 372-386 (lines=15) @@ | ||
| 369 | ||
| 370 | $this->template->assign('comment_errors', validation_errors()); |
|
| 371 | } else { |
|
| 372 | if ($this->dx_auth->is_logged_in() == FALSE) { |
|
| 373 | ($hook = get_hook('comments_author_not_logged')) ? eval($hook) : NULL; |
|
| 374 | ||
| 375 | $comment_author = trim(htmlspecialchars($this->input->post('comment_author'))); |
|
| 376 | $comment_email = trim(htmlspecialchars($this->input->post('comment_email'))); |
|
| 377 | ||
| 378 | // Write on cookie nickname and email |
|
| 379 | $this->_write_cookie($comment_author, $comment_email, $this->input->post('comment_site')); |
|
| 380 | } else { |
|
| 381 | ($hook = get_hook('comments_author_logged')) ? eval($hook) : NULL; |
|
| 382 | ||
| 383 | $user = $this->db->get_where('users', ['id' => $this->dx_auth->get_user_id()])->row_array(); |
|
| 384 | $comment_author = $user['username']; |
|
| 385 | $comment_email = $user['email']; |
|
| 386 | } |
|
| 387 | ||
| 388 | $comment_text = trim(htmlspecialchars($this->input->post('comment_text'))); |
|
| 389 | $comment_text = str_replace("\n", '<br/>', $comment_text); |
|
| @@ 485-499 (lines=15) @@ | ||
| 482 | //$this->core->error( validation_errors() ); |
|
| 483 | // $this->template->assign('comment_errors', validation_errors()); |
|
| 484 | } else { |
|
| 485 | if ($this->dx_auth->is_logged_in() == FALSE) { |
|
| 486 | ($hook = get_hook('comments_author_not_logged')) ? eval($hook) : NULL; |
|
| 487 | ||
| 488 | $comment_author = trim(htmlspecialchars($this->input->post('comment_author'))); |
|
| 489 | $comment_email = trim(htmlspecialchars($this->input->post('comment_email'))); |
|
| 490 | ||
| 491 | // Write on cookie nickname and email |
|
| 492 | $this->_write_cookie($comment_author, $comment_email, $this->input->post('comment_site')); |
|
| 493 | } else { |
|
| 494 | ($hook = get_hook('comments_author_logged')) ? eval($hook) : NULL; |
|
| 495 | ||
| 496 | $user = $this->db->get_where('users', ['id' => $this->dx_auth->get_user_id()])->row_array(); |
|
| 497 | $comment_author = $user['username']; |
|
| 498 | $comment_email = $user['email']; |
|
| 499 | } |
|
| 500 | ||
| 501 | $comment_text = trim(htmlspecialchars($this->input->post('comment_text'))); |
|
| 502 | $comment_text = str_replace("\n", '<br/>', $comment_text); |
|