[Fusionforge-commits] r9596 - in trunk: gforge/common/include gforge/www/register tests/code/deprecations

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


Author: lolando
Date: 2010-04-23 14:52:56 +0200 (Fri, 23 Apr 2010)
New Revision: 9596

Modified:
   trunk/gforge/common/include/config-vars.php
   trunk/gforge/www/register/projectinfo.php
   trunk/tests/code/deprecations/DeprecationsTest.php
Log:
Config API migration: sys_project_reg_restricted

Modified: trunk/gforge/common/include/config-vars.php
===================================================================
--- trunk/gforge/common/include/config-vars.php	2010-04-23 12:43:36 UTC (rev 9595)
+++ trunk/gforge/common/include/config-vars.php	2010-04-23 12:52:56 UTC (rev 9596)
@@ -24,6 +24,7 @@
 
 forge_define_config_item ('forge_name', 'core', $GLOBALS['sys_name']) ;
 forge_define_config_item ('user_registration_restricted', 'core', $GLOBALS['sys_user_reg_restricted']) ;
+forge_define_config_item ('project_registration_restricted', 'core', $GLOBALS['sys_project_reg_restricted']) ;
 forge_define_config_item ('web_host', 'core', $GLOBALS['sys_default_domain']) ;
 forge_define_config_item ('apache_user', 'core', $GLOBALS['sys_apache_user']) ;
 forge_define_config_item ('apache_group', 'core', $GLOBALS['sys_apache_group']) ;

Modified: trunk/gforge/www/register/projectinfo.php
===================================================================
--- trunk/gforge/www/register/projectinfo.php	2010-04-23 12:43:36 UTC (rev 9595)
+++ trunk/gforge/www/register/projectinfo.php	2010-04-23 12:52:56 UTC (rev 9596)
@@ -43,7 +43,7 @@
 //
 //	Test if restricted project registration
 //
-if ($sys_project_reg_restricted) {
+if (forge_get_config('project_registration_restricted')) {
 	session_require(array('group'=>'1','admin_flags'=>'A'),
 			sprintf (_('Project registration is restricted on %s, and only administrators can create new projects.'),
 				 forge_get_config ('forge_name')));

Modified: trunk/tests/code/deprecations/DeprecationsTest.php
===================================================================
--- trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-23 12:43:36 UTC (rev 9595)
+++ trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-23 12:52:56 UTC (rev 9596)
@@ -33,6 +33,7 @@
 	{
 		$vars = array ('sys_name',
 			       'sys_user_reg_restricted',
+			       'sys_project_reg_restricted',
 			       'sys_default_domain',
 			       'sys_scm_tarballs_path',
 			       'sys_scm_snapshots_path',




More information about the Fusionforge-commits mailing list