From 1c1e9c704c57feacaec4af8e1ab3d07bd9dd5adc Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 2 Jul 2012 05:43:53 +0000 Subject: added preview in hardware talk pages - lammi87 issue --- h-source/Application/Controllers/GenericController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'h-source/Application/Controllers/GenericController.php') diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php index 0c140b3..656060d 100644 --- a/h-source/Application/Controllers/GenericController.php +++ b/h-source/Application/Controllers/GenericController.php @@ -850,6 +850,18 @@ class GenericController extends BaseController } } + //if preview + if (isset($_POST['previewAction'])) + { + if ($this->s['registered']->status['status'] === 'logged') + { + if (!$this->s['registered']->checkCsrf($clean['token'])) $this->redirect($this->controller.'/catalogue/'.$this->lang,2,'wrong token..'); + + $data['preview_message'] = $this->request->post('message','','sanitizeHtml'); + $this->m['TalkModel']->result = false; + } + } + $data['table'] = $this->m['TalkModel']->select()->where(array('id_hard'=>$clean['id_hard']))->orderBy('id_talk')->send(); $data['values'] = $this->m['TalkModel']->getFormValues('insert','sanitizeHtml'); -- cgit v1.2.3