[Fusionforge-commits] r13475 - branches/Branch_5_1/src/common/docman/views

Alain Peyrat aljeux at fusionforge.org
Fri Jun 10 12:05:53 CEST 2011


Author: aljeux
Date: 2011-06-10 12:05:53 +0200 (Fri, 10 Jun 2011)
New Revision: 13475

Modified:
   branches/Branch_5_1/src/common/docman/views/admin.php
Log:
Protect code if PHP zip if not available, no zip option.

Modified: branches/Branch_5_1/src/common/docman/views/admin.php
===================================================================
--- branches/Branch_5_1/src/common/docman/views/admin.php	2011-06-10 10:05:48 UTC (rev 13474)
+++ branches/Branch_5_1/src/common/docman/views/admin.php	2011-06-10 10:05:53 UTC (rev 13475)
@@ -72,11 +72,13 @@
 		echo '<a href="#" onclick="javascript:displayAdminDiv(\'adminoptions\')" ><h4>'. _('Admin Options') .'</h4></a>';
 		echo '<div id="adminoptions" style="display:none;" >';
 
-		echo '<form id="backup" name="backup" method="post" action="'. util_make_url ('/docman/view.php/'.$group_id.'/backup') .'" >';
-		echo '<ul>';
-		echo '<li><input id="submitbackup" type="button" value="'. _('Extract documents and directories as an archive') .'" onclick="javascript:doIt(\'backup\')"></li>';
-		echo '</ul>';
-		echo '</form>';
+		if (extension_loaded('zip')) {
+			echo '<form id="backup" name="backup" method="post" action="'. util_make_url ('/docman/view.php/'.$group_id.'/backup') .'" >';
+			echo '<ul>';
+			echo '<li><input id="submitbackup" type="button" value="'. _('Extract documents and directories as an archive') .'" onclick="javascript:doIt(\'backup\')"></li>';
+			echo '</ul>';
+			echo '</form>';
+		}
 
 		echo '<form id="createonline" name="createonline" method="post" action="?group_id='.$group_id.'&action=updatecreateonline" >';
 		echo '<ul>';




More information about the Fusionforge-commits mailing list