mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-30 20:51:22 +00:00 
			
		
		
		
	trim name passed to addDocumentCategory() and check if != ''
This commit is contained in:
		
							parent
							
								
									3ed0854e13
								
							
						
					
					
						commit
						59c16b3ce4
					
				|  | @ -2431,10 +2431,12 @@ class SeedDMS_Core_DMS { | |||
| 	} /* }}} */ | ||||
| 
 | ||||
| 	function addDocumentCategory($name) { /* {{{ */ | ||||
| 		if (is_object($this->getDocumentCategoryByName($name))) { | ||||
| 		if(!trim($name)) | ||||
| 			return false; | ||||
| 		if (is_object($this->getDocumentCategoryByName(trim($name)))) { | ||||
| 			return false; | ||||
| 		} | ||||
| 		$queryStr = "INSERT INTO `tblCategory` (`name`) VALUES (".$this->db->qstr($name).")"; | ||||
| 		$queryStr = "INSERT INTO `tblCategory` (`name`) VALUES (".$this->db->qstr(trim($name)).")"; | ||||
| 		if (!$this->db->getResult($queryStr)) | ||||
| 			return false; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann