mirror of
				https://git.code.sf.net/p/seeddms/code
				synced 2025-10-31 13:18:06 +00:00 
			
		
		
		
	check quota of user
This commit is contained in:
		
							parent
							
								
									95c0573d6f
								
							
						
					
					
						commit
						1fdef8f54b
					
				|  | @ -38,6 +38,11 @@ if ($folder->getAccessMode($user) < M_READWRITE) { | |||
| 	UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("access_denied")); | ||||
| } | ||||
| 
 | ||||
| $remain = checkQuota(); | ||||
| if ($remain < 0) { | ||||
| 	UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))),getMLText("quota_exceeded", array('bytes'=>LetoDMS_Core_File::format_filesize(abs($remain))))); | ||||
| } | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
| $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload, 'dropfolderdir'=>$settings->_dropFolderDir)); | ||||
| if($view) { | ||||
|  |  | |||
|  | @ -38,6 +38,11 @@ if ($document->getAccessMode($user) < M_READWRITE) { | |||
| 	UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied")); | ||||
| } | ||||
| 
 | ||||
| $remain = checkQuota(); | ||||
| if ($remain < 0) { | ||||
| 	UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("quota_exceeded", array('bytes'=>LetoDMS_Core_File::format_filesize(abs($remain))))); | ||||
| } | ||||
| 
 | ||||
| $folder = $document->getFolder(); | ||||
| 
 | ||||
| $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 steinm
						steinm