trim name in setName()

This commit is contained in:
Uwe Steinmann 2021-09-27 10:09:42 +02:00
parent 7a5123aa6c
commit 3101d6d952

View File

@ -162,6 +162,10 @@ class SeedDMS_Core_Group { /* {{{ */
* @return bool
*/
function setName($newName) { /* {{{ */
$newName = trim($newName);
if(!$newName)
return false;
$db = $this->_dms->getDB();
$queryStr = "UPDATE `tblGroups` SET `name` = ".$db->qstr($newName)." WHERE `id` = " . $this->_id;