[Fusionforge-commits] r11945 - in trunk/src/common/docman: . views

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Fri Jan 7 17:38:20 CET 2011


Author: nerville
Date: 2011-01-07 17:38:20 +0100 (Fri, 07 Jan 2011)
New Revision: 11945

Modified:
   trunk/src/common/docman/DocumentGroup.class.php
   trunk/src/common/docman/views/additem.php
Log:
add skeleton to support rar archive

Modified: trunk/src/common/docman/DocumentGroup.class.php
===================================================================
--- trunk/src/common/docman/DocumentGroup.class.php	2011-01-07 14:34:50 UTC (rev 11944)
+++ trunk/src/common/docman/DocumentGroup.class.php	2011-01-07 16:38:20 UTC (rev 11945)
@@ -216,6 +216,10 @@
 				$returned = $this->__injectZip($uploaded_data);
 				break;
 			}
+			case "application/rar": {
+				$returned = $this->__injectRar($uploaded_data);
+				break;
+			}
 			default: {
 				$this->setError( _('Unsupported injected file:') . ' ' .$uploaded_data_type);
 				$returned = false;
@@ -496,6 +500,17 @@
 	}
 
 	/**
+	 * __injectRar - private method to inject a rar archive tree and files
+	 *
+	 * @param	array	uploaded rar
+	 * @return	boolean	success or not
+	 * @access	private
+	 */
+	private function __injectRar($uploadedRar) {
+		return true;
+	}
+
+	/**
 	 * __injectContent - private method to inject a directory tree and files
 	 *
 	 * @param	string	the directory to inject

Modified: trunk/src/common/docman/views/additem.php
===================================================================
--- trunk/src/common/docman/views/additem.php	2011-01-07 14:34:50 UTC (rev 11944)
+++ trunk/src/common/docman/views/additem.php	2011-01-07 16:38:20 UTC (rev 11945)
@@ -63,7 +63,7 @@
 echo '<input id="buttonDoc" type="radio" name="type" value="document" /><label id="labelDoc" title="'. _('Submit a new document in this directory.').'">'. _('Submit a new document.') .'</label>';
 if (forge_check_perm('docman', $group_id, 'approve')) {
 	echo '<input id="buttonDir" type="radio" name="type" value="directory" /><label id="labelDir" title="'. _('Create a directory based on this name.').'">'. _('Add a new directory.') .'</label>';
-	echo '<input id="buttonZip" type="radio" name="type" value="zip" /><label id="labelZip" title="'. _('Create a full directory tree using an compressed archive. Only zip format support yet').'">'. _('Inject Tree') . '</label>';
+	echo '<input id="buttonZip" type="radio" name="type" value="zip" /><label id="labelZip" title="'. _('Create a full directory tree using an compressed archive. Only zip or rar format support.').'">'. _('Inject Tree') . '</label>';
 }
 echo '<div class="docman_div_include" id="addsubdocgroup" style="display:none;">';
 echo '<h4 class="docman_h4">'. _('Add a new subdirectory') .'</h4>';




More information about the Fusionforge-commits mailing list