/** * add note */ function addNote() { global $ilUser, $lng, $ilCtrl; $this->initNoteForm("create", $_GET["note_type"]); //if ($this->form->checkInput()) if ($_POST["note"] != "") { $note = new ilNote(); $note->setObject($this->obj_type, $this->rep_obj_id, $this->obj_id); $note->setInRepository($this->repository_mode); $note->setType($_GET["note_type"]); $note->setAuthor($ilUser->getId()); $note->setText(ilUtil::stripslashes($_POST["note"])); // $note->setSubject($_POST["sub_note"]); // $note->setLabel($_POST["note_label"]); $note->create(); $this->notifyObserver("new", $note); $ilCtrl->setParameter($this, "note_mess", "mod"); // $ilCtrl->redirect($this, "showNotes", "notes_top", $this->ajax); } $ilCtrl->redirect($this, "showNotes", "notes_top", $this->ajax); // $this->note_mess = "frmfld"; // $this->form->setValuesByPost(); // return $this->addNoteForm(false);; }