Exemple #1
0
 public function dealThreadEditPost()
 {
     $threadModel = new ThreadModel();
     if ($_POST && strlen($_POST["threadid"]) > 0 && strlen($_POST["title"]) > 0 && strlen($_POST["content"]) > 0) {
         $data = array();
         $data["id"] = $_POST["threadid"];
         $data["modifydate"] = time();
         $data["title"] = $_POST["title"];
         $data["content"] = $_POST["content"];
         $data["tags"] = $_POST["tags"];
         $threadModel->tagChange($data["tags"], $data["id"]);
         $threadModel->updateThread($data);
         header("location: /thread/show/{$data['id']}/");
         die;
     }
 }