failsafe on note update
This commit is contained in:
@@ -59,7 +59,7 @@ class Note extends PhpObject {
|
|||||||
public function setNote($sNotes) {
|
public function setNote($sNotes) {
|
||||||
$sError = '';
|
$sError = '';
|
||||||
|
|
||||||
if($this->iUserId > 0 && $this->iCourseId > 0) {
|
if($this->iUserId > 0 && $this->iCourseId > 0 && $sNotes!='') {
|
||||||
$asData = array_merge($this->getNoteKeys(), array('notes'=>$sNotes));
|
$asData = array_merge($this->getNoteKeys(), array('notes'=>$sNotes));
|
||||||
$iNoteId = $this->oDb->insertUpdateRow(self::NOTE_TABLE, $asData, array_keys($this->getNoteKeys()));
|
$iNoteId = $this->oDb->insertUpdateRow(self::NOTE_TABLE, $asData, array_keys($this->getNoteKeys()));
|
||||||
if(!$iNoteId) $sError = $this->oDb->getLastError();
|
if(!$iNoteId) $sError = $this->oDb->getLastError();
|
||||||
|
|||||||
Reference in New Issue
Block a user