mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +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
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function setName($newName) {
|
function setName($newName) {
|
||||||
|
$newName = trim($newName);
|
||||||
|
if(!$newName)
|
||||||
|
return false;
|
||||||
|
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "UPDATE `tblKeywordCategories` SET `name` = ".$db->qstr($newName)." WHERE `id` = ". $this->_id;
|
$queryStr = "UPDATE `tblKeywordCategories` SET `name` = ".$db->qstr($newName)." WHERE `id` = ". $this->_id;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user