mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	set callback removePreviews() when removing a folder
This commit is contained in:
		
							parent
							
								
									6bf193aa85
								
							
						
					
					
						commit
						3448734024
					
				|  | @ -449,6 +449,16 @@ switch($command) { | |||
| 							'groups'=>array_unique(array_merge($fnl['groups'], $pnl['groups']), SORT_REGULAR) | ||||
| 						); | ||||
| 						$foldername = $folder->getName(); | ||||
| 						function removePreviews($arr, $document) { | ||||
| 							$previewer = $arr[0]; | ||||
| 
 | ||||
| 							$previewer->deleteDocumentPreviews($document); | ||||
| 							return null; | ||||
| 						} | ||||
| 						require_once("SeedDMS/Preview.php"); | ||||
| 						$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir); | ||||
| 						$dms->addCallback('onPreRemoveDocument', 'removePreviews', array($previewer)); | ||||
| 
 | ||||
| 						if($folder->remove()) { | ||||
| 							if ($notifier) { | ||||
| 								$subject = "folder_deleted_email_subject"; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Uwe Steinmann
						Uwe Steinmann