[Fusionforge-commits] r9595 - in trunk: gforge/common/include gforge/cronjobs gforge/www/docman/admin gforge/www/frs/admin gforge/www/frs/include tests/code/deprecations

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Apr 23 14:43:36 CEST 2010


Author: lolando
Date: 2010-04-23 14:43:36 +0200 (Fri, 23 Apr 2010)
New Revision: 9595

Modified:
   trunk/gforge/common/include/config-vars.php
   trunk/gforge/cronjobs/homedirs.php
   trunk/gforge/www/docman/admin/index.php
   trunk/gforge/www/frs/admin/editrelease.php
   trunk/gforge/www/frs/admin/qrs.php
   trunk/gforge/www/frs/include/frs_utils.php
   trunk/tests/code/deprecations/DeprecationsTest.php
Log:
Config API: convert newly introduced sys_use_manual_uploads variable

Modified: trunk/gforge/common/include/config-vars.php
===================================================================
--- trunk/gforge/common/include/config-vars.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/gforge/common/include/config-vars.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -53,6 +53,7 @@
 forge_define_config_item ('use_shell', 'core', $GLOBALS['sys_use_shell']) ;
 forge_define_config_item ('use_ratings', 'core', $GLOBALS['sys_use_ratings']) ;
 forge_define_config_item ('use_ftpuploads', 'core', $GLOBALS['sys_use_ftpuploads']) ;
+forge_define_config_item ('use_manual_uploads', 'core', $GLOBALS['sys_use_manual_uploads']) ;
 forge_define_config_item ('use_gateways', 'core', $GLOBALS['sys_use_gateways']) ;
 forge_define_config_item ('use_project_vhost', 'core', $GLOBALS['sys_use_project_vhost']) ;
 forge_define_config_item ('use_project_database', 'core', $GLOBALS['sys_use_project_database']) ;

Modified: trunk/gforge/cronjobs/homedirs.php
===================================================================
--- trunk/gforge/cronjobs/homedirs.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/gforge/cronjobs/homedirs.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -172,7 +172,7 @@
 		fclose($fw);
 	}
 
-	if ($sys_use_manual_uploads) { 
+	if (forge_get_config('use_manual_uploads')) { 
 		$incoming = $groupdir_prefix/$group."/incoming" ;
 		if (!is_dir($incoming))
 		{

Modified: trunk/gforge/www/docman/admin/index.php
===================================================================
--- trunk/gforge/www/docman/admin/index.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/gforge/www/docman/admin/index.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -107,7 +107,7 @@
 			$filename=$upload_dir.'/'.$ftp_filename;
 			$data = fread(fopen($filename, 'r'), filesize($filename));
 			$filetype=$uploaded_data_type;
-		} elseif ($sys_use_manual_uploads && $uploaded_filename!=100 && util_is_valid_filename($uploaded_filename)) { //100==None
+		} elseif (forge_get_config('use_manual_uploads') && $uploaded_filename!=100 && util_is_valid_filename($uploaded_filename)) { //100==None
 			$incoming = $groupdir_prefix."/".$g->getUnixName()."/incoming" ;
 			$filename = $incoming.'/'.$uploaded_filename;
 			$data = addslashes(fread(fopen($filename, 'r'), filesize($filename)));
@@ -343,7 +343,7 @@
 				echo '<br /><br />';			
 			}
 		
-/*		if ($sys_use_manual_uploads && $u->getUnixStatus() == 'A') {
+/*		if (forge_get_config('use_manual_uploads') && $u->getUnixStatus() == 'A') {
 			$incoming = $groupdir_prefix."/".$g->getUnixName()."/incoming" ;
 			
 			echo '<strong>' ;

Modified: trunk/gforge/www/frs/admin/editrelease.php
===================================================================
--- trunk/gforge/www/frs/admin/editrelease.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/gforge/www/frs/admin/editrelease.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -299,7 +299,7 @@
 	</p>
 <?php } ?>
 
-<?php if ($sys_use_manual_uploads) {
+<?php if (forge_get_config('use_manual_uploads')) {
 	$incoming = $groupdir_prefix."/".$g->getUnixName()."/incoming" ;
 
 	echo '<p>';

Modified: trunk/gforge/www/frs/admin/qrs.php
===================================================================
--- trunk/gforge/www/frs/admin/qrs.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/gforge/www/frs/admin/qrs.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -208,7 +208,7 @@
 		
 		</p>
 		<?php } ?>
-<?php if ($sys_use_manual_uploads) {
+<?php if (forge_get_config('use_manual_uploads')) {
 	$incoming = $groupdir_prefix."/".$g->getUnixName()."/incoming" ;
 
 	echo '<p>';

Modified: trunk/gforge/www/frs/include/frs_utils.php
===================================================================
--- trunk/gforge/www/frs/include/frs_utils.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/gforge/www/frs/include/frs_utils.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -222,7 +222,7 @@
 
 function frs_add_file_from_form ($release, $type_id, $processor_id, $release_date,
 				 $userfile, $ftp_filename, $manual_filename) {
-	global $groupdir_prefix, $sys_use_manual_uploads ;
+	global $groupdir_prefix ;
 
 	$group_unix_name = $release->getFRSPackage()->getGroup()->getUnixName() ;
 	$incoming = "$groupdir_prefix/$group_unix_name/incoming" ;
@@ -252,7 +252,7 @@
 		$fname = $ftp_filename ;
 		$move = false ;
 		$filechecks = true ;
-	} elseif ($sys_use_manual_uploads && $manual_filename && util_is_valid_filename($manual_filename) && is_file($incoming.'/'.$manual_filename)) {
+	} elseif (forge_get_config('use_manual_uploads') && $manual_filename && util_is_valid_filename($manual_filename) && is_file($incoming.'/'.$manual_filename)) {
 		$infile = $incoming.'/'.$manual_filename ;
 		$fname = $manual_filename ;
 		$move = false ;

Modified: trunk/tests/code/deprecations/DeprecationsTest.php
===================================================================
--- trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-23 12:27:38 UTC (rev 9594)
+++ trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-23 12:43:36 UTC (rev 9595)
@@ -58,6 +58,7 @@
 			       'sys_use_shell',
 			       'sys_use_ratings',
 			       'sys_use_ftpuploads',
+			       'sys_use_manual_uploads',
 			       'sys_use_gateways',
 			       'sys_use_project_vhost',
 			       'sys_use_project_database',




More information about the Fusionforge-commits mailing list