aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-07-02 05:43:53 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-07-02 05:43:53 +0000
commit1c1e9c704c57feacaec4af8e1ab3d07bd9dd5adc (patch)
tree9caa2965b22abbe97f1e674a10cb7c27e769a13e /h-source/Application/Controllers
parenta935ddd2093fa73066ae409c35535daa33371b9c (diff)
added preview in hardware talk pages - lammi87 issue
Diffstat (limited to 'h-source/Application/Controllers')
-rw-r--r--h-source/Application/Controllers/GenericController.php12
1 files changed, 12 insertions, 0 deletions
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');