if ($this->request->is(array('post', 'put'))) { $this->Note->id = $id; $this->request->data['Note']['user_id'] = $this->Session->read('uid'); if ($this->Note->save($this->request->data)) { //Tag system $this->Tag->saveTags($this->request->data['Note']['tags'], $id, 'Note_Note'); // $this->Session->setFlash(__d('Note', 'Your note has been updated.')); return $this->redirect(array('action' => 'index')); } $this->Session->setFlash(__d('Note', 'Unable to update your note.')); } //Tag system $tags = $this->Tag->getContentTags($id, 'Note_Note'); $this->set('tags', $tags); //