mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-30 20:51:22 +00:00 
			
		
		
		
	do not used fixed class names for folders and documents anymore
This commit is contained in:
		
							parent
							
								
									ee2bb4ffd2
								
							
						
					
					
						commit
						8ace74ef85
					
				|  | @ -74,13 +74,13 @@ class SeedDMS_Core_Object { /* {{{ */ | ||||||
| 			$db = $this->_dms->getDB(); | 			$db = $this->_dms->getDB(); | ||||||
| 
 | 
 | ||||||
| 			switch(get_class($this)) { | 			switch(get_class($this)) { | ||||||
| 				case "SeedDMS_Core_Document": | 				case $this->_dms->getClassname('document'): | ||||||
| 					$queryStr = "SELECT * FROM tblDocumentAttributes WHERE document = " . $this->_id." ORDER BY `id`"; | 					$queryStr = "SELECT * FROM tblDocumentAttributes WHERE document = " . $this->_id." ORDER BY `id`"; | ||||||
| 					break; | 					break; | ||||||
| 				case "SeedDMS_Core_DocumentContent": | 				case $this->_dms->getClassname('documentcontent'): | ||||||
| 					$queryStr = "SELECT * FROM tblDocumentContentAttributes WHERE content = " . $this->_id." ORDER BY `id`"; | 					$queryStr = "SELECT * FROM tblDocumentContentAttributes WHERE content = " . $this->_id." ORDER BY `id`"; | ||||||
| 					break; | 					break; | ||||||
| 				case "SeedDMS_Core_Folder": | 				case $this->_dms->getClassname('folder'): | ||||||
| 					$queryStr = "SELECT * FROM tblFolderAttributes WHERE folder = " . $this->_id." ORDER BY `id`"; | 					$queryStr = "SELECT * FROM tblFolderAttributes WHERE folder = " . $this->_id." ORDER BY `id`"; | ||||||
| 					break; | 					break; | ||||||
| 				default: | 				default: | ||||||
|  | @ -145,13 +145,13 @@ class SeedDMS_Core_Object { /* {{{ */ | ||||||
| 		} | 		} | ||||||
| 		if(!isset($this->_attributes[$attrdef->getId()])) { | 		if(!isset($this->_attributes[$attrdef->getId()])) { | ||||||
| 			switch(get_class($this)) { | 			switch(get_class($this)) { | ||||||
| 				case "SeedDMS_Core_Document": | 				case $this->_dms->getClassname('document'): | ||||||
| 					$queryStr = "INSERT INTO tblDocumentAttributes (document, attrdef, value) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; | 					$queryStr = "INSERT INTO tblDocumentAttributes (document, attrdef, value) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; | ||||||
| 					break; | 					break; | ||||||
| 				case "SeedDMS_Core_DocumentContent": | 				case $this->_dms->getClassname('documentcontent'): | ||||||
| 					$queryStr = "INSERT INTO tblDocumentContentAttributes (content, attrdef, value) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; | 					$queryStr = "INSERT INTO tblDocumentContentAttributes (content, attrdef, value) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; | ||||||
| 					break; | 					break; | ||||||
| 				case "SeedDMS_Core_Folder": | 				case $this->_dms->getClassname('folder'): | ||||||
| 					$queryStr = "INSERT INTO tblFolderAttributes (folder, attrdef, value) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; | 					$queryStr = "INSERT INTO tblFolderAttributes (folder, attrdef, value) VALUES (".$this->_id.", ".$attrdef->getId().", ".$db->qstr($value).")"; | ||||||
| 					break; | 					break; | ||||||
| 				default: | 				default: | ||||||
|  | @ -184,13 +184,13 @@ class SeedDMS_Core_Object { /* {{{ */ | ||||||
| 		} | 		} | ||||||
| 		if(isset($this->_attributes[$attrdef->getId()])) { | 		if(isset($this->_attributes[$attrdef->getId()])) { | ||||||
| 			switch(get_class($this)) { | 			switch(get_class($this)) { | ||||||
| 				case "SeedDMS_Core_Document": | 				case $this->_dms->getClassname('document'): | ||||||
| 					$queryStr = "DELETE FROM tblDocumentAttributes WHERE document=".$this->_id." AND attrdef=".$attrdef->getId(); | 					$queryStr = "DELETE FROM tblDocumentAttributes WHERE document=".$this->_id." AND attrdef=".$attrdef->getId(); | ||||||
| 					break; | 					break; | ||||||
| 				case "SeedDMS_Core_DocumentContent": | 				case $this->_dms->getClassname('documentcontent'): | ||||||
| 					$queryStr = "DELETE FROM tblDocumentContentAttributes WHERE content=".$this->_id." AND attrdef=".$attrdef->getId(); | 					$queryStr = "DELETE FROM tblDocumentContentAttributes WHERE content=".$this->_id." AND attrdef=".$attrdef->getId(); | ||||||
| 					break; | 					break; | ||||||
| 				case "SeedDMS_Core_Folder": | 				case $this->_dms->getClassname('folder'): | ||||||
| 					$queryStr = "DELETE FROM tblFolderAttributes WHERE folder=".$this->_id." AND attrdef=".$attrdef->getId(); | 					$queryStr = "DELETE FROM tblFolderAttributes WHERE folder=".$this->_id." AND attrdef=".$attrdef->getId(); | ||||||
| 					break; | 					break; | ||||||
| 				default: | 				default: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann