[Fusionforge-commits] r9079 - in trunk: gforge/common/include gforge/www/include tests/unit/config

Roland Mas lolando at libremir.placard.fr.eu.org
Mon Mar 15 14:10:07 CET 2010


Author: lolando
Date: 2010-03-15 14:10:07 +0100 (Mon, 15 Mar 2010)
New Revision: 9079

Modified:
   trunk/gforge/common/include/config.php
   trunk/gforge/www/include/pre.php
   trunk/tests/unit/config/ConfigTests.php
Log:
Three more s/fusionforge/forge/ renamings of config-related functions

Modified: trunk/gforge/common/include/config.php
===================================================================
--- trunk/gforge/common/include/config.php	2010-03-15 13:05:20 UTC (rev 9078)
+++ trunk/gforge/common/include/config.php	2010-03-15 13:10:07 UTC (rev 9079)
@@ -102,7 +102,7 @@
 	return $ret ;
 }
 
-function fusionforge_set_vars_from_config () {
+function forge_set_vars_from_config () {
 	$c = FusionForgeConfig::get_instance () ;
 
 	foreach (func_get_args() as $item) {
@@ -125,13 +125,13 @@
 }
 
 
-function fusionforge_define_config_item ($var, $section, $default) {
+function forge_define_config_item ($var, $section, $default) {
 	$c = FusionForgeConfig::get_instance () ;
 
 	return $c->set_value ($section, $var, $default) ;
 }
 
-function fusionforge_read_config_file ($file) {
+function forge_read_config_file ($file) {
 	$c = FusionForgeConfig::get_instance () ;
 
 	return $c->read_config_file ($file) ;

Modified: trunk/gforge/www/include/pre.php
===================================================================
--- trunk/gforge/www/include/pre.php	2010-03-15 13:05:20 UTC (rev 9078)
+++ trunk/gforge/www/include/pre.php	2010-03-15 13:10:07 UTC (rev 9079)
@@ -34,15 +34,15 @@
 require $gfcgfile;
 require $gfcommon.'include/config.php';
 
-fusionforge_define_config_item ('core', 'forge_name', $GLOBALS['sys_name']) ;
-fusionforge_define_config_item ('core', 'user_registration_restricted', $GLOBALS['sys_user_reg_restricted']) ;
+forge_define_config_item ('core', 'forge_name', $GLOBALS['sys_name']) ;
+forge_define_config_item ('core', 'user_registration_restricted', $GLOBALS['sys_user_reg_restricted']) ;
 /* Long-term:
  require_once $gfcommon.'include/FusionForge.class.php';
  $forge = new FusionForge() ;
- fusionforge_define_config_item ('core', 'forge_name', $forge->software_name) ;
- fusionforge_define_config_item ('core', 'user_registration_restricted', false) ;
+ forge_define_config_item ('core', 'forge_name', $forge->software_name) ;
+ forge_define_config_item ('core', 'user_registration_restricted', false) ;
 */
-fusionforge_read_config_file ($gfconfig.'/config.ini') ;
+forge_read_config_file ($gfconfig.'/config.ini') ;
 
 // get constants used for flags or status
 require $gfcommon.'include/constants.php';

Modified: trunk/tests/unit/config/ConfigTests.php
===================================================================
--- trunk/tests/unit/config/ConfigTests.php	2010-03-15 13:05:20 UTC (rev 9078)
+++ trunk/tests/unit/config/ConfigTests.php	2010-03-15 13:10:07 UTC (rev 9079)
@@ -18,14 +18,14 @@
 	 */
 	public function testBasicConfig()
 	{
-		fusionforge_define_config_item ('forge_name', 'core', 'default') ;
-		fusionforge_define_config_item ('user_registration_restricted', 'core', true) ;
+		forge_define_config_item ('forge_name', 'core', 'default') ;
+		forge_define_config_item ('user_registration_restricted', 'core', true) ;
 
 		$this->assertEquals('default', forge_get_config ('forge_name'));
 		$this->assertEquals('default', forge_get_config ('forge_name', 'core'));
 		$this->assertTrue(forge_get_config ('user_registration_restricted'));
 
-		fusionforge_read_config_file (dirname(__FILE__) . '/../../../gforge/etc/config.ini') ;
+		forge_read_config_file (dirname(__FILE__) . '/../../../gforge/etc/config.ini') ;
 
 		$this->assertEquals('FusionForge', forge_get_config ('forge_name'));
 		$this->assertEquals('FusionForge', forge_get_config ('forge_name', 'core'));
@@ -35,7 +35,7 @@
 		$this->assertEquals('FusionForge', $arr[0]);
 		$this->assertFalse(!!$arr[1]);
 
-		fusionforge_set_vars_from_config ('forge_name', array ('user_registration_restricted', 'core')) ;
+		forge_set_vars_from_config ('forge_name', array ('user_registration_restricted', 'core')) ;
 		global $forge_name, $core__user_registration_restricted ;
 		$this->assertEquals('FusionForge', $forge_name);
 		$this->assertFalse(!!$core__user_registration_restricted);
@@ -48,13 +48,13 @@
 	public function testMockConfig()
 	{
 		MockConfig::insinuate () ;
-		fusionforge_define_config_item ('forge_name', 'core', 'default') ;
+		forge_define_config_item ('forge_name', 'core', 'default') ;
 
 		$this->assertEquals('core/forge_name', forge_get_config ('forge_name'));
 		$this->assertEquals('core/forge_name', forge_get_config ('forge_name', 'core'));
 
 		MockConfig::cleanup () ;
-		fusionforge_define_config_item ('forge_name', 'core', 'default') ;
+		forge_define_config_item ('forge_name', 'core', 'default') ;
 
 		$this->assertEquals('default', forge_get_config ('forge_name'));
 	}




More information about the Fusionforge-commits mailing list