[Fusionforge-commits] r8248 - branches/Branch_4_8/gforge/www/docman/include

Olivier Meunier musicoliv at libremir.placard.fr.eu.org
Thu Oct 8 17:46:11 CEST 2009


Author: musicoliv
Date: 2009-10-08 17:46:10 +0200 (Thu, 08 Oct 2009)
New Revision: 8248

Modified:
   branches/Branch_4_8/gforge/www/docman/include/doc_utils.php
Log:
Fix broken docman admin with nested folders when register_globals is off

Modified: branches/Branch_4_8/gforge/www/docman/include/doc_utils.php
===================================================================
--- branches/Branch_4_8/gforge/www/docman/include/doc_utils.php	2009-10-07 14:03:48 UTC (rev 8247)
+++ branches/Branch_4_8/gforge/www/docman/include/doc_utils.php	2009-10-08 15:46:10 UTC (rev 8248)
@@ -152,12 +152,13 @@
 function docman_display_documents(&$nested_groups, &$document_factory, $is_editor, $stateid=0, $from_admin=false, $parent_group=0) {
 	global $selected_doc_group_id;
 
+	$selected_stateid = getIntFromRequest('selected_stateid');
 	$selected_doc_group_id=getIntFromRequest('selected_doc_group_id');
 	
 	
 
 	
-	if (!is_array($nested_groups["$parent_group"])) {
+	if (!array_key_exists("$parent_group",$nested_groups) || !is_array($nested_groups["$parent_group"])) {
 		return;
 	}
 	
@@ -175,7 +176,7 @@
 			} else {
 				$icon = 'cfolder15.png';
 			}
-			echo "<li>".html_image('ic/'.$icon,"15","13",array("border"=>"0"))." <a href='index.php?group_id=".$doc_group->Group->getID()."&selected_doc_group_id=".$doc_group->getID()."&amp;language_id=".@$GLOBALS['selected_language'];
+			echo "<li>".html_image('ic/'.$icon,"15","13",array("border"=>"0"))." <a href='index.php?group_id=".$doc_group->Group->getID()."&amp;selected_doc_group_id=".$doc_group->getID()."&amp;language_id=".@$GLOBALS['selected_language'];
 			if ($from_admin && $stateid) {	// if we're sorting by the state, pass the state as a variable
 				echo "&amp;selected_stateid=".$stateid;
 			}




More information about the Fusionforge-commits mailing list