MDL-37411 Note Module: additional patch to fixed undefined property for stable branches

This commit is contained in:
Rossiani Wijaya
2013-03-07 11:09:17 +08:00
committed by Aparup Banerjee
parent 38fd297dc7
commit 646059869e
+2 -1
View File
@@ -100,10 +100,11 @@ function note_save(&$note) {
// insert new note
$note->created = $note->lastmodified;
$id = $DB->insert_record('post', $note);
$note = $DB->get_record('post', array('id'=>$id));
$note = note_load($id);
} else {
// update old note
$DB->update_record('post', $note);
$note = note_load($note->id);
}
unset($note->module);
return true;