failsafe on note update
This commit is contained in:
1 parent
d4b274c685
commit
5eb1198409
1 file changed
+1
-1
+1
-1
@@ -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