views can now be updated

This commit is contained in:
Uwe Steinmann 2023-10-11 16:28:49 +02:00
parent d5b5a1cb49
commit aefd3b8807

View File

@ -109,6 +109,10 @@ class SeedDMS_PaperlessView { /* {{{ */
return $this->_view;
} /* }}} */
public function setView($view) { /* {{{ */
$this->_view = $view;
} /* }}} */
/*
* Add a new to the database.
*
@ -122,6 +126,11 @@ class SeedDMS_PaperlessView { /* {{{ */
return false;
}
$this->_id = $db->getInsertID();
} else {
$queryStr = "UPDATE `tblPaperlessView` SET `view`=".$db->qstr(json_encode($this->_view))." WHERE `id`=".$this->_id;
if (!$db->getResult($queryStr)) {
return false;
}
}
return self::getInstance($this->_id, $this->_dms);