Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
53 | public function callbackSubmit() |
||
54 | { |
||
55 | // Get values from the submitted form |
||
56 | // |
||
57 | $post = new Post(); |
||
58 | $post->setDB($this->di->get("db")); |
||
59 | $post->posttitle = htmlentities($this->form->value("title")); |
||
60 | $post->posttext = htmlentities($this->form->value("text")); |
||
61 | $post->postname = htmlentities($this->di->get("session")->get("email")); |
||
62 | |||
63 | |||
64 | $post->save(); |
||
65 | |||
66 | $url = $this->di->get("url")->create("comment/viewAllPosts"); |
||
67 | $this->di->get("response")->redirect($url); |
||
68 | return true; |
||
69 | } |
||
70 | } |
||
71 |