Beispiel #1
0
 /**
  * @param $id
  * @return bool
  */
 public function deleteBoard($id)
 {
     $threads = new Threads();
     $r = $threads->deleteThreadsByBoardId($id);
     if ($r) {
         return $this->delete($this->getAdapter()->quoteInto("id=?", $id)) > 0;
     }
     return false;
 }
Beispiel #2
0
 /**
  *
  */
 private function editThread()
 {
     $threads = new Threads();
     if (isset($_POST['important']) && UserHelper::isAdmin()) {
         $res = $threads->update(["title" => $_POST['title'], "category" => $_POST['category'], "important" => $_POST['important']], $threads->getAdapter()->quoteInto("id=?", $_POST['thread_id']));
     } else {
         $res = $threads->update(["title" => $_POST['title'], "category" => $_POST['category'], "important" => 0], $threads->getAdapter()->quoteInto("id=?", $_POST['thread_id']));
     }
     $view = new View($res !== false);
     $view->sendResponse();
 }