| @@ 75-85 (lines=11) @@ | ||
| 72 | * |
|
| 73 | * @return boolean true if okey, false if something went wrong. |
|
| 74 | */ |
|
| 75 | public function callbackSubmit() |
|
| 76 | { |
|
| 77 | $comment = new Comment(); |
|
| 78 | $comment->setDb($this->di->get("db")); |
|
| 79 | $comment->find("id", $this->form->value("id")); |
|
| 80 | $comment->content = $this->form->value("content"); |
|
| 81 | $comment->save(); |
|
| 82 | ||
| 83 | // Redirect to profile page |
|
| 84 | $this->di->get("response")->redirect("comment"); |
|
| 85 | } |
|
| 86 | } |
|
| 87 | ||
| @@ 82-92 (lines=11) @@ | ||
| 79 | * |
|
| 80 | * @return boolean true if okey, false if something went wrong. |
|
| 81 | */ |
|
| 82 | public function callbackSubmit() |
|
| 83 | { |
|
| 84 | $user = new User(); |
|
| 85 | $user->setDb($this->di->get("db")); |
|
| 86 | $user->find("id", $this->form->value("id")); |
|
| 87 | $user->email = $this->form->value("email"); |
|
| 88 | $user->save(); |
|
| 89 | ||
| 90 | // Redirect to profile page |
|
| 91 | $this->di->get("response")->redirect("user/profile/" . $user->id); |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||