fix sql error when deleting a folder attribute

This commit is contained in:
Uwe Steinmann 2022-11-07 12:13:15 +01:00
parent 7cba489f1a
commit 239487e198
2 changed files with 3 additions and 2 deletions

View File

@ -247,7 +247,7 @@ class SeedDMS_Core_Attribute { /* {{{ */
break;
case $this->_dms->getClassname('folder'):
if(trim($value) === '')
$queryStr = "DELETE FROM `tblFolderAttributes WHERE` `folder` = " . $this->_obj->getID() . " AND `attrdef` = " . $this->_attrdef->getId();
$queryStr = "DELETE FROM `tblFolderAttributes` WHERE `folder` = " . $this->_obj->getID() . " AND `attrdef` = " . $this->_attrdef->getId();
else
$queryStr = "UPDATE `tblFolderAttributes` SET `value` = ".$db->qstr($value)." WHERE `folder` = " . $this->_obj->getID() . " AND `attrdef` = " . $this->_attrdef->getId();
break;

View File

@ -12,7 +12,7 @@
<email>uwe@steinmann.cx</email>
<active>yes</active>
</lead>
<date>2022-09-24</date>
<date>2022-11-07</date>
<time>13:44:55</time>
<version>
<release>5.1.28</release>
@ -27,6 +27,7 @@
- fix SeedDMS_Core_User::getDocumentContents()
- fix SeedDMS_Core_File::fileExtension()
- SeedDMS_Core_DMS::createPasswordRequest() creates a cryptographically secure hash
- fix sql error when deleting a folder attribute
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">