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

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Apr 27 20:31:48 CEST 2010


Author: lolando
Date: 2010-04-27 20:31:47 +0200 (Tue, 27 Apr 2010)
New Revision: 9606

Modified:
   trunk/gforge/common/include/Jabber.class.php
   trunk/gforge/common/include/config-vars.php
   trunk/gforge/common/include/utils.php
   trunk/gforge/www/account/index.php
   trunk/gforge/www/account/register.php
   trunk/gforge/www/include/pre.php
   trunk/tests/code/deprecations/DeprecationsTest.php
Log:
Config API: jabber-related variables

Modified: trunk/gforge/common/include/Jabber.class.php
===================================================================
--- trunk/gforge/common/include/Jabber.class.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/gforge/common/include/Jabber.class.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -146,10 +146,10 @@
 
 	function Jabber()
 	{
-		$this->server				= $GLOBALS['sys_jabber_server'];
-		$this->port					= $GLOBALS['sys_jabber_port'];
+		$this->server				= forge_get_config('jabber_host');
+		$this->port					= forge_get_config('jabber_port');
 
-		$this->username				= $GLOBALS['sys_jabber_user'];
+		$this->username				= forge_get_config('jabber_user');
 		$this->password				= $GLOBALS['sys_jabber_pass'];
 		$this->resource				= 'home';
 		

Modified: trunk/gforge/common/include/config-vars.php
===================================================================
--- trunk/gforge/common/include/config-vars.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/gforge/common/include/config-vars.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -65,6 +65,10 @@
 forge_define_config_item ('lists_host', 'core', $GLOBALS['sys_lists_host']) ;
 forge_define_config_item ('scm_host', 'core', $GLOBALS['sys_scm_host']) ;
 forge_define_config_item ('forum_return_domain', 'core', $GLOBALS['sys_forum_return_domain']) ;
+forge_define_config_item ('use_jabber', 'core', $GLOBALS['sys_use_jabber']) ;
+forge_define_config_item ('jabber_host', 'core', $GLOBALS['sys_jabber_server']) ;
+forge_define_config_item ('jabber_port', 'core', $GLOBALS['sys_jabber_port']) ;
+forge_define_config_item ('jabber_user', 'core', $GLOBALS['sys_jabber_user']) ;
 // forge_define_config_item ('', 'core', $GLOBALS['sys_']) ;
 
 /* Long-term:

Modified: trunk/gforge/common/include/utils.php
===================================================================
--- trunk/gforge/common/include/utils.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/gforge/common/include/utils.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -237,7 +237,7 @@
 }
 
 function util_send_jabber($to,$subject,$body) {
-	if (!$GLOBALS['sys_use_jabber']) {
+	if (!forge_get_config('use_jabber')) {
 		return;
 	}
 	$JABBER = new Jabber();

Modified: trunk/gforge/www/account/index.php
===================================================================
--- trunk/gforge/www/account/index.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/gforge/www/account/index.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -210,7 +210,7 @@
 </tr>
 
 <?php
-if ($sys_use_jabber) {
+if (forge_get_config('use_jabber')) {
     echo '<tr valign="top">
 <td>'. _('Jabber Address:') .'</td>
 <td>

Modified: trunk/gforge/www/account/register.php
===================================================================
--- trunk/gforge/www/account/register.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/gforge/www/account/register.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -164,7 +164,7 @@
 </p>
 <p>
 <?php
-if ($sys_use_jabber) {
+if (forge_get_config('use_jabber')) {
 	echo _('Jabber Address:').'<br />
 	<input size="30" type="text" name="jabber_address" value="'. 
 	htmlspecialchars($jabber_address) .'" /><br />

Modified: trunk/gforge/www/include/pre.php
===================================================================
--- trunk/gforge/www/include/pre.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/gforge/www/include/pre.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -42,7 +42,7 @@
 
 
 //
-if ($sys_use_jabber) {
+if (forge_get_config('use_jabber')) {
 	require_once $gfcommon.'include/Jabber.class.php';
 }
 

Modified: trunk/tests/code/deprecations/DeprecationsTest.php
===================================================================
--- trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-26 20:22:29 UTC (rev 9605)
+++ trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-27 18:31:47 UTC (rev 9606)
@@ -82,6 +82,10 @@
 			       'sys_force_login',
 			       'sys_custom_path',
 			       'sys_plugins_path',
+			       'sys_use_jabber',
+			       'sys_jabber_user',
+			       'sys_jabber_server',
+			       'sys_jabber_port'
 			) ;
 
 		$pattern = implode ('|', $vars) ;




More information about the Fusionforge-commits mailing list