mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 05:11:27 +00:00 
			
		
		
		
	- attributes can be edited
This commit is contained in:
		
							parent
							
								
									2a63e2132f
								
							
						
					
					
						commit
						4e163c4a2b
					
				|  | @ -49,6 +49,7 @@ $sequence = $_POST["sequence"]; | |||
| if (!is_numeric($sequence)) { | ||||
| 	$sequence = "keep"; | ||||
| } | ||||
| $attributes = $_POST["attributes"]; | ||||
| 
 | ||||
| $wasupdated = false; | ||||
| if(($oldname = $folder->getName()) != $name) { | ||||
|  | @ -102,6 +103,17 @@ if(($oldcomment = $folder->getComment()) != $comment) { | |||
| 		UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured"));	 | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| if($attributes) { | ||||
| 	$oldattributes = $folder->getAttributes(); | ||||
| 	foreach($attributes as $attrdefid=>$attribute) { | ||||
| 		if(!isset($oldattributes[$attrdefid]) || $attribute != $oldattributes[$attrdefid]->getValue()) { | ||||
| 			if(!$folder->setAttributeValue($dms->getAttributeDefinition($attrdefid), $attribute)) | ||||
| 				UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("error_occured")); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| if(strcasecmp($sequence, "keep")) { | ||||
| 	if($folder->setSequence($sequence)) { | ||||
| 	} else { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 steinm
						steinm