mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
trim name and check if not empty in setName()
This commit is contained in:
parent
e36f6ee15c
commit
378377780e
|
@ -91,6 +91,10 @@ class SeedDMS_Core_KeywordCategory {
|
|||
* @return bool
|
||||
*/
|
||||
function setName($newName) {
|
||||
$newName = trim($newName);
|
||||
if(!$newName)
|
||||
return false;
|
||||
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
$queryStr = "UPDATE `tblKeywordCategories` SET `name` = ".$db->qstr($newName)." WHERE `id` = ". $this->_id;
|
||||
|
|
Loading…
Reference in New Issue
Block a user