Browse Source

[svn r18039] FS#2867 - FCKEditor, simple file manager, Image manager: Deleted files and folders must not be shown.

Ivan Tcholakov 16 years ago
parent
commit
d01322c251

+ 9 - 2
main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/commands.php

@@ -36,7 +36,11 @@ function GetFolders( $resourceType, $currentFolder )
 
 	while ( $sFile = readdir( $oCurrentFolder ) )
 	{
-		if ( $sFile != '.' && $sFile != '..' && $sFile != '.thumbs' && $sFile != '.svn' && is_dir( $sServerDir . $sFile ) )
+		if ( $sFile != '.' && $sFile != '..' &&
+			!strpos( $sFile, '_DELETED_' ) &&
+			$sFile != '.thumbs' &&
+			$sFile != '.svn' &&
+			is_dir( $sServerDir . $sFile ) )
 			$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;
 	}
 
@@ -66,7 +70,10 @@ function GetFoldersAndFiles( $resourceType, $currentFolder )
 
 	while ( $sFile = readdir( $oCurrentFolder ) )
 	{
-		if ( $sFile != '.' && $sFile != '..' && $sFile != '.thumbs' && $sFile != '.svn')
+		if ( $sFile != '.' && $sFile != '..' &&
+			!strpos( $sFile, '_DELETED_' ) &&
+			$sFile != '.thumbs' &&
+			$sFile != '.svn')
 		{
 			if ( is_dir( $sServerDir . $sFile ) )
 				$aFolders[] = '<Folder name="' . ConvertToXmlAttribute( $sFile ) . '" />' ;

+ 3 - 2
main/inc/lib/fckeditor/editor/plugins/ImageManager/Classes/ImageManager.php

@@ -113,6 +113,7 @@ class ImageManager
 			// a dot, and if is it not the thumbnail directory
 			if(is_dir($base.$entry) 
 				&& substr($entry,0,1) != '.'
+				&& !strpos( $entry, '_DELETED_')
 				&& $this->isThumbDir($entry) == false) 
 			{
 				$relative = Files::fixPath($path.$entry);
@@ -154,8 +155,8 @@ class ImageManager
 		
 		while (false !== ($entry = $d->read())) 
 		{
-			//not a dot file or directory
-			if(substr($entry,0,1) != '.')
+			if (substr($entry,0,1) != '.' &&     //not a dot file or directory
+				!strpos( $entry, '_DELETED_' ))
 			{
 				if(is_dir($fullpath.$entry)
 					&& $this->isThumbDir($entry) == false)