[Fusionforge-commits] r11562 - in trunk/src/common/docman: include views

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Thu Nov 18 15:14:37 CET 2010


Author: nerville
Date: 2010-11-18 15:14:37 +0100 (Thu, 18 Nov 2010)
New Revision: 11562

Modified:
   trunk/src/common/docman/include/webdav.php
   trunk/src/common/docman/views/addfile.php
   trunk/src/common/docman/views/addsubdocgroup.php
   trunk/src/common/docman/views/admin.php
   trunk/src/common/docman/views/editdocgroup.php
   trunk/src/common/docman/views/editfile.php
   trunk/src/common/docman/views/help.php
   trunk/src/common/docman/views/listfile.php
   trunk/src/common/docman/views/listpendingfile.php
   trunk/src/common/docman/views/listtrashfile.php
   trunk/src/common/docman/views/menu.php
   trunk/src/common/docman/views/search.php
   trunk/src/common/docman/views/tree.php
   trunk/src/common/docman/views/views.php
Log:
cleanup & minor fix

Modified: trunk/src/common/docman/include/webdav.php
===================================================================
--- trunk/src/common/docman/include/webdav.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/include/webdav.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -1,9 +1,9 @@
 <?php
-
 /**
  * FusionForge Documentation Manager
  *
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *

Modified: trunk/src/common/docman/views/addfile.php
===================================================================
--- trunk/src/common/docman/views/addfile.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/addfile.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -5,6 +5,7 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -31,11 +32,12 @@
 global $dgh; // document group html object
 global $gdf; // document grou factory object
 
+echo '<div class="docmanDivIncluded">';
 if ( $dgf->getNested() == NULL ) {
-	echo '<div class="docmanDivIncluded">';
 	echo '<div class="warning">'. _('You MUST first create at least one directory to store your document.') .'</p></div>';
 } else {
 	/* display the add new documentation form */
+	/* @todo - use jquery and javascript controler */
 ?>
 	<script type="text/javascript" >
 	function displayRowFile() {
@@ -52,13 +54,12 @@
 	}
 	function displayRowEditor() {
 		document.getElementById('filerow').style.display = 'none';
-	document.getElementById('urlrow').style.display = 'none';
+		document.getElementById('urlrow').style.display = 'none';
 		document.getElementById('editrow').style.display = '';
 		document.getElementById('editnamerow').style.display = '';
 	}
 	</script>
 <?php
-	echo '<div class="docmanDivIncluded">';
 	echo '<p><strong>'. _('Document Title:') .'</strong> '. _('Refers to the relatively brief title of the document (e.g. How to use the download server).'). '</p>';
 	echo '<p><strong>'. _('Description:') .'</strong> '. _('A brief description to be placed just under the title.') .'</p>';
 
@@ -78,39 +79,39 @@
 				<tr>
 					<td style="text-align:right;">
 						<strong>'. _('Description') .'</strong>'.utils_requiredField()
-                	.'</td><td>'
-                    	.'&nbsp;<input type="text" name="description" size="50" maxlength="255" />&nbsp;'
-                    	.sprintf(_('(at least %1$s characters)'), 10)
+				 	.'</td><td>'
+						.'&nbsp;<input type="text" name="description" size="50" maxlength="255" />&nbsp;'
+						.sprintf(_('(at least %1$s characters)'), 10)
 					.'</td>
 				</tr>
 				<tr>
 					<td style="text-align:right;">
 						<strong>'. _('Type of Document') .'</strong>'.utils_requiredField()
-                	.'</td><td>
+					.'</td><td>
 					<input type="radio" name="type" value="httpupload" onClick="javascript:displayRowFile()" />'. _('File') .'<input type="radio" name="type" value="pasteurl" onClick="javascript:displayRowUrl()" />'. _('URL');
-	if ($g->useCreateOnline()) {
-   		echo '<input type="radio" name="type" value="editor" onClick="javascript:displayRowEditor()" />'. _('Create online');
-	}
-	echo '			</td>
+			if ($g->useCreateOnline()) {
+				echo '<input type="radio" name="type" value="editor" onClick="javascript:displayRowEditor()" />'. _('Create online');
+			}
+			echo '		</td>
 				</tr>
 				<tr id="filerow" style="display:none">
 					<td style="text-align:right;">
 						<strong>'. _('Upload File') .'</strong>'. utils_requiredField()
-                	.'</td><td>'
+					.'</td><td>'
 						.'&nbsp;<input type="file" name="uploaded_data" size="30" />
 					</td>
 				</tr>
 				<tr id="urlrow" style="display:none">
 					<td style="text-align:right;">
 						<strong>'. _('URL') .'</strong>'. utils_requiredField()
-                	.'</td><td>'
+					.'</td><td>'
 						.'&nbsp;<input type="text" name="file_url" size="30" />
 					</td>
 				</tr>
 				<tr id="editnamerow" style="display:none">
 					<td style="text-align:right;">
 						<strong>'. _('File Name') .'</strong>'. utils_requiredField()
-                	.'</td><td>'
+					.'</td><td>'
 						.'&nbsp;<input type="text" name="name" size="30" />
 					</td>
 				</tr>
@@ -126,8 +127,8 @@
 	$params['group'] = $group_id;
 	plugin_hook("text_editor",$params);
 	if (!$GLOBALS['editor_was_set_up']) {
-		    echo '<textarea name="details" rows="5" cols="80"></textarea>';
-}
+		echo '<textarea name="details" rows="5" cols="80"></textarea>';
+	}
 	unset($GLOBALS['editor_was_set_up']);
 	echo '
 					</td>
@@ -139,17 +140,17 @@
 				<tr>
 					<td>
 						<strong>'. _('Directory that document belongs in').'</strong>
-                	</td><td>';
+					</td><td>';
 		$dgh->showSelectNestedGroups($dgf->getNested(), 'doc_group', false, $dirid);
 		echo '
 					</td>
 				</tr>';
 	}
-	echo '  </table>';
-	echo utils_requiredField() . ' '. _('Mandatory field');
-	echo '  <div class="docmanSubmitDiv">
-		    	<input type="submit" name="submit" value="'. _('Submit Information').' " />
-        	</div>
+	echo '	</table>';
+	echo utils_requiredField() .' '. _('Mandatory field');
+	echo '	<div class="docmanSubmitDiv">
+			<input type="submit" name="submit" value="'. _('Submit Information'). '" />
+		</div>
 		</form>';
 }
 

Modified: trunk/src/common/docman/views/addsubdocgroup.php
===================================================================
--- trunk/src/common/docman/views/addsubdocgroup.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/addsubdocgroup.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -5,6 +5,7 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *

Modified: trunk/src/common/docman/views/admin.php
===================================================================
--- trunk/src/common/docman/views/admin.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/admin.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -1,11 +1,11 @@
 <?php
-
 /**
  * FusionForge Documentation Manager
  *
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -39,12 +39,12 @@
 <div id="principalAdminDiv" class="docmanDivIncluded">
 <script type="text/javascript">
 function displayAdminDiv(id) {
-    var mainDiv = document.getElementById('principalAdminDiv');
-    for (var i = 0; i < mainDiv.childNodes.length; i++) {
-        if ('DIV' == mainDiv.childNodes[i].nodeName.toUpperCase() && id != mainDiv.childNodes[i].id) {
-            mainDiv.childNodes[i].style.display = 'none';
-        }
-    }
+	var mainDiv = document.getElementById('principalAdminDiv');
+	for (var i = 0; i < mainDiv.childNodes.length; i++) {
+		if ('DIV' == mainDiv.childNodes[i].nodeName.toUpperCase() && id != mainDiv.childNodes[i].id) {
+			mainDiv.childNodes[i].style.display = 'none';
+		}
+	}
 	if ( 'none' == document.getElementById(id).style.display ) {
 		document.getElementById(id).style.display = 'block';
 	} else {

Modified: trunk/src/common/docman/views/editdocgroup.php
===================================================================
--- trunk/src/common/docman/views/editdocgroup.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/editdocgroup.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -6,6 +6,7 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -33,32 +34,32 @@
 global $dgh; // document directory html
 
 if (forge_check_perm ('docman', $group_id, 'approve')) {
-	$dg = new DocumentGroup($g,$dirid);
+	$dg = new DocumentGroup($g, $dirid);
 	if ($dg->isError())
-        session_redirect('/docman/?group_id='.$group_id.'&error_msg='.urlencode($dg->getErrorMessage()));
+		session_redirect('/docman/?group_id='.$group_id.'&error_msg='.urlencode($dg->getErrorMessage()));
 
 ?>
 <div class="docmanDivIncluded">
-<form name="editgroup" action="?group_id=<?php echo $group_id; ?>&action=editdocgroup" method="post">
-<input type="hidden" name="dirid" value="<?php echo $dirid; ?>" />
-<table>
-<tr>
-<th><?php echo _('Directory Name') ?></th>
-<td><input type="text" name="groupname" value="<?php echo $dg->getName(); ?>" /></td>
-<td>&nbsp;</td>
-<th><?php echo _('belongs to') ?></th>
-<td>
+	<form name="editgroup" action="?group_id=<?php echo $group_id; ?>&action=editdocgroup" method="post">
+		<input type="hidden" name="dirid" value="<?php echo $dirid; ?>" />
+		<table>
+			<tr>
+				<td><?php echo _('Directory Name') ?></td>
+				<td><input type="text" name="groupname" value="<?php echo $dg->getName(); ?>" /></td>
+				<td>&nbsp;</td>
+				<td><?php echo _('belongs to') ?></td>
+				<td>
 <?php
-	$dgh->showSelectNestedGroups($dgf->getNested(), "parent_dirid", true, $dg->getParentId(), array($dg->getID()));
+			$dgh->showSelectNestedGroups($dgf->getNested(), "parent_dirid", true, $dg->getParentId(), array($dg->getID()));
 ?>
-</td>
-<td><input type="submit" value="<?php echo _('Edit') ?>" name="submit" /></td>
-</tr>
-</table>
-<p>
-<?php echo _('Directory name will be used as a title, so it should be formatted correspondingly.') ?>
-</p>
-</form>
+				</td>
+				<td><input type="submit" value="<?php echo _('Edit') ?>" name="submit" /></td>
+			</tr>
+		</table>
+		<p>
+		<?php echo _('Directory name will be used as a title, so it should be formatted correspondingly.') ?>
+		</p>
+	</form>
 </div>
 <?php
 }

Modified: trunk/src/common/docman/views/editfile.php
===================================================================
--- trunk/src/common/docman/views/editfile.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/editfile.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -65,101 +65,93 @@
 		<td>
 			<strong><?php echo _('Document Title:') ?> </strong><?php echo utils_requiredField(); ?> <?php printf(_('(at least %1$s characters)'), 5) ?><br />
 			<input type="text" name="title" size="40" maxlength="255" value="<?php echo $d->getName(); ?>" />
-			<br />
 		</td>
 	</tr>
 
-    <tr>
-        <td>
-        <strong><?php echo _('Description:') ?> </strong><?php echo utils_requiredField(); ?> <?php printf(_('(at least %1$s characters)'), 10) ?><br />
-        <input type="text" name="description" size="50" maxlength="255" value="<?php echo $d->getDescription(); ?>" />
-        <br /></td>
-    </tr>
+	<tr>
+		<td>
+			<strong><?php echo _('Description:') ?> </strong><?php echo utils_requiredField(); ?> <?php printf(_('(at least %1$s characters)'), 10) ?><br />
+			<input type="text" name="description" size="50" maxlength="255" value="<?php echo $d->getDescription(); ?>" />
+		</td>
+	</tr>
 
-    <tr>
-        <td>
-        <strong><?php echo _('File')?></strong><?php echo utils_requiredField(); ?><br />
-        <?php if ($d->isURL()) {
-            echo '<a href="'.inputSpecialchars($d->getFileName()).'">['. _('View File URL') .']</a>';
-        } else { ?>
-        <a target="_blank" href="../view.php/<?php echo $group_id.'/'.$d->getID().'/'.urlencode($d->getFileName()) ?>"><?php echo $d->getFileName(); ?></a>
-        <?php } ?>
-        </td>
-    </tr>
+	<tr>
+		<td>
+			<strong><?php echo _('File')?></strong><?php echo utils_requiredField(); ?><br />
+			<?php if ($d->isURL()) {
+				echo '<a href="'.inputSpecialchars($d->getFileName()).'">['. _('View File URL') .']</a>';
+				} else { ?>
+			<a target="_blank" href="view.php/<?php echo $group_id.'/'.$d->getID().'/'.urlencode($d->getFileName()) ?>"><?php echo $d->getFileName(); ?></a>
+			<?php } ?>
+		</td>
+	</tr>
 
 <?php
 
-    if ((!$d->isURL()) && ($d->isText())) {
+	if ((!$d->isURL()) && ($d->isText())) {
 		if ($g->useCreateOnline()) {
-        	echo '<tr>
-	                <td>';
+			echo '<tr>
+				<td>';
 			echo _('Edit the contents to your desire or leave them as they are to remain unmodified.');
 			switch ($d->getFileType()) {
-			case "text/html":
-				$GLOBALS['editor_was_set_up']=false;
-				$params = array() ;
-				/* name must be != data then nothing is displayed */
-				$params['name'] = 'details'.$d->getID();
-				$params['width'] = "800";
-				$params['height'] = "300";
-				$params['group'] = $group_id;
-				$params['body'] = $d->getFileData();
-				plugin_hook("text_editor",$params);
-				if (!$GLOBALS['editor_was_set_up']) {
+				case "text/html": {
+					$GLOBALS['editor_was_set_up']=false;
+					$params = array() ;
+					/* name must be != data then nothing is displayed */
+					$params['name'] = 'details'.$d->getID();
+					$params['width'] = "800";
+					$params['height'] = "300";
+					$params['group'] = $group_id;
+					$params['body'] = $d->getFileData();
+					plugin_hook("text_editor",$params);
+					if (!$GLOBALS['editor_was_set_up']) {
+						echo '<textarea name="details'.$d->getID().'" rows="15" cols="70" wrap="soft">'. $d->getFileData() .'</textarea><br />';
+					}
+					unset($GLOBALS['editor_was_set_up']);
+					echo '<input type="hidden" name="filetype" value="text/html">';
+					break;
+				}
+				default: {
 					echo '<textarea name="details'.$d->getID().'" rows="15" cols="70" wrap="soft">'. $d->getFileData() .'</textarea><br />';
+					echo '<input type="hidden" name="filetype" value="text/plain">';
 				}
-				unset($GLOBALS['editor_was_set_up']);
-				echo '<input type="hidden" name="filetype" value="text/html">';
-				break;
-			default:
-				echo '<textarea name="details'.$d->getID().'" rows="15" cols="70" wrap="soft">'. $d->getFileData() .'</textarea><br />';
-				echo '<input type="hidden" name="filetype" value="text/plain">';
 			}
 			echo '	</td>
-		    	</tr>';
+			</tr>';
 		}
 	}
 ?>
-    <tr>
-        <td>
-        <strong><?php echo _('Directory that document belongs in') ?></strong><br />
-        <?php
+	<tr>
+		<td>
+			<strong><?php echo _('Directory that document belongs in') ?></strong><br />
+			<?php
 				$dgh->showSelectNestedGroups($dgf->getNested(), 'doc_group', false, $d->getDocGroupID());
 
-	     ?></td>
-    </tr>
-    <tr>
-        <td>
-        <br /><strong><?php echo _('State') ?>:</strong><br />
-        <?php
-		     doc_get_state_box($d->getStateID());
-        ?></td>
-    </tr>
-    <tr>
-        <td>
-        <?php if ($d->isURL()) { ?>
-        <strong><?php echo _('Specify an outside URL where the file will be referenced') ?> :</strong><?php echo utils_requiredField(); ?><br />
-        <input type="text" name="file_url" size="50" value="<?php echo $d->getFileName() ?>" />
-        <?php } else { ?>
-        <strong><?php echo _('OPTIONAL: Upload new file') ?></strong><br />
-        <input type="file" name="uploaded_data" size="30" /><br/><br />
-            <?php
-            	if (forge_get_config('use_ftp_uploads')) {
-                	echo '<strong>' ;
-                	printf(_('OR choose one form FTP %1$s.'), forge_get_config('ftp_upload_host'));
-                	echo '</strong><br />' ;
-                	$ftp_files_arr=array_merge($arr,ls($upload_dir,true));
-                	echo html_build_select_box_from_arrays($ftp_files_arr,$ftp_files_arr,'ftp_filename','');
-                	echo '<br /><br />';
-            	}
-			}
-	        ?>
-        </td>
-    </tr>
-    </table>
-    <input type="hidden" name="docid" value="<?php echo $d->getID(); ?>" />
-    <input type="button" id="submiteditdata<?php echo $d->getID(); ?>" value="<?php echo _('Submit Edit') ?>" onclick="javascript:doItEditData<?php echo $d->getID(); ?>()" /><br /><br />
-    </form>
+		?></td>
+	</tr>
+	<tr>
+		<td>
+			<strong><?php echo _('State') ?>:</strong><br />
+			<?php doc_get_state_box($d->getStateID()); ?>
+		</td>
+	</tr>
+	<tr>
+		<td>
+		<?php if ($d->isURL()) { ?>
+		<strong><?php echo _('Specify an outside URL where the file will be referenced') ?> :</strong><?php echo utils_requiredField(); ?><br />
+		<input type="text" name="file_url" size="50" value="<?php echo $d->getFileName() ?>" />
+		<?php } else { ?>
+		<strong><?php echo _('OPTIONAL: Upload new file') ?></strong><br />
+		<input type="file" name="uploaded_data" size="30" />
+		<?php
+		}
+		?>
+		</td>
+	</tr>
+</table>
+<input type="hidden" name="docid" value="<?php echo $d->getID(); ?>" />
+<input type="button" id="submiteditdata<?php echo $d->getID(); ?>" value="<?php echo _('Submit Edit') ?>" onclick="javascript:doItEditData<?php echo $d->getID(); ?>()" />
+</form>
 </div>
 <?php
 }

Modified: trunk/src/common/docman/views/help.php
===================================================================
--- trunk/src/common/docman/views/help.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/help.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -22,6 +22,11 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+/* please do not add require here : use www/docman/index.php to add require */
+/* global variables used */
+global $group_id; // id of the group
+global $g; //id of the doc_group
+
 echo '<div class="docmanDivIncluded">';
 plugin_hook ("blocks", "doc help");
 if ($g->useWebdav()) {

Modified: trunk/src/common/docman/views/listfile.php
===================================================================
--- trunk/src/common/docman/views/listfile.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/listfile.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -34,7 +34,7 @@
 global $HTML; // Layout object
 global $LUSER; // User object
 
-$DocGroupName = getNameDocGroup($dirid,$group_id);
+$DocGroupName = getNameDocGroup($dirid, $group_id);
 if (!$DocGroupName) {
 	session_redirect('/docman/?group_id='.$group_id.'&error_msg='.urlencode($g->getErrorMessage()));
 }
@@ -104,22 +104,24 @@
 echo '</div>';
 
 if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
-	$tabletop = array('','Filename','Title','Description','Author','Last time','Status','Size');
-	$classth = array('unsortable','','','','','','','');
+	$tabletop = array('', 'Filename', 'Title', 'Description', 'Author', 'Last time', 'Status', 'Size');
+	$classth = array('unsortable', '', '', '', '', '', '', '');
 	if (forge_check_perm ('docman', $group_id, 'approve'))
 		$tabletop[] = 'Actions';
 		$classth[] = 'unsortable';
 	echo '<div class="docmanDiv">';
-	echo $HTML->listTableTop($tabletop,false,'sortable_docman_listfile','sortable',$classth);
+	echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
 	$time_new = 604800;
 	foreach ($nested_docs[$dirid] as $d) {
 		echo '<tr>';
 		switch ($d->getFileType()) {
-			case "URL":
+			case "URL": {
 				$docurl = $d->getFileName();
 				break;
-			default:
+			}
+			default: {
 				$docurl = util_make_url('/docman/view.php/'.$group_id.'/'.$d->getID().'/'.urlencode($d->getFileName()));
+			}
 		}
 		echo '<td><a href="'.$docurl.'" class="docman-viewfile" title="'._('View this document').'" >';
 		switch ($d->getFileType()) {
@@ -128,70 +130,80 @@
 			case "image/gif":
 			case "image/tiff":
 			case "image/vnd.microsoft.icon":
-			case "image/svg+xml":
-				echo html_image('docman/file_type_image.png',22,22,array('alt'=>$d->getFileType()));
+			case "image/svg+xml": {
+				echo html_image('docman/file_type_image.png', '22', '22', array('alt'=>$d->getFileType()));
 				break;
-			case "application/pdf":
-				echo html_image('docman/file_type_pdf.png',22,22,array('alt'=>$d->getFileType()));
+			}
+			case "application/pdf": {
+				echo html_image('docman/file_type_pdf.png', '22', '22', array('alt'=>$d->getFileType()));
 				break;
+			}
 			case "text/html":
-			case "URL":
-				echo html_image('docman/file_type_html.png',22,22,array('alt'=>$d->getFileType()));
+			case "URL": {
+				echo html_image('docman/file_type_html.png', '22', '22', array('alt'=>$d->getFileType()));
 				break;
-			case "text/plain":
-				echo html_image('docman/file_type_plain.png',22,22,array('alt'=>$d->getFileType()));
+			}
+			case "text/plain": {
+				echo html_image('docman/file_type_plain.png', '22', '22', array('alt'=>$d->getFileType()));
 				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'=>$d->getFileType()));
+			case "application/vnd.oasis.opendocument.text": {
+				echo html_image('docman/file_type_writer.png', '22', '22', array('alt'=>$d->getFileType()));
 				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'=>$d->getFileType()));
+			case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
+				echo html_image('docman/file_type_spreadsheet.png', '22', '22', array('alt'=>$d->getFileType()));
 				break;
+			}
 			case "application/vnd.oasis.opendocument.presentation":
-			case "application/vnd.ms-powerpoint":
-				echo html_image('docman/file_type_presentation.png',22,22,array('alt'=>$d->getFileType()));
+			case "application/vnd.ms-powerpoint": {
+				echo html_image('docman/file_type_presentation.png', '22', '22', array('alt'=>$d->getFileType()));
 				break;
+			}
 			case "application/zip":
 			case "application/x-tar":
-			case "application/x-rpm":
-				echo html_image('docman/file_type_archive.png',22,22,array('alt'=>$d->getFileType()));
+			case "application/x-rpm": {
+				echo html_image('docman/file_type_archive.png', '22', '22', array('alt'=>$d->getFileType()));
 				break;
-			default:
-				echo html_image('docman/file_type_unknown.png',22,22,array('alt'=>$d->getFileType()));
+			}
+			default: {
+				echo html_image('docman/file_type_unknown.png', '22', '22' , array('alt'=>$d->getFileType()));
+			}
 		}
 		echo '</a></td>';
 		echo '<td>';
 		if (($d->getUpdated() && $time_new > (time() - $d->getUpdated())) || $time_new > (time() - $d->getCreated())) {
-			echo html_image('docman/new.png',14,14,array('alt'=>'new'));
+			echo html_image('docman/new.png', '14', '14', array('alt'=>'new'));
 		}
 		echo '&nbsp;'.$d->getFileName();
 		echo '</td>';
 		echo '<td>'.$d->getName().'</td>';
 		echo '<td>'.$d->getDescription().'</td>';
-		echo '<td>'.make_user_link($d->getCreatorUserName(),$d->getCreatorRealName()).'</td>';
+		echo '<td>'.make_user_link($d->getCreatorUserName(), $d->getCreatorRealName()).'</td>';
 		echo '<td>';
 		if ( $d->getUpdated() ) {
-			echo date(_('Y-m-d H:i'),$d->getUpdated());
+			echo date(_('Y-m-d H:i'), $d->getUpdated());
 		} else {
-			echo date(_('Y-m-d H:i'),$d->getCreated());
+			echo date(_('Y-m-d H:i'), $d->getCreated());
 		}
 		echo '</td>';
 		echo '<td>';
 		if ($d->getReserved()) {
-			echo html_image('docman/document-reserved.png',22,22,array('alt'=>_('Reserved Document'),'title'=>_('Reserved Document'),'class'=>'docman-reserveddocument'));
+			echo html_image('docman/document-reserved.png', '22', '22', array('alt'=>_('Reserved Document'),'title'=>_('Reserved Document'),'class'=>'docman-reserveddocument'));
 		} else {
 			echo $d->getStateName().'</td>';
 		}
 		echo '<td>';
 		switch ($d->getFileType()) {
-			case "URL":
+			case "URL": {
 				echo "--";
 				break;
-			default:
+			}
+			default: {
 				$metric = 'B';
 				$size = $d->getFileSize();
 				if ($size > 1024 ) {
@@ -204,40 +216,41 @@
 				}
 				echo $size . $metric;
 				echo '</td>';
+			}
 		}
 
-		if (forge_check_perm ('docman', $group_id, 'approve')) {
+		if (forge_check_perm('docman', $group_id, 'approve')) {
 			echo '<td>';
 			/* should we steal the lock on file ? */
 			if ($d->getLocked()) {
-			if ($d->getLockedBy() == $LUSER->getID()) {
-				$d->setLock(0);
-				/* if you change the 60000 value above, please update here too */
-			} elseif ((time() - $d->getLockdate()) > 600) {
-				$d->setLock(0);
+				if ($d->getLockedBy() == $LUSER->getID()) {
+					$d->setLock(0);
+					/* if you change the 60000 value above, please update here too */
+				} elseif ((time() - $d->getLockdate()) > 600) {
+					$d->setLock(0);
+				}
 			}
-		}
-		if (!$d->getLocked() && !$d->getReserved()) {
-			echo '<a href="?group_id='.$group_id.'&action=trashfile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-movetotrash" title="'. _('Move this document to trash') .'" >'.html_image('docman/trash-empty.png',22,22,array('alt'=>_('Move to trash this document'))). '</a>';
-			echo '<a href="#" onclick="javascript:controller.toggleEditFileView(\''.$d->getID().'\')" class="docman-editfile" title="'. _('Edit this document') .'" >'.html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))). '</a>';
-			echo '<a href="?group_id='.$group_id.'&action=reservefile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-reservefile" title="'. _('Reserve this document for later edition') .'" >'.html_image('docman/reserve-document.png',22,22,array('alt'=>_('Reserve this document'))). '</a>';
-		} else {
-			if ($d->getReservedBy() != $LUSER->getID()) {
-				if (forge_check_perm ('docman', $group_id, 'admin')) {
-					echo '<a href="?group_id='.$group_id.'&action=enforcereserve&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-enforcereservation" title="'. _('Enforce reservation') .'" >'.html_image('docman/enforce-document.png',22,22,array('alt'=>_('Enforce reservation')));
-				}
-			} else {
+			if (!$d->getLocked() && !$d->getReserved()) {
 				echo '<a href="?group_id='.$group_id.'&action=trashfile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-movetotrash" title="'. _('Move this document to trash') .'" >'.html_image('docman/trash-empty.png',22,22,array('alt'=>_('Move to trash this document'))). '</a>';
 				echo '<a href="#" onclick="javascript:controller.toggleEditFileView(\''.$d->getID().'\')" class="docman-editfile" title="'. _('Edit this document') .'" >'.html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))). '</a>';
-				echo '<a href="?group_id='.$group_id.'&action=releasefile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-releasereservation" title="'. _('Release reservation') .'" >'.html_image('docman/release-document.png',22,22,array('alt'=>_('Release reservation'))). '</a>';
+				echo '<a href="?group_id='.$group_id.'&action=reservefile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-reservefile" title="'. _('Reserve this document for later edition') .'" >'.html_image('docman/reserve-document.png',22,22,array('alt'=>_('Reserve this document'))). '</a>';
+			} else {
+				if ($d->getReservedBy() != $LUSER->getID()) {
+					if (forge_check_perm('docman', $group_id, 'admin')) {
+						echo '<a href="?group_id='.$group_id.'&action=enforcereserve&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-enforcereservation" title="'. _('Enforce reservation') .'" >'.html_image('docman/enforce-document.png',22,22,array('alt'=>_('Enforce reservation')));
+					}
+				} else {
+					echo '<a href="?group_id='.$group_id.'&action=trashfile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-movetotrash" title="'. _('Move this document to trash') .'" >'.html_image('docman/trash-empty.png',22,22,array('alt'=>_('Move to trash this document'))). '</a>';
+					echo '<a href="#" onclick="javascript:controller.toggleEditFileView(\''.$d->getID().'\')" class="docman-editfile" title="'. _('Edit this document') .'" >'.html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))). '</a>';
+					echo '<a href="?group_id='.$group_id.'&action=releasefile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-releasereservation" title="'. _('Release reservation') .'" >'.html_image('docman/release-document.png',22,22,array('alt'=>_('Release reservation'))). '</a>';
+				}
 			}
-		}
 			if ($d->isMonitoredBy($LUSER->getID())) {
-				$option='remove';
-				$titleMonitor= _('Stop monitoring this document');
+				$option = 'remove';
+				$titleMonitor = _('Stop monitoring this document');
 			} else {
-				$option='add';
-				$titleMonitor= _('Start monitoring this document');
+				$option = 'add';
+				$titleMonitor = _('Start monitoring this document');
 			}
 			echo '<a href="?group_id='.$group_id.'&action=monitorfile&option='.$option.'&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'" class="docman-monitorfile" title="'.$titleMonitor.'" >'.html_image('docman/monitor-'.$option.'document.png',22,22,array('alt'=>$titleMonitor)). '</a>';
 			echo '</td>';
@@ -246,7 +259,7 @@
 	}
 	echo $HTML->listTableBottom();
 	echo '</div>';
-	echo '<div class="docmanDiv">'.html_image('docman/new.png',14,14,array('alt'=>'new')).' : ' . _('Created or updated since less than 7 days') .'</div>';
+	echo '<div class="docmanDiv">'.html_image('docman/new.png', '14', '14', array('alt'=>'new')).' : ' . _('Created or updated since less than 7 days') .'</div>';
 	include ($gfcommon.'docman/views/editfile.php');
 }
 ?>

Modified: trunk/src/common/docman/views/listpendingfile.php
===================================================================
--- trunk/src/common/docman/views/listpendingfile.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/listpendingfile.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -5,6 +5,7 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -32,8 +33,8 @@
 $d_pending_arr =& $df->getDocuments();
 
 if (!$d_pending_arr || count($d_pending_arr) < 1) {
-    echo '<div class="feedback">'._('No pending documents').'</div>';
+	echo '<div class="feedback">'._('No pending documents').'</div>';
 } else {
-	docman_display_documents($nested_groups,$df,true,3,0);
+	docman_display_documents($nested_groups, $df, true, 3, 0);
 }
 ?>

Modified: trunk/src/common/docman/views/listtrashfile.php
===================================================================
--- trunk/src/common/docman/views/listtrashfile.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/listtrashfile.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -5,6 +5,7 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -32,16 +33,16 @@
 $d_trash_arr =& $df->getDocuments();
 
 if (!$d_trash_arr || count($d_trash_arr) < 1) {
-    echo '<div class="feedback">'._('Trash is empty').'</div>';
+	echo '<div class="feedback">'._('Trash is empty').'</div>';
 } else {
 ?>
 <script type="text/javascript">
 function displayTrashDiv() {
-    if ( 'none' == document.getElementById('listtrash').style.display ) {
-        document.getElementById('listtrash').style.display = 'block';
-    } else {
-        document.getElementById('listtrash').style.display = 'none';
-    }
+	if ( 'none' == document.getElementById('listtrash').style.display ) {
+		document.getElementById('listtrash').style.display = 'block';
+	} else {
+		document.getElementById('listtrash').style.display = 'none';
+	}
 }
 </script>
 <?php
@@ -54,7 +55,7 @@
 	echo '<li><a href="#" onclick="javascript:displayTrashDiv()">'. _('Select documents to be resurrected from deleted status.') .'</a></li>';
 	echo '</ul>';
 	echo '<div id="listtrash" style="display:none;" >';
-    docman_display_documents($nested_groups,$df,true,2,0);
+	docman_display_documents($nested_groups, $df, true, 2, 0);
 	echo '</div>';
 }
 ?>

Modified: trunk/src/common/docman/views/menu.php
===================================================================
--- trunk/src/common/docman/views/menu.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/menu.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -6,6 +6,7 @@
  * Copyright 2000, Quentin Cregan/SourceForge
  * Copyright 2002-2004, GForge Team
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -29,19 +30,18 @@
 global $HTML; // html object
 global $d_arr; // document array
 global $group_id; // id of group
-global $g; // project group object
 
 /* create the submenu following role, rules and content */
-$menu_text=array();
-$menu_links=array();
+$menu_text = array();
+$menu_links = array();
 
-if (forge_check_perm ('docman', $group_id, 'submit')) {
+if (forge_check_perm('docman', $group_id, 'submit')) {
 	$menu_text[]=_('Submit new documentation');
 	$menu_links[]='/docman/?group_id='.$group_id.'&view=addfile';
 }
 
 if (session_loggedin()) {
-	if (forge_check_perm ('docman', $group_id, 'approve')) {
+	if (forge_check_perm('docman', $group_id, 'approve')) {
 		$menu_text[]=_('Add new documentation directory');
 		$menu_links[]='/docman/?group_id='.$group_id.'&view=addsubdocgroup';
 	}
@@ -54,7 +54,7 @@
 	}
 }
 
-if (forge_check_perm ('docman', $group_id, 'admin')) {
+if (forge_check_perm('docman', $group_id, 'admin')) {
 	$menu_text[]=_('Admin');
 	$menu_links[]='/docman/?group_id='.$group_id.'&view=admin';
 }
@@ -62,5 +62,4 @@
 echo $HTML->subMenu( $menu_text, $menu_links);
 
 plugin_hook ("blocks", "doc index");
-
 ?>

Modified: trunk/src/common/docman/views/search.php
===================================================================
--- trunk/src/common/docman/views/search.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/search.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -28,18 +28,18 @@
 /* NEED A REAL REWRITE */
 require_once $gfcommon.'docman/include/vtemplate.class.php';
 
-$is_editor = forge_check_perm ('docman', $g->getID(), 'admin') ;
+$is_editor = forge_check_perm('docman', $g->getID(), 'admin');
 
 $vtp = new VTemplate;
 if (empty($gfcommon)) {
-        $templates_dir = '../../common';
+	$templates_dir = '../../common';
 } else {
-        $templates_dir = $gfcommon;
+	$templates_dir = $gfcommon;
 }
 $handle = $vtp->Open($templates_dir."/docman/templates/search.tpl.html");
 $vtp->NewSession($handle,"MAIN");
 
-$allchecked = ""; $onechecked = ""; 
+$allchecked = ""; $onechecked = "";
 if (getStringFromPost('search_type') == "one") {$onechecked = "checked";}
 else {$allchecked = "checked";}
 $vtp->AddSession($handle,"FORMSEARCH");
@@ -53,56 +53,53 @@
 $vtp->SetVar($handle,"FORMSEARCH.SEARCH_ONE_WORD",_('With at least one of words'));
 $vtp->CloseSession($handle,"FORMSEARCH");
 
-if (getStringFromPost('cmd') == "search")
-{
-	
+if (getStringFromPost('cmd') == "search") {
 	$textsearch = getStringFromPost("textsearch");
 	$textsearch = prepare_search_text ($textsearch);
 	$mots = preg_split("/[\s,]+/",$textsearch);
 	$qpa = db_construct_qpa (false, 'SELECT filename, filetype, docid, doc_data.stateid as stateid, doc_states.name as statename, title, description, createdate, updatedate, doc_group, group_id FROM doc_data JOIN doc_states ON doc_data.stateid = doc_states.stateid') ;
-
 	if (getStringFromPost('search_type') == "one") {
 		if (count($mots) > 0) {
-			$qpa = db_construct_qpa ($qpa, ' AND (FALSE') ;
+			$qpa = db_construct_qpa ($qpa, ' AND (FALSE');
 			foreach ($mots as $mot) {
-				$mot = strtolower($mot); 
+				$mot = strtolower($mot);
 				$qpa = db_construct_qpa ($qpa, ' OR title LIKE $1 OR description LIKE $1 OR data_words LIKE $1',
-							 array ("%$mot%")) ;
+							 array("%$mot%"));
 			}
-			$qpa = db_construct_qpa ($qpa, ')') ;
+			$qpa = db_construct_qpa($qpa, ')');
 		}
 	} else {
 		// search_type = all
 		if (count($mots) > 0) {
-			$qpa = db_construct_qpa ($qpa, ' AND (TRUE') ;
+			$qpa = db_construct_qpa($qpa, ' AND (TRUE');
 			foreach ($mots as $mot) {
-				$mot = strtolower($mot); 
-				$qpa = db_construct_qpa ($qpa, ' AND (title LIKE $1 OR description LIKE $1 OR data_words LIKE $1)',
-							 array ("%$mot%")) ;
+				$mot = strtolower($mot);
+				$qpa = db_construct_qpa($qpa, ' AND (title LIKE $1 OR description LIKE $1 OR data_words LIKE $1)',
+							array("%$mot%"));
 			}
-			$qpa = db_construct_qpa ($qpa, ')') ;
+			$qpa = db_construct_qpa($qpa, ')');
 		}
 	}
 
 	if (!$is_editor) {
-		$qpa = db_construct_qpa ($qpa, ' AND doc_data.stateid = 1') ;
+		$qpa = db_construct_qpa($qpa, ' AND doc_data.stateid = 1');
 	} else {
-		$qpa = db_construct_qpa ($qpa, ' AND doc_data.stateid != 2') ;
+		$qpa = db_construct_qpa($qpa, ' AND doc_data.stateid != 2');
 	}
-	
-	$qpa = db_construct_qpa ($qpa, 'AND group_id = $1',
-				 array (getIntFromRequest ('group_id'))) ;
-	$qpa = db_construct_qpa ($qpa, 'ORDER BY updatedate, createdate') ;
+
+	$qpa = db_construct_qpa($qpa, 'AND group_id = $1',
+				array(getIntFromRequest('group_id')));
+	$qpa = db_construct_qpa($qpa, 'ORDER BY updatedate, createdate');
 	$resarr = array();
-	$result = db_query_qpa ($qpa);
+	$result = db_query_qpa($qpa);
 	if (!$result) {
-		$vtp->AddSession($handle,"MESSAGE");
-		$vtp->SetVar($handle,"MESSAGE.TEXT",_('Database query error'));
-		$vtp->CloseSession($handle,"MESSAGE");
+		$vtp->AddSession($handle, "MESSAGE");
+		$vtp->SetVar($handle, "MESSAGE.TEXT", _('Database query error'));
+		$vtp->CloseSession($handle, "MESSAGE");
 	} elseif (db_numrows($result) < 1) {
-		$vtp->AddSession($handle,"MESSAGE");
-		$vtp->SetVar($handle,"MESSAGE.TEXT",_('Your search did not match any documents'));
-		$vtp->CloseSession($handle,"MESSAGE");
+		$vtp->AddSession($handle, "MESSAGE");
+		$vtp->SetVar($handle, "MESSAGE.TEXT", _('Your search did not match any documents'));
+		$vtp->CloseSession($handle, "MESSAGE");
 	} else {
 		while ($arr = db_fetch_array($result)) {
 			$resarr[] = $arr;
@@ -112,58 +109,56 @@
  	// print_debug ($sql);
 	// need groups infos
 	$groupsarr = array();
-	$result = db_query_params ('SELECT doc_group, groupname, parent_doc_group FROM doc_groups WHERE group_id=$1',
-				   array (getIntFromRequest ('group_id')));
+	$result = db_query_params('SELECT doc_group, groupname, parent_doc_group FROM doc_groups WHERE group_id=$1',
+					array(getIntFromRequest('group_id')));
 	if ($result && db_numrows($result) > 0) {
 		while ($arr = db_fetch_array($result)) {
 			$groupsarr[] = $arr;
 		}
 	}
 	db_free_result($result);
-	
-	$vtp->AddSession($handle,"RESULTSEARCH");
+
+	$vtp->AddSession($handle, "RESULTSEARCH");
 	$count = 0;
 	foreach ($resarr as $item) {
 		$count++;
-		$vtp->AddSession($handle,"RESULT");
-		$vtp->SetVar($handle,"RESULT.N",$count);
-		$vtp->SetVar($handle,"RESULT.SEARCHTITLE",$item["title"]);
-		$vtp->SetVar($handle,"RESULT.SEARCHCOMMENT",$item["description"]);
-		$s = get_path_document ($groupsarr, $item["doc_group"], "$_GET[group_id]");
-		$vtp->SetVar($handle,"RESULT.SEARCHPATH",$s);
+		$vtp->AddSession($handle, "RESULT");
+		$vtp->SetVar($handle, "RESULT.N", $count);
+		$vtp->SetVar($handle, "RESULT.SEARCHTITLE", $item["title"]);
+		$vtp->SetVar($handle, "RESULT.SEARCHCOMMENT", $item["description"]);
+		$s = get_path_document($groupsarr, $item["doc_group"], "$_GET[group_id]");
+		$vtp->SetVar($handle, "RESULT.SEARCHPATH", $s);
 		if ($item['filetype'] == 'URL') {
-			$vtp->SetVar($handle,"RESULT.FILE_NAME",$item["filename"]);
+			$vtp->SetVar($handle, "RESULT.FILE_NAME", $item["filename"]);
 		} else {
-			$vtp->SetVar($handle,"RESULT.FILE_NAME",'/docman/view.php/'.$_GET["group_id"].'/'.$item["docid"].'/'.urlencode($item["filename"]));
+			$vtp->SetVar($handle, "RESULT.FILE_NAME", '/docman/view.php/'.$_GET["group_id"].'/'.$item["docid"].'/'.urlencode($item["filename"]));
 		}
-		if ($is_editor) $vtp->SetVar($handle,"RESULT.STATE",$item["statename"]);
-		$vtp->CloseSession($handle,"RESULT");
+		if ($is_editor) $vtp->SetVar($handle, "RESULT.STATE", $item["statename"]);
+		$vtp->CloseSession($handle, "RESULT");
 	}
-	$vtp->CloseSession($handle,"RESULTSEARCH");
+	$vtp->CloseSession($handle, "RESULTSEARCH");
 }
 
-$vtp->CloseSession($handle,"MAIN");
+$vtp->CloseSession($handle, "MAIN");
 $vtp->Display();
 
 // print_debug (print_r($_POST,true));
 // print_debug (print_r($groupsarr,true));
 
-function print_debug ($text) {
+function print_debug($text) {
 	echo "<pre>$text</pre>";
 }
 
-function get_path_document ($groupsarr, $doc_group, $group_id) {
+function get_path_document($groupsarr, $doc_group, $group_id) {
 	$rep = "";
 	foreach ($groupsarr as $group) {
-		if ($group["doc_group"] == $doc_group)
-		{
-			if ($group["parent_doc_group"] == 0) 
-			{
-				$href = util_make_url ("docman/?group_id=$group_id&view=listfile&dirid=$group[doc_group]");
+		if ($group["doc_group"] == $doc_group) {
+			if ($group["parent_doc_group"] == 0) {
+				$href = util_make_url("docman/?group_id=$group_id&view=listfile&dirid=$group[doc_group]");
 				$rep .= "<a href=\"$href\" style=\"color:#00610A;\">$group[groupname]</a>";
 				break;
 			}
-			$s = get_path_document ($groupsarr,  $group["parent_doc_group"], $group_id);
+			$s = get_path_document($groupsarr, $group["parent_doc_group"], $group_id);
 			$href = util_make_url ("docman/?group_id=$group_id&view=listfile&dirid=$group[doc_group]");
 			$rep .= "$s / <a href=\"$href\" style=\"color:#00610A;\">$group[groupname]</a>";
 			break;
@@ -172,17 +167,17 @@
 	return $rep;
 }
 
-function prepare_search_text ($text) {
-	$rep = $text; 
+function prepare_search_text($text) {
+	$rep = $text;
 	$rep = utf8_decode($rep);
-	$rep = preg_replace ("/é/", "/e/", $rep);
-	$rep = preg_replace ("/è/", "/e/", $rep);
-	$rep = preg_replace ("/ê/", "/e/", $rep);
-	$rep = preg_replace ("/à/", "/a/", $rep);
-	$rep = preg_replace ("/ù/", "/u/", $rep);
-	$rep = preg_replace ("/ç/", "/c/", $rep);
-	$rep = preg_replace ("/é/", "/e/", $rep);
-	$rep = strtolower ($rep);
+	$rep = preg_replace("/é/", "/e/", $rep);
+	$rep = preg_replace("/è/", "/e/", $rep);
+	$rep = preg_replace("/ê/", "/e/", $rep);
+	$rep = preg_replace("/à/", "/a/", $rep);
+	$rep = preg_replace("/ù/", "/u/", $rep);
+	$rep = preg_replace("/ç/", "/c/", $rep);
+	$rep = preg_replace("/é/", "/e/", $rep);
+	$rep = strtolower($rep);
 	return $rep;
 }
 

Modified: trunk/src/common/docman/views/tree.php
===================================================================
--- trunk/src/common/docman/views/tree.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/tree.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -1,11 +1,11 @@
 <?php
-
 /**
  * FusionForge Documentation Manager
  *
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -30,7 +30,7 @@
 global $group_id; // id of the group
 
 echo '<h3>Document Tree</h3>';
-$nested_docs=array();
+$nested_docs = array();
 $idExposeTreeIndex = 0;
 $idhtml = 0;
 if ($d_arr != NULL ) {
@@ -45,9 +45,9 @@
 echo '<div id="documenttree" style="height:100%">';
 ?>
 
-<script type="text/javascript"><!--
+<script type="text/javascript">
 	var myThemeXPBase = "<?php echo util_make_uri ('/jscook/ThemeXP/'); ?>";
---></script>
+</script>
 <script type="text/javascript" src="<?php echo util_make_uri ('/jscook/JSCookTree.js'); ?>"></script>
 <link rel="stylesheet" href="<?php echo util_make_uri ('/jscook/ThemeXP/theme.css'); ?>" type="text/css" />
 <script src="<?php echo util_make_uri ('/jscook/ThemeXP/theme.js'); ?>" type="text/javascript"></script>
@@ -60,7 +60,7 @@
 		mymenuidDiv.style.height = documenttreeDiv.offsetHeight+"px";
 	</script>-->
 
-<script type="text/javascript"><!--
+<script type="text/javascript">
 	var myMenu =
 		[
 			['<span class="JSCookTreeFolderClosed"><i><img alt="" src="' + ctThemeXPBase + 'folder1.gif" /></i></span><span id="ctItemID0" class="JSCookTreeFolderOpen"><i><img alt="" src="' + ctThemeXPBase + 'folderopen1.gif" /></i></span>', '/', '#', '', '', <?php docman_recursive_display(0); ?>
@@ -71,7 +71,7 @@
 	ctExposeTreeIndex (treeIndex, <?php echo $idExposeTreeIndex ?>);
 	var openItem = ctGetSelectedItem (treeIndex)
 	ctOpenFolder (openItem)
---></script>
+</script>
 
 <?php
 echo '</div>';

Modified: trunk/src/common/docman/views/views.php
===================================================================
--- trunk/src/common/docman/views/views.php	2010-11-18 12:43:10 UTC (rev 11561)
+++ trunk/src/common/docman/views/views.php	2010-11-18 14:14:37 UTC (rev 11562)
@@ -3,6 +3,7 @@
  * FusionForge Documentation Manager
  *
  * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -30,10 +31,12 @@
 	case 'editfile':
 	case 'listfile':
 	case 'trashdir':
-	case 'search':
+	case 'search': {
 		include ($gfcommon.'docman/views/'.$view.'.php');
 		break;
-	default:
+	}
+	default: {
 		include ($gfcommon.'docman/views/help.php');
+	}
 }
 ?>




More information about the Fusionforge-commits mailing list