[Fusionforge-commits] r9562 - in trunk: gforge/common/frs gforge/common/include gforge/cronjobs gforge/db gforge/plugins/cvstracker/common gforge/plugins/extratabs/common gforge/plugins/globalsearch/common gforge/plugins/globalsearch/www gforge/plugins/mediawiki/cronjobs gforge/plugins/mediawiki/etc/plugins/mediawiki gforge/plugins/projectlabels/common gforge/plugins/quota_management/www gforge/plugins/scmarch/common gforge/plugins/scmarch/etc/plugins/scmarch gforge/plugins/scmbzr/common gforge/plugins/scmbzr/etc/plugins/scmbzr gforge/plugins/scmcvs/common gforge/plugins/scmcvs/cronjobs gforge/plugins/scmcvs/etc/plugins/scmcvs gforge/plugins/scmdarcs/common gforge/plugins/scmdarcs/etc/plugins/scmdarcs gforge/plugins/scmgit/common gforge/plugins/scmgit/etc/plugins/scmgit gforge/plugins/scmhg/common gforge/plugins/scmhg/etc/plugins/scmhg gforge/plugins/scmsvn/common gforge/plugins/scmsvn/etc/plugins/scmsvn gforge/plugins/svntracker/common gforge/plugins/webcalendar/script gforge/plugins/wiki/cronjobs gforge/www/account gforge/www/admin gforge/www/docman gforge/www/docman/admin gforge/www/frs gforge/www/frs/admin gforge/www/include gforge/www/soap/frs gforge/www/themes/gforge-simple-theme tests/code/deprecations

Roland Mas lolando at libremir.placard.fr.eu.org
Wed Apr 21 20:06:20 CEST 2010


Author: lolando
Date: 2010-04-21 20:06:20 +0200 (Wed, 21 Apr 2010)
New Revision: 9562

Modified:
   trunk/gforge/common/frs/FRSFile.class.php
   trunk/gforge/common/frs/FRSPackage.class.php
   trunk/gforge/common/frs/FRSRelease.class.php
   trunk/gforge/common/include/Group.class.php
   trunk/gforge/common/include/PluginManager.class.php
   trunk/gforge/common/include/User.class.php
   trunk/gforge/common/include/cron_utils.php
   trunk/gforge/common/include/session.php
   trunk/gforge/common/include/utils.php
   trunk/gforge/cronjobs/auth_unix.php
   trunk/gforge/cronjobs/backup_site.php
   trunk/gforge/cronjobs/create_home_dirs.php
   trunk/gforge/cronjobs/ftp_create_group_access.php
   trunk/gforge/cronjobs/homedirs.php
   trunk/gforge/cronjobs/update_filesize.php
   trunk/gforge/db/20050127-frs-reorg.php
   trunk/gforge/plugins/cvstracker/common/cvstrackerPlugin.class.php
   trunk/gforge/plugins/extratabs/common/extratabs-init.php
   trunk/gforge/plugins/globalsearch/common/globalsearch-init.php
   trunk/gforge/plugins/globalsearch/www/edit_assoc_sites.php
   trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.php
   trunk/gforge/plugins/mediawiki/etc/plugins/mediawiki/LocalSettings.php
   trunk/gforge/plugins/projectlabels/common/projectlabels-init.php
   trunk/gforge/plugins/quota_management/www/quota.php
   trunk/gforge/plugins/quota_management/www/quota_project.php
   trunk/gforge/plugins/scmarch/common/ArchPlugin.class.php
   trunk/gforge/plugins/scmarch/etc/plugins/scmarch/config.php
   trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php
   trunk/gforge/plugins/scmbzr/etc/plugins/scmbzr/config.php
   trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
   trunk/gforge/plugins/scmcvs/cronjobs/cvs.php
   trunk/gforge/plugins/scmcvs/cronjobs/ftp_create.php
   trunk/gforge/plugins/scmcvs/cronjobs/usergroup.php
   trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php
   trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php
   trunk/gforge/plugins/scmdarcs/etc/plugins/scmdarcs/config.php
   trunk/gforge/plugins/scmgit/common/GitPlugin.class.php
   trunk/gforge/plugins/scmgit/etc/plugins/scmgit/config.php
   trunk/gforge/plugins/scmhg/common/HgPlugin.class.php
   trunk/gforge/plugins/scmhg/etc/plugins/scmhg/config.php
   trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php
   trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php
   trunk/gforge/plugins/svntracker/common/svntrackerPlugin.class.php
   trunk/gforge/plugins/webcalendar/script/webcalendar-init.php
   trunk/gforge/plugins/wiki/cronjobs/create_groups.php
   trunk/gforge/www/account/login.php
   trunk/gforge/www/account/pending-resend.php
   trunk/gforge/www/account/register.php
   trunk/gforge/www/account/verify.php
   trunk/gforge/www/admin/pluginman.php
   trunk/gforge/www/docman/admin/index.php
   trunk/gforge/www/docman/new.php
   trunk/gforge/www/frs/admin/editrelease.php
   trunk/gforge/www/frs/admin/qrs.php
   trunk/gforge/www/frs/download.php
   trunk/gforge/www/include/Layout.class.php
   trunk/gforge/www/include/pre.php
   trunk/gforge/www/soap/frs/frs.php
   trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php
   trunk/tests/code/deprecations/DeprecationsTest.php
Log:
Config API: more variable migrations

Modified: trunk/gforge/common/frs/FRSFile.class.php
===================================================================
--- trunk/gforge/common/frs/FRSFile.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/frs/FRSFile.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -127,7 +127,7 @@
 		}
 
 
-		$path_name=$GLOBALS['sys_upload_dir'].'/'.$this->FRSRelease->FRSPackage->Group->getUnixName();
+		$path_name=forge_get_config('upload_dir').'/'.$this->FRSRelease->FRSPackage->Group->getUnixName();
 		if (!is_dir($path_name)) {
 			mkdir($path_name,0755);
 		} else {
@@ -153,7 +153,7 @@
 		}
 
 		$file_location=escapeshellcmd($file_location);
-		$newfilelocation = $GLOBALS['sys_upload_dir'].'/'.
+		$newfilelocation = forge_get_config('upload_dir').'/'.
 			$this->FRSRelease->FRSPackage->Group->getUnixName().'/'.
 			$this->FRSRelease->FRSPackage->getFileName().'/'.
 			$this->FRSRelease->getFileName().'/';
@@ -327,7 +327,7 @@
 			return false;
 		}
 
-		$file=$GLOBALS['sys_upload_dir'].'/'. 
+		$file=forge_get_config('upload_dir').'/'. 
 			$this->FRSRelease->FRSPackage->Group->getUnixName() . '/' . 
 			$this->FRSRelease->FRSPackage->getFileName().'/'.
 			$this->FRSRelease->getFileName().'/'.
@@ -399,12 +399,12 @@
 
 		// Move physically file if needed
 		if ($release_id != $this->FRSRelease->getID()) {
-			$old_file_location = $GLOBALS['sys_upload_dir'].'/'.
+			$old_file_location = forge_get_config('upload_dir').'/'.
 				$this->FRSRelease->FRSPackage->Group->getUnixName().'/'.
 				$this->FRSRelease->FRSPackage->getFileName().'/'.
 				$this->FRSRelease->getFileName().'/'.
 				$this->data_array['filename'];
-			$new_file_location = $GLOBALS['sys_upload_dir'].'/'.
+			$new_file_location = forge_get_config('upload_dir').'/'.
 				$FRSRelease->FRSPackage->Group->getUnixName().'/'.
 				$FRSRelease->FRSPackage->getFileName().'/'.
 				$FRSRelease->getFileName().'/'.

Modified: trunk/gforge/common/frs/FRSPackage.class.php
===================================================================
--- trunk/gforge/common/frs/FRSPackage.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/frs/FRSPackage.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -131,7 +131,7 @@
 	 *	@return	boolean success.
 	 */
 	function create($name,$is_public=1) {
-		global $sys_apache_user,$sys_apache_group;
+
 		if (strlen($name) < 3) {
 			$this->setError(_('FRSPackage Name Must Be At Least 3 Characters'));
 			return false;
@@ -172,7 +172,7 @@
 		} else {
 
 			//make groupdir if it doesn't exist
-			$groupdir = $GLOBALS['sys_upload_dir'].'/'.$this->Group->getUnixName();
+			$groupdir = forge_get_config('upload_dir').'/'.$this->Group->getUnixName();
 			if (!is_dir($groupdir)) {
 				@mkdir($groupdir);
 			}
@@ -183,8 +183,8 @@
 			}
 			
 			// this 2 should normally silently fail (because it's called with the apache user) but if it's root calling the create() method, then the owner and group for the directory should be changed
-			@chown($newdirlocation,$sys_apache_user);
-			@chgrp($newdirlocation,$sys_apache_group);
+			@chown($newdirlocation,forge_get_config('apache_user'));
+			@chgrp($newdirlocation,forge_get_config('apache_group'));
 			db_commit();
 			return true;
 		}
@@ -404,8 +404,8 @@
 			return false;
 		}
 		$newdirname = $this->getFileName();
-		$olddirlocation = $GLOBALS['sys_upload_dir'].'/'.$this->Group->getUnixName().'/'.$olddirname;
-		$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$this->Group->getUnixName().'/'.$newdirname;
+		$olddirlocation = forge_get_config('upload_dir').'/'.$this->Group->getUnixName().'/'.$olddirname;
+		$newdirlocation = forge_get_config('upload_dir').'/'.$this->Group->getUnixName().'/'.$newdirname;
 		
 		if(($olddirname!=$newdirname)){
 			if(is_dir($newdirlocation)){
@@ -466,7 +466,7 @@
 				return false;
 			}
 		}
-		$dir=$GLOBALS['sys_upload_dir'].'/'.
+		$dir=forge_get_config('upload_dir').'/'.
 			$this->Group->getUnixName() . '/' .
 			$this->getFileName().'/';
 

Modified: trunk/gforge/common/frs/FRSRelease.class.php
===================================================================
--- trunk/gforge/common/frs/FRSRelease.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/frs/FRSRelease.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -167,7 +167,7 @@
 			db_rollback();
 			return false;
 		} else {
-			$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$this->FRSPackage->Group->getUnixName().'/'.$this->FRSPackage->getFileName().'/'.$this->getFileName();
+			$newdirlocation = forge_get_config('upload_dir').'/'.$this->FRSPackage->Group->getUnixName().'/'.$this->FRSPackage->getFileName().'/'.$this->getFileName();
 			if (!is_dir($newdirlocation)) {
 				@mkdir($newdirlocation);
 			}
@@ -354,7 +354,7 @@
 				return false;
 			}
 		}
-		$dir=$GLOBALS['sys_upload_dir'].'/'.
+		$dir=forge_get_config('upload_dir').'/'.
 			$this->FRSPackage->Group->getUnixName() . '/' .
 			$this->FRSPackage->getFileName().'/'.
 			$this->getFileName().'/';
@@ -438,8 +438,8 @@
 			return false;
 		}
 		$newfilename = $this->getFileName();
-		$olddirlocation = $GLOBALS['sys_upload_dir'].'/'.$this->FRSPackage->Group->getUnixName().'/'.$this->FRSPackage->getFileName().'/'.$oldfilename;
-		$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$this->FRSPackage->Group->getUnixName().'/'.$this->FRSPackage->getFileName().'/'.$newfilename;
+		$olddirlocation = forge_get_config('upload_dir').'/'.$this->FRSPackage->Group->getUnixName().'/'.$this->FRSPackage->getFileName().'/'.$oldfilename;
+		$newdirlocation = forge_get_config('upload_dir').'/'.$this->FRSPackage->Group->getUnixName().'/'.$this->FRSPackage->getFileName().'/'.$newfilename;
 	
 		if (($oldfilename!=$newfilename) && is_dir($olddirlocation)) {
 			if (is_dir($newdirlocation)) {

Modified: trunk/gforge/common/include/Group.class.php
===================================================================
--- trunk/gforge/common/include/Group.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/include/Group.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1571,11 +1571,11 @@
 		$hook_params['group_id'] = $this->getID();
 		plugin_hook ("group_delete", $hook_params);
 		
-		if (isset($GLOBALS['sys_upload_dir']) && $this->getUnixName()) {
-			exec('/bin/rm -rf '.$GLOBALS['sys_upload_dir'].'/'.$this->getUnixName().'/');
+		if (forge_get_config('upload_dir') != '' && $this->getUnixName()) {
+			exec('/bin/rm -rf '.forge_get_config('upload_dir').'/'.$this->getUnixName().'/');
 		}
-		if (isset($GLOBALS['sys_ftp_upload_dir']) && $this->getUnixName()) {
-			exec('/bin/rm -rf '.$GLOBALS['sys_ftp_upload_dir'].'/'.$this->getUnixName().'/');
+		if (forge_get_config('ftp_upload_dir') != '' && $this->getUnixName()) {
+			exec('/bin/rm -rf '.forge_get_config('ftp_upload_dir').'/'.$this->getUnixName().'/');
 		}
 		//
 		//	Delete reporting

Modified: trunk/gforge/common/include/PluginManager.class.php
===================================================================
--- trunk/gforge/common/include/PluginManager.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/include/PluginManager.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -140,7 +140,7 @@
 		global $gfplugins;
 
 		$plugins_data = $this->GetPlugins() ;
-		$include_path = $GLOBALS['sys_plugins_path'] ;
+		$include_path = forge_get_config('plugins_path') ;
 		$filename = $include_path . '/'. $p_name . "/common/".$p_name."-init.php" ;
 		if (file_exists ($filename)) {
 			require_once ($filename) ;

Modified: trunk/gforge/common/include/User.class.php
===================================================================
--- trunk/gforge/common/include/User.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/include/User.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -56,7 +56,7 @@
  */
 function user_get_object_by_email($email,$res=false) {
 	if (!validate_email($email)
-	    || !$GLOBALS['sys_require_unique_email']) {
+	    || !forge_get_config('require_unique_email')) {
 		return false ;
 	}
 	if (!$res) {
@@ -241,7 +241,7 @@
 			$this->setError(_('You must supply a theme'));
 			return false;
 		}
-		if (! $GLOBALS['sys_require_unique_email']) {
+		if (! forge_get_config('require_unique_email')) {
 			if (!$unix_name) {
 				$this->setError(_('You must supply a username'));
 				return false;
@@ -294,13 +294,13 @@
 			$this->setError(_('That username already exists.'));
 			return false;
 		}
-		if ($GLOBALS['sys_require_unique_email']) {
+		if (forge_get_config('require_unique_email')) {
 			if (user_get_object_by_email ('$email')) {
 				$this->setError(_('User with this email already exists - use people search to recover your login.'));
 				return false;
 			}
 		}
-		if ($GLOBALS['sys_require_unique_email'] && !$unix_name) {
+		if (forge_get_config('require_unique_email') && !$unix_name) {
 			// Let's generate a loginname for the user
 			// ...based on the email address:
 			$email_array = explode ('@', $email, 2) ;
@@ -859,7 +859,7 @@
 			return false;
 		}
 
-		if ($GLOBALS['sys_require_unique_email']) {
+		if (forge_get_config('require_unique_email')) {
 			if (db_numrows(db_query_params('SELECT user_id FROM users WHERE user_id!=$1 AND (lower(email) LIKE $2 OR lower(email_new) LIKE $2)',
 						       array ($this->getID(),
 							      strtolower($email)))) > 0) {
@@ -912,7 +912,7 @@
 			return false;
 		}
 
-		if ($GLOBALS['sys_require_unique_email']) {
+		if (forge_get_config('require_unique_email')) {
 			if (db_numrows(db_query_params('SELECT user_id FROM users WHERE user_id!=$1 AND (lower(email) LIKE $2 OR lower(email_new) LIKE $2)',
 						       array ($this->getID(),
 							      strtolower($email)))) > 0) {
@@ -1493,7 +1493,7 @@
 		} else {
 			$this->theme=$this->data_array['dirname'];
 		}
-		if (is_file($GLOBALS['sys_themeroot'].$this->theme.'/Theme.class.php')) {
+		if (is_file(forge_get_config('themes_root').$this->theme.'/Theme.class.php')) {
 			$GLOBALS['sys_theme']=$this->theme;
 		} else {
 			$this->theme=forge_get_config('default_theme');

Modified: trunk/gforge/common/include/cron_utils.php
===================================================================
--- trunk/gforge/common/include/cron_utils.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/include/cron_utils.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -70,25 +70,25 @@
 }
 
 function checkChroot() {
-	global $sys_chroot;
-	if(isset($sys_chroot) && !empty($sys_chroot) && is_dir($sys_chroot)) {
+
+	if(forge_get_config('chroot') != '' && is_dir(forge_get_config('chroot'))) {
 		return true;
 	}
 	return false;
 }
 
 function chrootPath($path) {
-	global $sys_chroot;
+
 	if(checkChroot()) {
-		$path = $sys_chroot.$path;
+		$path = forge_get_config('chroot').$path;
 	}
 	return $path;
 }
 
 function chrootCommand($command) {
-	global $sys_chroot;
+
 	if(checkChroot()) {
-		$command = 'chroot '.$sys_chroot.' '.$command;
+		$command = 'chroot '.forge_get_config('chroot').' '.$command;
 	}
 	return $command;
 }

Modified: trunk/gforge/common/include/session.php
===================================================================
--- trunk/gforge/common/include/session.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/include/session.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -148,7 +148,7 @@
 	global $feedback,$userstatus;
 
 	//  Try to get the users from the database using user_id and (MD5) user_pw
-	if ($GLOBALS['sys_require_unique_email']) {
+	if (forge_get_config('require_unique_email')) {
 		$res = db_query_params ('SELECT user_id,status,unix_pw FROM users WHERE (user_name=$1 OR email=$1) AND user_pw=$2',
 					array ($loginname,
 					       md5($passwd))) ;
@@ -160,7 +160,7 @@
 	if (!$res || db_numrows($res) < 1) {
 		// No user whose MD5 passwd matches the MD5 of the provided passwd
 		// Selecting by user_name/email only
-		if ($GLOBALS['sys_require_unique_email']) {
+		if (forge_get_config('require_unique_email')) {
 			$res = db_query_params ('SELECT user_id,status,unix_pw FROM users WHERE user_name=$1 OR email=$1',
 						array ($loginname)) ;
 		} else {

Modified: trunk/gforge/common/include/utils.php
===================================================================
--- trunk/gforge/common/include/utils.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/common/include/utils.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -129,7 +129,7 @@
  *
  */
 function util_send_message($to,$subject,$body,$from='',$BCC='',$sendername='',$extra_headers='',$send_html_email=false) {
-	global $sys_bcc_all_email_address,$sys_sendmail_path;
+	global $sys_sendmail_path;
 
 	if (!$to) {
 		$to='noreply@'.forge_get_config('web_host');
@@ -150,8 +150,8 @@
 	}
 	$body2 .= "To: $to".
 		"\nFrom: ".util_encode_mailaddr($from,$sendername,$charset);
-	if (!empty($sys_bcc_all_email_address)) {
-		$BCC.=",$sys_bcc_all_email_address";
+	if (forge_get_config('bcc_all_emails') != '') {
+		$BCC.=",".forge_get_config('bcc_all_emails');
 	}
 	if(!empty($BCC)) {
 		$body2 .= "\nBCC: $BCC";

Modified: trunk/gforge/cronjobs/auth_unix.php
===================================================================
--- trunk/gforge/cronjobs/auth_unix.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/cronjobs/auth_unix.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -199,7 +199,7 @@
 			{
 				$line .= implode (",", $gmembers) . ",";
 			}
-			$line .= $sys_apache_user . "\n";
+			$line .= forge_get_config('apache_user') . "\n";
 			fwrite ($h6, $line);
 		}
 	}

Modified: trunk/gforge/cronjobs/backup_site.php
===================================================================
--- trunk/gforge/cronjobs/backup_site.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/cronjobs/backup_site.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -75,13 +75,13 @@
  * Backup uploads dir
  **************************************/ 
 $output="";
-if (file_exists($sys_upload_dir)) {
-	@exec('tar -hjcvf '.$sys_path_to_backup.'uploads-tmp-'.$datetime.'.tar.bz2 '.$sys_upload_dir.' 2>&1' ,$output,$retval);   //proceed upload dir tar file creation
+if (file_exists(forge_get_config('upload_dir'))) {
+	@exec('tar -hjcvf '.$sys_path_to_backup.'uploads-tmp-'.$datetime.'.tar.bz2 '.forge_get_config('upload_dir').' 2>&1' ,$output,$retval);   //proceed upload dir tar file creation
 	if($retval!=0){
 		$err.= implode("\n", $output);
 	}
 } else {
-		$err.= 'Unable to find Upload Dir. Value on local.inc is:'.$sys_upload_dir;
+		$err.= 'Unable to find Upload Dir. Value on local.inc is:'.forge_get_config('upload_dir');
 }
 
 /**************************************

Modified: trunk/gforge/cronjobs/create_home_dirs.php
===================================================================
--- trunk/gforge/cronjobs/create_home_dirs.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/cronjobs/create_home_dirs.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -93,9 +93,9 @@
 	//create an FTP upload dir for this project
 	if (forge_get_config('use_ftpuploads'))
 	{ 
-		if (!is_dir($sys_ftp_upload_dir.'/'.$group))
+		if (!is_dir(forge_get_config('ftp_upload_dir').'/'.$group))
 		{
-			@mkdir($sys_ftp_upload_dir.'/'.$group); 
+			@mkdir(forge_get_config('ftp_upload_dir').'/'.$group); 
 		}
 	}
 	if (is_dir($groupdir_prefix."/".$group) == false)
@@ -109,9 +109,9 @@
 		//	Read in the template file
 		//
 		$contents = "";
-		if (is_file ($sys_custom_path . "/project_homepage_template.php") == true)
+		if (is_file (forge_get_config('custom_path') . "/project_homepage_template.php") == true)
 		{
-			$fo = fopen ($sys_custom_path . "/project_homepage_template.php", "r");
+			$fo = fopen (forge_get_config('custom_path') . "/project_homepage_template.php", "r");
 			if ($fo)
 			{
 				while (!feof ($fo))
@@ -124,7 +124,7 @@
 		if (strlen ($contents) <= 0)
 		{
 			$contents = '<html><head><title>Default page for project not found</title></head><body><p><div align="center">Default page for project not found, please create a homepage for your project.</div></body></html>';
-			$err .= "Project homepage template " . $sys_custom_path . "/project_homepage_template.php not found";
+			$err .= "Project homepage template " . forge_get_config('custom_path') . "/project_homepage_template.php not found";
 		}
 		//
 		//	Change some defaults in the template file

Modified: trunk/gforge/cronjobs/ftp_create_group_access.php
===================================================================
--- trunk/gforge/cronjobs/ftp_create_group_access.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/cronjobs/ftp_create_group_access.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -28,8 +28,8 @@
 
 $users = array();
 
-$chroot_dir = $sys_chroot;
-$ftp_dir = $sys_ftp_upload_dir."/pub/";
+$chroot_dir = forge_get_config('chroot');
+$ftp_dir = forge_get_config('ftp_upload_dir')."/pub/";
 $home_dir = $chroot_dir.$homedir_prefix."/";
 
 

Modified: trunk/gforge/cronjobs/homedirs.php
===================================================================
--- trunk/gforge/cronjobs/homedirs.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/cronjobs/homedirs.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -114,14 +114,14 @@
 foreach($groups as $group) {
 
 	//test if the FTP upload dir exists and create it if not
-	if (!is_dir($sys_ftp_upload_dir)) {
-		@mkdir($sys_ftp_upload_dir,0755,true);
+	if (!is_dir(forge_get_config('ftp_upload_dir'))) {
+		@mkdir(forge_get_config('ftp_upload_dir'),0755,true);
 	}
 	
 	//create an FTP upload dir for this project
 	if (forge_get_config('use_ftpuploads')) { 
-		if (!is_dir($sys_ftp_upload_dir.'/'.$group)) {
-			@mkdir($sys_ftp_upload_dir.'/'.$group); 
+		if (!is_dir(forge_get_config('ftp_upload_dir').'/'.$group)) {
+			@mkdir(forge_get_config('ftp_upload_dir').'/'.$group); 
 		}
 	}
 
@@ -171,7 +171,7 @@
 		fwrite($fw,$contents);
 		fclose($fw);
 	}
-	system("chown -R $sys_apache_user:$sys_apache_group $groupdir_prefix/$group");
+	system("chown -R forge_get_config('apache_user'):forge_get_config('apache_group') $groupdir_prefix/$group");
 }
 
 

Modified: trunk/gforge/cronjobs/update_filesize.php
===================================================================
--- trunk/gforge/cronjobs/update_filesize.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/cronjobs/update_filesize.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -46,7 +46,7 @@
 
 while ( $fms_filesize_row = db_fetch_array( $fms_filesize_res ) ) {
 
-  $fms_file_path = $sys_upload_dir . '/' .
+  $fms_file_path = forge_get_config('upload_dir') . '/' .
     $fms_filesize_row['unix_group_name'] . '/' .
     $fms_filesize_row['filename'];
 

Modified: trunk/gforge/db/20050127-frs-reorg.php
===================================================================
--- trunk/gforge/db/20050127-frs-reorg.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/db/20050127-frs-reorg.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -58,7 +58,7 @@
 for ($g=0; $g<count($groups); $g++) {
 
 //make group dirs
-	$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$groups[$g]->getUnixName();
+	$newdirlocation = forge_get_config('upload_dir').'/'.$groups[$g]->getUnixName();
 	$cmd="/bin/mkdir $newdirlocation";
 	//echo "\n$cmd";
 	if (!is_dir($newdirlocation)){
@@ -72,7 +72,7 @@
 			continue;
 		}
 		//make package dirs
-		$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$frsps[$p]->Group->getUnixName().'/'.$frsps[$p]->getFileName();
+		$newdirlocation = forge_get_config('upload_dir').'/'.$frsps[$p]->Group->getUnixName().'/'.$frsps[$p]->getFileName();
 		$cmd="/bin/mkdir $newdirlocation";
 		//echo "\n$cmd";
 		if (!is_dir($newdirlocation)){
@@ -86,7 +86,7 @@
 				continue;
 			}
 			//make release dirs
-			$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$frsrs[$r]->FRSPackage->Group->getUnixName().'/'.$frsrs[$r]->FRSPackage->getFileName().'/'.$frsrs[$r]->getFileName();
+			$newdirlocation = forge_get_config('upload_dir').'/'.$frsrs[$r]->FRSPackage->Group->getUnixName().'/'.$frsrs[$r]->FRSPackage->getFileName().'/'.$frsrs[$r]->getFileName();
 			$cmd="/bin/mkdir $newdirlocation";
 			//echo "\n$cmd";
 			if (!is_dir($newdirlocation)){
@@ -98,8 +98,8 @@
 				if (!is_object($frsfs[$f])) {
 					continue;
 				}
-				$olddirlocation = $GLOBALS['sys_upload_dir'].'/'.$frsfs[$f]->FRSRelease->FRSPackage->Group->getUnixName().'/'.$frsfs[$f]->getName();
-				$newdirlocation = $GLOBALS['sys_upload_dir'].'/'.$frsfs[$f]->FRSRelease->FRSPackage->Group->getUnixName().'/'.$frsfs[$f]->FRSRelease->FRSPackage->getFileName().'/'.$frsfs[$f]->FRSRelease->getFileName().'/';
+				$olddirlocation = forge_get_config('upload_dir').'/'.$frsfs[$f]->FRSRelease->FRSPackage->Group->getUnixName().'/'.$frsfs[$f]->getName();
+				$newdirlocation = forge_get_config('upload_dir').'/'.$frsfs[$f]->FRSRelease->FRSPackage->Group->getUnixName().'/'.$frsfs[$f]->FRSRelease->FRSPackage->getFileName().'/'.$frsfs[$f]->FRSRelease->getFileName().'/';
 				if (!is_file($newdirlocation.'/'.$frsfs[$f]->getName())) {
 					$cmd="/bin/mv $olddirlocation $newdirlocation";
 					//echo "\n$cmd";
@@ -112,7 +112,7 @@
 	}
 }
 
-$cmd = '/bin/chown -R '.$GLOBALS["sys_apache_user"].':'.$GLOBALS["sys_apache_group"].' '.$GLOBALS['sys_upload_dir'];
+$cmd = '/bin/chown -R '.forge_get_config('apache_user').':'.forge_get_config('apache_group').' '.forge_get_config('upload_dir');
 exec($cmd,$out);
 
 echo "SUCCESS";

Modified: trunk/gforge/plugins/cvstracker/common/cvstrackerPlugin.class.php
===================================================================
--- trunk/gforge/plugins/cvstracker/common/cvstrackerPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/cvstracker/common/cvstrackerPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -165,19 +165,19 @@
 	*
 	*/
 	function addCvsTrackerToFile($group, $path) {
-		global $sys_plugins_path, $cvs_binary_version;
+		global  $cvs_binary_version;
 		
 		$FOut = fopen($path, "a");
 		if($FOut) {		
 			fwrite($FOut, "# BEGIN added by gforge-plugin-cvstracker\n");
 			if ( $cvs_binary_version == "1.12" ) {
 				$Line = "ALL ( php -q -d include_path=".ini_get('include_path').
-					" ".$sys_plugins_path."/cvstracker/bin/post.php
+					" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php
  %r %p %{sVv} )\n";
 			}
 			if ( $cvs_binary_version == "1.11") {
 				$Line = "ALL ( php -q -d include_path=".ini_get('include_path').
-					" ".$sys_plugins_path."/cvstracker/bin/post.php
+					" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php
  ".$group->getUnixName()." %{sVv} )\n";
 			}
 			fwrite($FOut,$Line);
@@ -193,16 +193,16 @@
 	*	return array with the loginfo lines.
 	*/
 	function getCvsTrackerLogInfoLines() {
-		global $sys_plugins_path, $cvs_binary_version;
+		global  $cvs_binary_version;
 		$array=array();
 		$array[]="# BEGIN added by gforge-plugin-cvstracker\n";
 		if ( $cvs_binary_version == "1.11" ) {
 				$array[] = "ALL ( php -q -d include_path=".ini_get('include_path').
-					" ".$sys_plugins_path."/cvstracker/bin/post.php
+					" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php
  ".$group->getUnixName()." %{sVv} )\n";
 		}else { //it's version 1.12
 			$array[] = "ALL ( php -q -d include_path=".ini_get('include_path').
-			" ".$sys_plugins_path."/cvstracker/bin/post.php
+			" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php
  %r %p %{sVv} )\n";
 		}			
 		$array[]= "# END added by gforge-plugin-cvstracker\n";

Modified: trunk/gforge/plugins/extratabs/common/extratabs-init.php
===================================================================
--- trunk/gforge/plugins/extratabs/common/extratabs-init.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/extratabs/common/extratabs-init.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,6 +1,6 @@
 <?php
 
-require_once ($GLOBALS['sys_plugins_path'].'/extratabs/common/ExtraTabsPlugin.class.php') ;
+require_once (forge_get_config('plugins_path').'/extratabs/common/ExtraTabsPlugin.class.php') ;
 
 $ExtraTabsPluginObject = new ExtraTabsPlugin ;
 

Modified: trunk/gforge/plugins/globalsearch/common/globalsearch-init.php
===================================================================
--- trunk/gforge/plugins/globalsearch/common/globalsearch-init.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/globalsearch/common/globalsearch-init.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,6 +1,6 @@
 <?php
 
-require_once ($GLOBALS['sys_plugins_path'].'/globalsearch/common/GlobalsearchPlugin.class.php') ;
+require_once (forge_get_config('plugins_path').'/globalsearch/common/GlobalsearchPlugin.class.php') ;
 
 $globalSearchPluginObject = new globalSearchPlugin ;
 

Modified: trunk/gforge/plugins/globalsearch/www/edit_assoc_sites.php
===================================================================
--- trunk/gforge/plugins/globalsearch/www/edit_assoc_sites.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/globalsearch/www/edit_assoc_sites.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -27,7 +27,7 @@
 require_once $gfwww.'include/pre.php';
 
 session_require(array('group'=>'1','admin_flags'=>'A'));
-include_once($GLOBALS['sys_plugins_path'].'/globalsearch/common/globalsearch_edit_utils.php');
+include_once(forge_get_config('plugins_path').'/globalsearch/common/globalsearch_edit_utils.php');
 
 $HTML->header(array('title'=>_('Edit associated forges for global search')));
 

Modified: trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.php
===================================================================
--- trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/mediawiki/cronjobs/create-wikis.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -54,8 +54,8 @@
 		"$sys_opt_path/plugins/mediawiki/etc/plugins/mediawiki/ProjectSettings.template.php";
 
 # Owner of files - apache
-$file_owner = $sys_apache_user.':'.$sys_apache_group;
-if (empty($sys_apache_user) || empty($sys_apache_group)) {
+$file_owner = forge_get_config('apache_user').':'.forge_get_config('apache_group');
+if (forge_get_config('apache_user' == '') || forge_get_config('apache_group') == '') {
 	$err =  "Error: sys_apache_user Is Not Set Or sys_apache_group Is Not Set!";
 	cron_debug($err);
 	cron_entry(23,$err);

Modified: trunk/gforge/plugins/mediawiki/etc/plugins/mediawiki/LocalSettings.php
===================================================================
--- trunk/gforge/plugins/mediawiki/etc/plugins/mediawiki/LocalSettings.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/mediawiki/etc/plugins/mediawiki/LocalSettings.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -85,11 +85,11 @@
 $GLOBALS['sys_dbname'] = $sys_dbname ;
 $GLOBALS['sys_dbuser'] = $sys_dbuser ;
 $GLOBALS['sys_dbpasswd'] = $sys_dbpasswd ;
-$GLOBALS['sys_plugins_path'] = $sys_plugins_path ;
+$GLOBALS['sys_plugins_path'] = forge_get_config('plugins_path') ;
 $GLOBALS['sys_urlprefix'] = $sys_urlprefix ;
 $GLOBALS['sys_use_ssl'] = forge_get_config('use_ssl') ;
 $GLOBALS['sys_default_domain'] = forge_get_config('web_host') ;
-$GLOBALS['sys_custom_path'] = $sys_custom_path ;
+$GLOBALS['sys_custom_path'] = forge_get_config('custom_path') ;
 $GLOBALS['gfwww'] = $gfwww ;
 $GLOBALS['gfplugins'] = $gfplugins ;
 $GLOBALS['sys_lang'] = forge_get_config('default_language') ;

Modified: trunk/gforge/plugins/projectlabels/common/projectlabels-init.php
===================================================================
--- trunk/gforge/plugins/projectlabels/common/projectlabels-init.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/projectlabels/common/projectlabels-init.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,6 +1,6 @@
 <?php
 
-require_once ($GLOBALS['sys_plugins_path'].'/projectlabels/common/ProjectLabelsPlugin.class') ;
+require_once (forge_get_config('plugins_path').'/projectlabels/common/ProjectLabelsPlugin.class') ;
 
 $ProjectLabelsPluginObject = new ProjectLabelsPlugin ;
 

Modified: trunk/gforge/plugins/quota_management/www/quota.php
===================================================================
--- trunk/gforge/plugins/quota_management/www/quota.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/quota_management/www/quota.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -99,9 +99,9 @@
 }
 
 // disk space size
-$chroot_dir = $sys_chroot;
-$ftp_dir = $sys_ftp_upload_dir."/pub/";
-$upload_dir = $sys_upload_dir;
+$chroot_dir = forge_get_config('chroot');
+$ftp_dir = forge_get_config('ftp_upload_dir')."/pub/";
+$upload_dir = forge_get_config('upload_dir');
 $group_dir = $chroot_dir.$groupdir_prefix."/";
 $cvs_dir = $chroot_dir.$cvsdir_prefix."/";
 $svn_dir = $chroot_dir.$svndir_prefix."/";
@@ -138,7 +138,7 @@
 }
 
 // users disk space size
-$chroot_dir = $sys_chroot;
+$chroot_dir = forge_get_config('chroot');
 $ftp_dir = $chroot_dir."/home/users/";
 $users = array();
 $res_db = db_query_params ('SELECT user_id, user_name, realname, unix_status FROM users ORDER BY user_id ',

Modified: trunk/gforge/plugins/quota_management/www/quota_project.php
===================================================================
--- trunk/gforge/plugins/quota_management/www/quota_project.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/quota_management/www/quota_project.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -119,9 +119,9 @@
 $quota_tot_1 = 0;
 $quota_tot_scm = 0;
 
-$upload_dir = $sys_upload_dir .  $group->getUnixName();
-$chroot_dir = $sys_chroot;
-$ftp_dir = $sys_ftp_upload_dir."/pub/".$group->getUnixName();
+$upload_dir = forge_get_config('upload_dir') .  $group->getUnixName();
+$chroot_dir = forge_get_config('chroot');
+$ftp_dir = forge_get_config('ftp_upload_dir')."/pub/".$group->getUnixName();
 $group_dir = $chroot_dir.$groupdir_prefix . "/" . $group->getUnixName();
 $cvs_dir = $chroot_dir.$cvsdir_prefix . "/" . $group->getUnixName();
 $svn_dir = $chroot_dir.$svndir_prefix . "/" . $group->getUnixName();

Modified: trunk/gforge/plugins/scmarch/common/ArchPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmarch/common/ArchPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmarch/common/ArchPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -35,7 +35,7 @@
 		if (isset ($arch_root)) {
 			$this->arch_root = $arch_root;
 		} else {
-			$this->arch_root = $GLOBALS['sys_chroot'].'/scmrepos/arch' ;
+			$this->arch_root = forge_get_config('chroot').'/scmrepos/arch' ;
 		}
 
 		$this->register () ;

Modified: trunk/gforge/plugins/scmarch/etc/plugins/scmarch/config.php
===================================================================
--- trunk/gforge/plugins/scmarch/etc/plugins/scmarch/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmarch/etc/plugins/scmarch/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,7 +1,7 @@
 <?php
  
 $default_arch_server = forge_get_config('scm_host');
-// $arch_root = $GLOBALS['sys_chroot'].'/scmrepos/arch' ;
+// $arch_root = forge_get_config('chroot').'/scmrepos/arch' ;
 
 // Local Variables:
 // mode: php

Modified: trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmbzr/common/BzrPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -38,7 +38,7 @@
 		if (isset ($bzr_root)) {
 			$this->bzr_root = $bzr_root;
 		} else {
-			$this->bzr_root = $GLOBALS['sys_chroot'].'/scmrepos/bzr' ;
+			$this->bzr_root = forge_get_config('chroot').'/scmrepos/bzr' ;
 		}
 
 		$this->main_branch_names = array () ;

Modified: trunk/gforge/plugins/scmbzr/etc/plugins/scmbzr/config.php
===================================================================
--- trunk/gforge/plugins/scmbzr/etc/plugins/scmbzr/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmbzr/etc/plugins/scmbzr/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,7 +1,7 @@
 <?php
  
 $default_bzr_server = forge_get_config('scm_host');
-// $bzr_root = $GLOBALS['sys_chroot'].'/scmrepos/bzr' ;
+// $bzr_root = forge_get_config('chroot').'/scmrepos/bzr' ;
 
 // Local Variables:
 // mode: php

Modified: trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -41,7 +41,7 @@
 		} elseif ($cvsdir_prefix) {
 			$this->cvs_root = $cvsdir_prefix;
 		} else {
-			$this->cvs_root = $GLOBALS['sys_chroot'].'/scmrepos/cvs' ;
+			$this->cvs_root = forge_get_config('chroot').'/scmrepos/cvs' ;
 		} 
 
 		$this->register () ;

Modified: trunk/gforge/plugins/scmcvs/cronjobs/cvs.php
===================================================================
--- trunk/gforge/plugins/scmcvs/cronjobs/cvs.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmcvs/cronjobs/cvs.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -142,7 +142,7 @@
  */
 function add_sync_mail($unix_group_name) {
 
-	global  $cvsdir_prefix, $cvs_binary_version,$sys_plugins_path;
+	global  $cvsdir_prefix, $cvs_binary_version;
 	$loginfo_file=$cvsdir_prefix.'/'.$unix_group_name.'/CVSROOT/loginfo';
 
 	if (!$loginfo_file) {
@@ -155,11 +155,11 @@
 //		echo $unix_group_name.":Syncmail not found in loginfo.Adding\n";
 		if ( $cvs_binary_version == "1.11" ) {
 			$pathsyncmail = "DEFAULT ".
-				$sys_plugins_path."/cvssyncmail/bin/syncmail -u %{sVv} ".
+				forge_get_config('plugins_path')."/cvssyncmail/bin/syncmail -u %{sVv} ".
 				$unix_group_name."-commits@".forge_get_config('lists_host');
 		} else { //it's 1.12
 			$pathsyncmail = "DEFAULT ".
-				$sys_plugins_path."/cvssyncmail/bin/syncmail -u %p %{sVv} ".
+				forge_get_config('plugins_path')."/cvssyncmail/bin/syncmail -u %p %{sVv} ".
 				$unix_group_name."-commits@".forge_get_config('lists_host');
 		}
 		$content = "\n#BEGIN Added by cvs.php script\n".
@@ -182,7 +182,7 @@
  *
  */
 function add_cvstracker($unix_group_name) {
-	global $cvsdir_prefix, $sys_plugins_path, $cvs_binary_version;
+	global $cvsdir_prefix, $cvs_binary_version;
 	$loginfo_file=$cvsdir_prefix.'/'.$unix_group_name.'/CVSROOT/loginfo';
 
 	if (!$loginfo_file) {
@@ -195,11 +195,11 @@
 		$content = "\n# BEGIN added by gforge-plugin-cvstracker";
 		if ( $cvs_binary_version == "1.11" ) {
 			$content .= "\nALL ( php -q -d include_path=".ini_get('include_path').
-				" ".$sys_plugins_path."/cvstracker/bin/post.php
+				" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php
  ".$unix_group_name." %{sVv} )";
 		} else { //it's version 1.12
 			$content .= "\nALL ( php -q -d include_path=".ini_get('include_path').
-				" ".$sys_plugins_path."/cvstracker/bin/post.php
+				" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php
  %r %p %{sVv} )";
 		}
 		$content .= "\n# END added by gforge-plugin-cvstracker";
@@ -258,12 +258,12 @@
 		if ( $cvs_binary_version == "1.11" ) {
 			$aclcheck = "\n#BEGIN adding cvs acl check".
 				"\nALL php -q -d include_path=".ini_get('include_path').
-					" ".$GLOBALS['sys_plugins_path']."/scmcvs/bin/aclcheck.php ".$cvsdir_prefix."/".$unix_group_name.
+					" ".forge_get_config('plugins_path')."/scmcvs/bin/aclcheck.php ".$cvsdir_prefix."/".$unix_group_name.
 				"\n#END adding cvs acl check\n";
 		} else { //it's version 1.12
 			$aclcheck = "\n#BEGIN adding cvs acl check".
 				"\nALL php -q -d include_path=".ini_get('include_path').
-					" ".$GLOBALS['sys_plugins_path']."/scmcvs/bin/aclcheck.php %r %p ".
+					" ".forge_get_config('plugins_path')."/scmcvs/bin/aclcheck.php %r %p ".
 				"\n#END adding cvs acl check\n";
 		}
 

Modified: trunk/gforge/plugins/scmcvs/cronjobs/ftp_create.php
===================================================================
--- trunk/gforge/plugins/scmcvs/cronjobs/ftp_create.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmcvs/cronjobs/ftp_create.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -48,7 +48,7 @@
 	foreach($groups as $group) {
 	
 		//create an FTP upload dir for this project
-		$destdir = $sys_ftp_upload_dir.'/'.$group;
+		$destdir = forge_get_config('ftp_upload_dir').'/'.$group;
 		if (util_is_root_dir($destdir)) {
 			$err .= "Trying to access root directory\n";
 			continue;
@@ -65,11 +65,11 @@
 				$err .= 'Could not chmod dir: '.$destdir."\n";
 				continue;
 			} 
-			if (!@chown($destdir, $sys_apache_user)) {
+			if (!@chown($destdir, forge_get_config('apache_user'))) {
 				$err .= 'Could not chown dir: '.$destdir."\n";
 				continue;
 			} 
-			if (!@chgrp($destdir, $sys_apache_group)) {
+			if (!@chgrp($destdir, forge_get_config('apache_group'))) {
 				$err .= 'Could not chgrp dir: '.$destdir."\n";
 				continue;
 			} 

Modified: trunk/gforge/plugins/scmcvs/cronjobs/usergroup.php
===================================================================
--- trunk/gforge/plugins/scmcvs/cronjobs/usergroup.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmcvs/cronjobs/usergroup.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -296,7 +296,7 @@
 	$gmembers = util_result_column_to_array($resusers,'user_name');
 	if ($enable_pserver) $gmembers[] = 'anonymous';
 	if (!$project->enableAnonSCM()) {
-		$gmembers[] = $sys_apache_user;
+		$gmembers[] = forge_get_config('apache_user');
 	}
 	
 	$line .= implode(',', $gmembers);

Modified: trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php
===================================================================
--- trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmcvs/etc/plugins/scmcvs/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -4,7 +4,7 @@
 $cvs_binary_version='1.12';
 $use_ssl=false;
 $GLOBALS['cvs_binary_version']=$cvs_binary_version;
-// $cvs_root = $GLOBALS['sys_chroot'].'/scmrepos/cvs' ;
+// $cvs_root = forge_get_config('chroot').'/scmrepos/cvs' ;
 
 // Local Variables:
 // mode: php

Modified: trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmdarcs/common/DarcsPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -38,7 +38,7 @@
 		if (isset ($darcs_root)) {
 			$this->darcs_root = $darcs_root;
 		} else {
-			$this->darcs_root = $GLOBALS['sys_chroot'].'/scmrepos/darcs' ;
+			$this->darcs_root = forge_get_config('chroot').'/scmrepos/darcs' ;
 		}
 		
 		$this->register () ;

Modified: trunk/gforge/plugins/scmdarcs/etc/plugins/scmdarcs/config.php
===================================================================
--- trunk/gforge/plugins/scmdarcs/etc/plugins/scmdarcs/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmdarcs/etc/plugins/scmdarcs/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,7 +1,7 @@
 <?php
  
 $default_darcs_server = forge_get_config('scm_host');
-// $darcs_root = $GLOBALS['sys_chroot'].'/scmrepos/darcs' ;
+// $darcs_root = forge_get_config('chroot').'/scmrepos/darcs' ;
 
 // Local Variables:
 // mode: php

Modified: trunk/gforge/plugins/scmgit/common/GitPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmgit/common/GitPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmgit/common/GitPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -39,7 +39,7 @@
 		if (isset ($git_root)) {
 			$this->git_root = $git_root;
 		} else {
-			$this->git_root = $GLOBALS['sys_chroot'].'/scmrepos/git' ;
+			$this->git_root = forge_get_config('chroot').'/scmrepos/git' ;
 		}
 
 		$this->register () ;

Modified: trunk/gforge/plugins/scmgit/etc/plugins/scmgit/config.php
===================================================================
--- trunk/gforge/plugins/scmgit/etc/plugins/scmgit/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmgit/etc/plugins/scmgit/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,7 +1,7 @@
 <?php
  
 $default_git_server = forge_get_config('scm_host');
-// $git_root = $GLOBALS['sys_chroot'].'/scmrepos/git' ;
+// $git_root = forge_get_config('chroot').'/scmrepos/git' ;
 
 // Local Variables:
 // mode: php

Modified: trunk/gforge/plugins/scmhg/common/HgPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmhg/common/HgPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmhg/common/HgPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -35,7 +35,7 @@
 		if (isset ($hg_root)) {
 			$this->hg_root = $hg_root;
 		} else {
-			$this->hg_root = $GLOBALS['sys_chroot'].'/scmrepos/hg' ;
+			$this->hg_root = forge_get_config('chroot').'/scmrepos/hg' ;
 		}
 		
 		$this->register () ;

Modified: trunk/gforge/plugins/scmhg/etc/plugins/scmhg/config.php
===================================================================
--- trunk/gforge/plugins/scmhg/etc/plugins/scmhg/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmhg/etc/plugins/scmhg/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -1,7 +1,7 @@
 <?php
  
 $default_hg_server = forge_get_config('scm_host');
-// $hg_root = $GLOBALS['sys_chroot'].'/scmrepos/hg' ;
+// $hg_root = forge_get_config('chroot').'/scmrepos/hg' ;
 
 // Local Variables:
 // mode: php

Modified: trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmsvn/common/SVNPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -42,7 +42,7 @@
 		if (isset ($svn_root)) {
 			$this->svn_root = $svn_root;
 		} else {
-			$this->svn_root = $GLOBALS['sys_chroot'].'/scmrepos/svn' ;
+			$this->svn_root = forge_get_config('chroot').'/scmrepos/svn' ;
 		}
 
 		$this->register () ;
@@ -216,7 +216,7 @@
 				system ("chmod -R g+wX,o-rwx $repo") ;
 			}
 		} else {
-			$unix_user = $GLOBALS['sys_apache_user'];
+			$unix_user = forge_get_config('apache_user');
 			system ("chown -R $unix_user:$unix_group $repo") ;
 			if ($project->enableAnonSCM()) {
 				system ("chmod -R g+wX,o+rX-w $repo") ;

Modified: trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php
===================================================================
--- trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/scmsvn/etc/plugins/scmsvn/config.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -6,7 +6,7 @@
 $use_ssh = false;
 $use_dav = true;
 $use_ssl = true;
-// $svn_root = $GLOBALS['sys_chroot'].'/scmrepos/svn' ;
+// $svn_root = forge_get_config('chroot').'/scmrepos/svn' ;
 
 $svn_bin = "/usr/bin/svn";
 

Modified: trunk/gforge/plugins/svntracker/common/svntrackerPlugin.class.php
===================================================================
--- trunk/gforge/plugins/svntracker/common/svntrackerPlugin.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/svntracker/common/svntrackerPlugin.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -158,19 +158,19 @@
 	*
 	*/
 	/*function addCvsTrackerToFile($path) {
-		global $sys_plugins_path, $cvs_binary_version;
+		global  $cvs_binary_version;
 		
 		$FOut = fopen($path, "a");
 		if($FOut) {
 			fwrite($FOut, "# BEGIN added by gforge-plugin-cvstracker\n");
 			if ( $cvs_binary_version == "1.12" ) {
 				$Line = "ALL ( php -q -d include_path=".ini_get('include_path').
-					" ".$sys_plugins_path."/cvstracker/bin/post.php".
+					" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php".
 					" %r %p %{sVv} )\n";
 			}
 			if ( $cvs_binary_version == "1.11") {
 				$Line = "ALL ( php -q -d include_path=".ini_get('include_path').
-					" ".$sys_plugins_path."/cvstracker/bin/post.php".
+					" ".forge_get_config('plugins_path')."/cvstracker/bin/post.php".
 					" %r %{sVv} )\n";
 			}
 			fwrite($FOut,$Line);

Modified: trunk/gforge/plugins/webcalendar/script/webcalendar-init.php
===================================================================
--- trunk/gforge/plugins/webcalendar/script/webcalendar-init.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/webcalendar/script/webcalendar-init.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -17,7 +17,7 @@
 user_inc: user.php
 ?>" ;
 
-$handle = fopen($sys_plugins_path . '/' . $pluginname . "/www/includes/settings.php", "w");
+$handle = fopen(forge_get_config('plugins_path') . '/' . $pluginname . "/www/includes/settings.php", "w");
 fwrite($handle,$fichier_conf);
 fclose($handle);
 

Modified: trunk/gforge/plugins/wiki/cronjobs/create_groups.php
===================================================================
--- trunk/gforge/plugins/wiki/cronjobs/create_groups.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/plugins/wiki/cronjobs/create_groups.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -13,7 +13,7 @@
 require $gfcommon.'include/cron_utils.php';
 
 //	Owner of files - apache
-$file_owner=$sys_apache_user.':'.$sys_apache_group;
+$file_owner=forge_get_config('apache_user').':'.forge_get_config('apache_group');
 
 //	Whether to separate directories by first letter like /m/mygroup /a/apple
 $first_letter = false;
@@ -42,7 +42,7 @@
 
 $err = "Creating Groups at ". $upload_path."\n";
 
-if (empty($sys_apache_user) || empty($sys_apache_group)) {
+if (forge_get_config('apache_user') == '' || forge_get_config('apache_group') == '') {
 	$err .=  "Error! sys_apache_user Is Not Set Or sys_apache_group Is Not Set!";
 	echo $err;
 	cron_entry(23,$err);

Modified: trunk/gforge/www/account/login.php
===================================================================
--- trunk/gforge/www/account/login.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/account/login.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -121,7 +121,7 @@
 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
 <input type="hidden" name="return_to" value="<?php echo htmlspecialchars(stripslashes($return_to)); ?>" />
 <p>
-<?php if ($GLOBALS['sys_require_unique_email']) {
+<?php if (forge_get_config('require_unique_email')) {
 	echo _('Login name or email address');
 } else {
 	echo _('Login name:');

Modified: trunk/gforge/www/account/pending-resend.php
===================================================================
--- trunk/gforge/www/account/pending-resend.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/account/pending-resend.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -28,7 +28,7 @@
 	$loginname = getStringFromRequest('loginname');
 
 	$u = user_get_object_by_name($loginname);
-	if (!$u && $GLOBALS['sys_require_unique_email']) {
+	if (!$u && forge_get_config('require_unique_email')) {
 		$u = user_get_object_by_email ($loginname);
 	}
 	if (!$u || !is_object($u)) {
@@ -59,7 +59,7 @@
 }
 
 $HTML->header(array('title'=>'Pending-resend'));
-if ($GLOBALS['sys_require_unique_email']) {
+if (forge_get_config('require_unique_email')) {
 	echo _('Fill in a user name or email address and click \'Submit\' to resend the confirmation email.');
 } else {
 	echo _('Fill in a user name and click \'Submit\' to resend the confirmation email.');
@@ -68,7 +68,7 @@
 
 <form action="<?php echo util_make_url('/account/pending-resend.php'); ?>" method="post">
 <p><?php 
-if ($GLOBALS['sys_require_unique_email']) {
+if (forge_get_config('require_unique_email')) {
 	echo _('Login name or email address:');
 } else {
 	echo _('Login name:'); 

Modified: trunk/gforge/www/account/register.php
===================================================================
--- trunk/gforge/www/account/register.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/account/register.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -113,7 +113,7 @@
 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/>
 <p>
 <?php
-if ($GLOBALS['sys_require_unique_email']) {
+if (forge_get_config('require_unique_email')) {
 	echo _('Login Name (no uppercase letters; leave empty to have it generated automatically):');
 } else {
 	echo _('Login Name (do not use uppercase letters):'); echo utils_requiredField();

Modified: trunk/gforge/www/account/verify.php
===================================================================
--- trunk/gforge/www/account/verify.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/account/verify.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -41,7 +41,7 @@
 	}
 
 	$u = user_get_object_by_name($loginname);
-	if (!$u && $GLOBALS['sys_require_unique_email']) {
+	if (!$u && forge_get_config('require_unique_email')) {
 		$u = user_get_object_by_email ($loginname);
 	}
 	if (!$u || !is_object($u)) {
@@ -95,7 +95,7 @@
 <form action="<?php echo util_make_url('/account/verify.php'); ?>" method="post">
 
 <p><?php 
-if ($GLOBALS['sys_require_unique_email']) {
+if (forge_get_config('require_unique_email')) {
 	echo _('Login name or email address:');
 } else {
 	echo _('Login name:'); 

Modified: trunk/gforge/www/admin/pluginman.php
===================================================================
--- trunk/gforge/www/admin/pluginman.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/admin/pluginman.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -92,7 +92,7 @@
 			$installdir = $plugin->getInstallDir();
 			
 			// Remove the symbolic links made if plugin has a www.
-			if (is_dir($sys_plugins_path . '/' . $pluginname . '/www')) { // if the plugin has a www dir delete the link to it
+			if (is_dir(forge_get_config('plugins_path') . '/' . $pluginname . '/www')) { // if the plugin has a www dir delete the link to it
 				if (file_exists('../'.$installdir)) {
 					$result = unlink('../'.$installdir);
 					if (!$result) {
@@ -124,32 +124,32 @@
 			$installdir = $plugin->getInstallDir();
 
 			// Create a symbolic links to plugins/<plugin>/www (if directory exists).
-			if (is_dir($sys_plugins_path . '/' . $pluginname . '/www')) { // if the plugin has a www dir make a link to it
+			if (is_dir(forge_get_config('plugins_path') . '/' . $pluginname . '/www')) { // if the plugin has a www dir make a link to it
 				// The apache group or user should have write perms the www/plugins folder...
 				if (!is_link('../'.$installdir)) {
-					$code = symlink($sys_plugins_path . '/' . $pluginname . '/www', '../'.$installdir); 
+					$code = symlink(forge_get_config('plugins_path') . '/' . $pluginname . '/www', '../'.$installdir); 
 					if (!$code) {
-						$feedback .= '<br />['.'../'.$installdir.'->'.$sys_plugins_path . '/' . $pluginname . '/www]';
+						$feedback .= '<br />['.'../'.$installdir.'->'.forge_get_config('plugins_path') . '/' . $pluginname . '/www]';
 						$feedback .= _('<br />Soft link to www couldn\'t be created. Check the write permissions for apache in gforge www/plugins dir or create the link manually.');
 					}
 				}
 			}
 				
 			// Create a symbolic links to plugins/<plugin>/etc/plugins/<plugin> (if directory exists).
-			if (is_dir($sys_plugins_path . '/' . $pluginname . '/etc/plugins/' . $pluginname)) {
+			if (is_dir(forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname)) {
 				// The apache group or user should have write perms in /etc/gforge/plugins folder...
-				$code = symlink($sys_plugins_path . '/' . $pluginname . '/etc/plugins/' . $pluginname, $sys_etc_path. '/plugins/'.$pluginname); 
+				$code = symlink(forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname, $sys_etc_path. '/plugins/'.$pluginname); 
 				if (!$code) {
-					$feedback .= '<br />['.$sys_etc_path. '/plugins/'.$pluginname.'->'.$sys_plugins_path . '/' . $pluginname . '/etc/plugins/' . $pluginname . ']';
+					$feedback .= '<br />['.$sys_etc_path. '/plugins/'.$pluginname.'->'.forge_get_config('plugins_path') . '/' . $pluginname . '/etc/plugins/' . $pluginname . ']';
 					$feedback .= sprintf(_('<br />Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $pluginname);
 				}
 			}
 
 			if (getStringFromRequest('init')) {
 				// now we're going to check if there's a XX-init.sql file and run it
-				$db_init = $sys_plugins_path . '/' . $pluginname . '/db/' . $pluginname . '-init-pgsql.sql';
+				$db_init = forge_get_config('plugins_path') . '/' . $pluginname . '/db/' . $pluginname . '-init-pgsql.sql';
 				if (!is_file($db_init)) {
-					$db_init = $sys_plugins_path . '/' . $pluginname . '/db/' . $pluginname . '-init.sql';
+					$db_init = forge_get_config('plugins_path') . '/' . $pluginname . '/db/' . $pluginname . '-init.sql';
 					if (!is_file($db_init)) {
 						$db_init = 0;
 					}
@@ -168,8 +168,8 @@
 					}
 				}	
 				//we check for a php script	
-				if (is_file($sys_plugins_path . '/' . $pluginname . '/script/' . $pluginname . '-init.php')) {
-					include($sys_plugins_path . '/' . $pluginname . '/script/' . $pluginname . '-init.php');		
+				if (is_file(forge_get_config('plugins_path') . '/' . $pluginname . '/script/' . $pluginname . '-init.php')) {
+					include(forge_get_config('plugins_path') . '/' . $pluginname . '/script/' . $pluginname . '-init.php');		
 				} else {
 					
 				}
@@ -203,11 +203,11 @@
 
 //get the directories from the plugins dir
 
-$handle = opendir($sys_plugins_path);
+$handle = opendir(forge_get_config('plugins_path'));
 $filelist = array();
 while (($filename = readdir($handle)) !== false) {
 	if ($filename!='..' && $filename!='.' && $filename!=".svn" && $filename!="CVS" &&
-		is_dir($sys_plugins_path.'/'.$filename) &&
+		is_dir(forge_get_config('plugins_path').'/'.$filename) &&
 		!in_array($filename, $plugins_disabled)) {
 
 		$filelist[] = $filename;

Modified: trunk/gforge/www/docman/admin/index.php
===================================================================
--- trunk/gforge/www/docman/admin/index.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/docman/admin/index.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -57,7 +57,7 @@
 $editdoc = getStringFromRequest('editdoc');
 $docid = getIntFromRequest('docid');
 
-$upload_dir = $sys_ftp_upload_dir . "/" . $g->getUnixName();
+$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $g->getUnixName();
 
 //
 //
@@ -327,7 +327,7 @@
 		<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_ftpuploads')) { ?>
-			<!--<strong><?php //printf(_('OR choose one form FTP %1$s'), $sys_ftp_upload_host) ?></strong>--><br />
+			<!--<strong><?php //printf(_('OR choose one form FTP %1$s'), forge_get_config('ftp_upload_host')) ?></strong>--><br />
 			<?php
 			//$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','');

Modified: trunk/gforge/www/docman/new.php
===================================================================
--- trunk/gforge/www/docman/new.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/docman/new.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -37,7 +37,7 @@
 	exit_error('Error',$g->getErrorMessage());	
 }
 
-$upload_dir = $sys_ftp_upload_dir . "/" . $g->getUnixName();
+$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $g->getUnixName();
 
 if (getStringFromRequest('submit')) {
 	$doc_group = getIntFromRequest('doc_group');
@@ -168,7 +168,7 @@
 					echo '
 						<tr>
 							<td>
-							<strong>'.sprintf(_('You can use FTP to upload a new file at %1$s'), $sys_ftp_upload_host).'<br />';
+							<strong>'.sprintf(_('You can use FTP to upload a new file at %1$s'), forge_get_config('ftp_upload_host')).'<br />';
 					echo _('Choose an FTP file instead of uploading:').'</strong>'. utils_requiredField() .'<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','');

Modified: trunk/gforge/www/frs/admin/editrelease.php
===================================================================
--- trunk/gforge/www/frs/admin/editrelease.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/frs/admin/editrelease.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -71,12 +71,12 @@
 	exit_error('Error',$frsr->getErrorMessage());
 }
 
-//we make sure we are not receiving $sys_ftp_upload_dir by POST or GET, to prevent security problems
-global $sys_ftp_upload_dir;
-if (!$sys_ftp_upload_dir) {
+//we make sure we are not receiving forge_get_config('ftp_upload_dir') by POST or GET, to prevent security problems
+
+if (!forge_get_config('ftp_upload_dir')) {
 	exit_error('Error','External sys_ftp_upload_dir detected');
 }
-$upload_dir = $sys_ftp_upload_dir . "/" . $g->getUnixName();
+$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $g->getUnixName();
 
 
 /*
@@ -313,7 +313,7 @@
 <?php echo _("Upload a new file") ?>: <input type="file" name="userfile"  size="30" />
 <?php if (forge_get_config('use_ftpuploads')) {
 	echo '<p>';
-	printf(_('Alternatively, you can use FTP to upload a new file at %1$s'), $sys_ftp_upload_host).'<br />';
+	printf(_('Alternatively, you can use FTP to upload a new file at %1$s'), forge_get_config('ftp_upload_host')).'<br />';
 	echo _('Choose an FTP file instead of uploading:').'<br />';
 	$arr[]='';
 	$ftp_files_arr=array_merge($arr,ls($upload_dir,true));

Modified: trunk/gforge/www/frs/admin/qrs.php
===================================================================
--- trunk/gforge/www/frs/admin/qrs.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/frs/admin/qrs.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -45,7 +45,7 @@
 	exit_permission_denied();
 }
 
-$upload_dir = $sys_ftp_upload_dir . "/" . $g->getUnixName();
+$upload_dir = forge_get_config('ftp_upload_dir') . "/" . $g->getUnixName();
 
 /*
 	Quick file release system , Darrell Brogdon, SourceForge, Aug, 2000
@@ -245,7 +245,7 @@
 		<?php if (forge_get_config('use_ftpuploads')) {
 
 			echo '<p>';
-			printf(_('Alternatively, you can use FTP to upload a new file at %1$s'), $sys_ftp_upload_host).'<br />';
+			printf(_('Alternatively, you can use FTP to upload a new file at %1$s'), forge_get_config('ftp_upload_host')).'<br />';
 			echo _('Choose an FTP file instead of uploading:').'<br />';
 			$arr[]='';
 			$ftp_files_arr=array_merge($arr,ls($upload_dir,true));

Modified: trunk/gforge/www/frs/download.php
===================================================================
--- trunk/gforge/www/frs/download.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/frs/download.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -90,7 +90,7 @@
 	}
 }
 
-$filepath=$sys_upload_dir.'/'.$Group->getUnixName().'/'.$Package->getFileName().'/'.$Release->getFileName().'/'.$File->getName();
+$filepath=forge_get_config('upload_dir').'/'.$Group->getUnixName().'/'.$Package->getFileName().'/'.$Release->getFileName().'/'.$File->getName();
 if (file_exists($filepath)) {
 	Header('Content-disposition: attachment; filename="'.str_replace('"', '', $filename).'"');
 	Header("Content-type: application/binary");

Modified: trunk/gforge/www/include/Layout.class.php
===================================================================
--- trunk/gforge/www/include/Layout.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/include/Layout.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -126,14 +126,14 @@
                 $this->navigation = new Navigation();
                 
 		// determine rootindex
-		if ( file_exists($GLOBALS['sys_custom_path'] . '/index_std.php') ) {
-			$this->rootindex = $GLOBALS['sys_custom_path'] . '/index_std.php';
+		if ( file_exists(forge_get_config('custom_path') . '/index_std.php') ) {
+			$this->rootindex = forge_get_config('custom_path') . '/index_std.php';
 		} else {
 			$this->rootindex = $GLOBALS['gfwww'].'index_std.php';
 		}
 
 		// determine theme{dir,url}
-		$this->themedir = $GLOBALS['sys_themeroot'] . forge_get_config('default_theme') . '/';
+		$this->themedir = forge_get_config('themes_root') . forge_get_config('default_theme') . '/';
 		if (!file_exists ($this->themedir)) {
 			html_error_top(_("Can't find theme directory!"));
 			return;

Modified: trunk/gforge/www/include/pre.php
===================================================================
--- trunk/gforge/www/include/pre.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/include/pre.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -119,7 +119,7 @@
 plugin_hook('after_session_set');
 
 //mandatory login
-if (!session_loggedin() && $sys_force_login == 1 ) {
+if (!session_loggedin() && forge_get_config ('force_login') == 1 ) {
 	$expl_pathinfo = explode('/',getStringFromServer('REQUEST_URI'));
         if (getStringFromServer('REQUEST_URI')!='/' && $expl_pathinfo[1]!='account' && $expl_pathinfo[1]!='export' ) exit_not_logged_in();
 	// Show proj* export even if not logged in when force login
@@ -144,7 +144,7 @@
 //
 //	Include user Theme
 //
-require_once $sys_themeroot.forge_get_config('default_theme').'/Theme.class.php';
+require_once forge_get_config('theme_root').forge_get_config('default_theme').'/Theme.class.php';
 
 $HTML=new Theme();
 

Modified: trunk/gforge/www/soap/frs/frs.php
===================================================================
--- trunk/gforge/www/soap/frs/frs.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/soap/frs/frs.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -504,7 +504,7 @@
 		return new soap_fault ('','getFile',$frsf->getErrorMessage(),$frsf->getErrorMessage());
 	}
 	
-	$file_location = $GLOBALS['sys_upload_dir'].'/'.
+	$file_location = forge_get_config('upload_dir').'/'.
 				$frsf->FRSRelease->FRSPackage->Group->getUnixName().'/'.
 				$frsf->FRSRelease->FRSPackage->getFileName().'/'.
 				$frsf->FRSRelease->getFileName().'/'.

Modified: trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php
===================================================================
--- trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -45,14 +45,14 @@
 	 */
 	function Layout() {
 
-		$this->themeroot=$GLOBALS['sys_themeroot'].forge_get_config('default_theme');
+		$this->themeroot=forge_get_config('themes_root').forge_get_config('default_theme');
 		/* if images directory exists in theme, then use it as imgroot */
 		if (file_exists ($this->themeroot.'/images')){
 			$this->imgroot='/themes/'.forge_get_config('default_theme').'/images/';
 		}
 		// Constructor for parent class...
-		if ( file_exists($GLOBALS['sys_custom_path'] . '/index_std.php') )
-		$this->rootindex = $GLOBALS['sys_custom_path'] . '/index_std.php';
+		if ( file_exists(forge_get_config('custom_path') . '/index_std.php') )
+		$this->rootindex = forge_get_config('custom_path') . '/index_std.php';
 		$this->Error();
 
 	}
@@ -96,7 +96,7 @@
 		 this stylesheet
 		 new stylesheets should use the <themename>.css file
 		 */
-		$theme_cssfile=$GLOBALS['sys_themeroot'].forge_get_config('default_theme').'/css/'.forge_get_config('default_theme').'.css';
+		$theme_cssfile=forge_get_config('themes_root').forge_get_config('default_theme').'/css/'.forge_get_config('default_theme').'.css';
 		if (file_exists($theme_cssfile)){
 			echo '
 <link rel="stylesheet" type="text/css" href="'.util_make_uri ('/themes/'.forge_get_config('default_theme').'/css/'.forge_get_config('default_theme').'.css').'"/>';

Modified: trunk/tests/code/deprecations/DeprecationsTest.php
===================================================================
--- trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-21 16:48:51 UTC (rev 9561)
+++ trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-21 18:06:20 UTC (rev 9562)
@@ -68,6 +68,18 @@
 			       'sys_lists_host',
 			       'sys_scm_host',
 			       'sys_forum_return_domain',
+			       'sys_chroot',
+			       'sys_upload_dir',
+			       'sys_ftp_upload_dir',
+			       'sys_ftp_upload_host',
+			       'sys_apache_user',
+			       'sys_apache_group',
+			       'sys_require_unique_email',
+			       'sys_bcc_all_email_address',
+			       'sys_themeroot',
+			       'sys_force_login',
+			       'sys_custom_path',
+			       'sys_plugins_path',
 			) ;
 
 		$pattern = implode ('|', $vars) ;




More information about the Fusionforge-commits mailing list