[Fusionforge-commits] r11920 - trunk/src/common/docman/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Wed Dec 29 19:07:12 CET 2010


Author: nerville
Date: 2010-12-29 19:07:12 +0100 (Wed, 29 Dec 2010)
New Revision: 11920

Modified:
   trunk/src/common/docman/include/utils.php
Log:
cleanup code

Modified: trunk/src/common/docman/include/utils.php
===================================================================
--- trunk/src/common/docman/include/utils.php	2010-12-29 18:01:39 UTC (rev 11919)
+++ trunk/src/common/docman/include/utils.php	2010-12-29 18:07:12 UTC (rev 11920)
@@ -37,53 +37,54 @@
 		case "image/tiff":
 		case "image/vnd.microsoft.icon":
 		case "image/svg+xml": {
-			echo html_image('docman/file_type_image.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_image.png';
 			break;
 		}
 		case "application/pdf": {
-			echo html_image('docman/file_type_pdf.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_pdf.png';
 			break;
 		}
 		case "text/html":
 		case "URL": {
-			echo html_image('docman/file_type_html.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_html.png';
 			break;
 		}
 		case "text/plain":
 		case "text/x-php":
 		case "application/xml":
 		case "text/x-c": {
-			echo html_image('docman/file_type_plain.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_plain.png';
 			break;
 		}
 		case "application/msword":
 		case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
 		case "application/vnd.oasis.opendocument.text": {
-			echo html_image('docman/file_type_writer.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_writer.png';
 			break;
 		}
 		case "application/vnd.ms-excel":
 		case "application/vnd.oasis.opendocument.spreadsheet":
 		case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
-			echo html_image('docman/file_type_spreadsheet.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_spreadsheet.png';
 			break;
 		}
 		case "application/vnd.oasis.opendocument.presentation":
 		case "application/vnd.ms-powerpoint":
 		case "application/vnd.openxmlformats-officedocument.presentationml.presentation": {
-			echo html_image('docman/file_type_presentation.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_presentation.png';
 			break;
 		}
 		case "application/zip":
 		case "application/x-tar":
 		case "application/x-rpm": {
-			echo html_image('docman/file_type_archive.png', '22', '22', array('alt'=>$filetype));
+			$image = 'docman/file_type_archive.png';
 			break;
 		}
 		default: {
-			echo html_image('docman/file_type_unknown.png', '22', '22' , array('alt'=>$filetype));
+			$image = 'docman/file_type_unknown.png';
 		}
 	}
+	echo html_image($image, '22', '22', array('alt'=>$filetype));
 }
 
 function getNameDocGroup($id, $group) {




More information about the Fusionforge-commits mailing list