[Fusionforge-commits] r9608 - in trunk: gforge/common/forum gforge/common/include gforge/common/tracker gforge/cronjobs gforge/www gforge/www/export gforge/www/forum/include gforge/www/news gforge/www/news/admin gforge/www/reporting gforge/www/stats gforge/www/themes/gforge-simple-theme gforge/www/themes/lite gforge/www/tracker/admin tests/code/deprecations

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Apr 27 21:05:30 CEST 2010


Author: lolando
Date: 2010-04-27 21:05:29 +0200 (Tue, 27 Apr 2010)
New Revision: 9608

Modified:
   trunk/gforge/common/forum/Forum.class.php
   trunk/gforge/common/include/Group.class.php
   trunk/gforge/common/include/config-vars.php
   trunk/gforge/common/include/constants.php
   trunk/gforge/common/tracker/ArtifactType.class.php
   trunk/gforge/cronjobs/calculate_user_metric.php
   trunk/gforge/www/export/rss20_news.php
   trunk/gforge/www/export/rss_sfnews.php
   trunk/gforge/www/forum/include/ForumHTML.class.php
   trunk/gforge/www/index_std.php
   trunk/gforge/www/news/admin/index.php
   trunk/gforge/www/news/index.php
   trunk/gforge/www/news/news_utils.php
   trunk/gforge/www/news/submit.php
   trunk/gforge/www/reporting/groupadded.php
   trunk/gforge/www/reporting/groupadded_graph.php
   trunk/gforge/www/reporting/groupcum.php
   trunk/gforge/www/reporting/groupcum_graph.php
   trunk/gforge/www/reporting/index.php
   trunk/gforge/www/reporting/projectact.php
   trunk/gforge/www/reporting/projecttime.php
   trunk/gforge/www/reporting/projecttime_graph.php
   trunk/gforge/www/reporting/rebuild.php
   trunk/gforge/www/reporting/siteact.php
   trunk/gforge/www/reporting/siteact_graph.php
   trunk/gforge/www/reporting/sitetime.php
   trunk/gforge/www/reporting/sitetime_graph.php
   trunk/gforge/www/reporting/sitetimebar.php
   trunk/gforge/www/reporting/sitetimebar_graph.php
   trunk/gforge/www/reporting/timecategory.php
   trunk/gforge/www/reporting/toolspie.php
   trunk/gforge/www/reporting/toolspie_graph.php
   trunk/gforge/www/reporting/trackerpie_graph.php
   trunk/gforge/www/reporting/useract.php
   trunk/gforge/www/reporting/useract_graph.php
   trunk/gforge/www/reporting/useradded.php
   trunk/gforge/www/reporting/useradded_graph.php
   trunk/gforge/www/reporting/usercum.php
   trunk/gforge/www/reporting/usercum_graph.php
   trunk/gforge/www/reporting/usersummary.php
   trunk/gforge/www/reporting/usertime.php
   trunk/gforge/www/reporting/usertime_graph.php
   trunk/gforge/www/stats/graphs.php
   trunk/gforge/www/stats/i18n.php
   trunk/gforge/www/stats/index.php
   trunk/gforge/www/stats/projects.php
   trunk/gforge/www/stats/users_graph.php
   trunk/gforge/www/stats/views_graph.php
   trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php
   trunk/gforge/www/themes/lite/Theme.class.php
   trunk/gforge/www/tracker/admin/form-clonetracker.php
   trunk/tests/code/deprecations/DeprecationsTest.php
Log:
Config API: ids for special groups

Modified: trunk/gforge/common/forum/Forum.class.php
===================================================================
--- trunk/gforge/common/forum/Forum.class.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/common/forum/Forum.class.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -153,8 +153,8 @@
 		// This is a hack to allow non-site-wide-admins to post
 		// news.  The news/submit.php checks for proper permissions.
 		// This needs to be revisited.
-		global $sys_news_group;
-		if ($this->Group->getID() == $sys_news_group) {
+
+		if ($this->Group->getID() == forge_get_config('news_group')) {
 			// Future check will be added.
 
 		} else {

Modified: trunk/gforge/common/include/Group.class.php
===================================================================
--- trunk/gforge/common/include/Group.class.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/common/include/Group.class.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -1370,10 +1370,10 @@
 			$this->setMissingParamsError();
 			return false;
 		}
-		if ($this->getID() == $GLOBALS['sys_news_group'] ||
+		if ($this->getID() == forge_get_config('news_group') ||
 			$this->getID() == 1 ||
-			$this->getID() == $GLOBALS['sys_stats_group'] ||
-			$this->getID() == $GLOBALS['sys_peer_rating_group']) {
+			$this->getID() == forge_get_config('stats_group') ||
+			$this->getID() == forge_get_config('peer_rating_group')) {
 			$this->setError(_('Cannot Delete System Group'));
 			return false;
 		}
@@ -1454,7 +1454,7 @@
 		//
 		//	Delete news
 		//
-		$news_group=&group_get_object($GLOBALS['sys_news_group']);
+		$news_group=&group_get_object(forge_get_config('news_group'));
 		$res = db_query_params ('SELECT forum_id FROM news_bytes WHERE group_id=$1',
 					array ($this->getID())) ;
 		for ($i=0; $i<db_numrows($res); $i++) {

Modified: trunk/gforge/common/include/config-vars.php
===================================================================
--- trunk/gforge/common/include/config-vars.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/common/include/config-vars.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -75,6 +75,10 @@
 forge_define_config_item ('ldap_base_dn', 'core', $GLOBALS['sys_ldap_base_dn']) ;
 forge_define_config_item ('ldap_bind_dn', 'core', $GLOBALS['sys_ldap_bind_dn']) ;
 forge_define_config_item ('ldap_admin_dn', 'core', $GLOBALS['sys_ldap_admin_dn']) ;
+forge_define_config_item ('news_group', 'core', $GLOBALS['sys_news_group']) ;
+forge_define_config_item ('stats_group', 'core', $GLOBALS['sys_stats_group']) ;
+forge_define_config_item ('peer_rating_group', 'core', $GLOBALS['sys_peer_rating_group']) ;
+forge_define_config_item ('template_group', 'core', $GLOBALS['sys_template_group']) ;
 // forge_define_config_item ('', 'core', $GLOBALS['sys_']) ;
 
 /* Long-term:

Modified: trunk/gforge/common/include/constants.php
===================================================================
--- trunk/gforge/common/include/constants.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/common/include/constants.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -67,10 +67,10 @@
 
 /* Groups */
 define('GROUP_IS_MASTER', 1);
-define('GROUP_IS_STATS', $sys_stats_group);
-define('GROUP_IS_NEWS', $sys_news_group);
-define('GROUP_IS_PEER_RATINGS', $sys_peer_rating_group);
-define('GROUP_IS_TEMPLATE', $sys_template_group);
+define('GROUP_IS_STATS', forge_get_config('stats_group'));
+define('GROUP_IS_NEWS', forge_get_config('news_group'));
+define('GROUP_IS_PEER_RATINGS', forge_get_config('peer_rating_group'));
+define('GROUP_IS_TEMPLATE', forge_get_config('template_group'));
 
 /* Admin */
 define('ADMIN_CRONMAN_ROWS', 30);

Modified: trunk/gforge/common/tracker/ArtifactType.class.php
===================================================================
--- trunk/gforge/common/tracker/ArtifactType.class.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/common/tracker/ArtifactType.class.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -644,8 +644,8 @@
 	 *	@return	boolean	true/false on success
 	 */
 	function cloneFieldsFrom($clone_tracker_id) {
-		global $sys_template_group;
-		$g =& group_get_object($sys_template_group);
+
+		$g =& group_get_object(forge_get_config('template_group'));
 		if (!$g || !is_object($g)) {
 			$this->setError('Could Not Get Template Group');
 			return false;

Modified: trunk/gforge/cronjobs/calculate_user_metric.php
===================================================================
--- trunk/gforge/cronjobs/calculate_user_metric.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/cronjobs/calculate_user_metric.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -82,7 +82,7 @@
 WHERE
 user_group.group_id=$1
 AND user_group.admin_flags=$2',
-			array ($sys_peer_rating_group,
+			array (forge_get_config('peer_rating_group'),
 			       'A')) ;
 
 

Modified: trunk/gforge/www/export/rss20_news.php
===================================================================
--- trunk/gforge/www/export/rss20_news.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/export/rss20_news.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -76,7 +76,7 @@
 	print "  <item>\n";
 	print "   <title>".htmlspecialchars($row['summary'])."</title>\n";
 	// if news group, link is main page
-	if ($row['group_id'] != $sys_news_group) {
+	if ($row['group_id'] != forge_get_config('news_group')) {
 		print "   <link>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</link>\n";
 	} else {
 		print "   <link>http://".forge_get_config('web_host')."/</link>\n";
@@ -84,13 +84,13 @@
 	print "   <description>".rss_description($row['details'])."</description>\n";
 	print "   <author>".$row['user_name']."@".forge_get_config('users_host')." (".$row['realname'].")</author>\n";
 	print "   <pubDate>".rss_date($row['post_date'])."</pubDate>\n";
-	if ($row['group_id'] != $sys_news_group) {
+	if ($row['group_id'] != forge_get_config('news_group')) {
 		print "   <guid>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</guid>\n";
 	} else {
 		print "   <guid>http://".forge_get_config('web_host')."/</guid>\n";
 	}
 	// if news group, comment is main page
-	if ($row['group_id'] != $sys_news_group) {
+	if ($row['group_id'] != forge_get_config('news_group')) {
 		print "   <comments>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</comments>\n";
 	} else {
 		print "   <comments>http://".forge_get_config('web_host')."/</comments>\n";

Modified: trunk/gforge/www/export/rss_sfnews.php
===================================================================
--- trunk/gforge/www/export/rss_sfnews.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/export/rss_sfnews.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -82,7 +82,7 @@
 	print "\n <item rdf:about=\"".util_make_url ('/forum/forum.php?forum_id='.$row['forum_id'])."\">\n";
 	print "   <title>".htmlspecialchars($row['summary'])."</title>\n";
 	// if news group, link is main page
-	if ($row['group_id'] != $sys_news_group) {
+	if ($row['group_id'] != forge_get_config('news_group')) {
 		print "   <link>".util_make_url ('/forum/forum.php?forum_id='.$row['forum_id'])."</link>\n";
 	} else {
 		print "   <link>".util_make_url ('/')."</link>\n";

Modified: trunk/gforge/www/forum/include/ForumHTML.class.php
===================================================================
--- trunk/gforge/www/forum/include/ForumHTML.class.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/forum/include/ForumHTML.class.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -25,7 +25,7 @@
 require_once $gfwww.'forum/include/AttachManager.class.php';
 
 function forum_header($params) {
-	global $HTML,$group_id,$forum_name,$forum_id,$sys_news_group,$f,$group_forum_id;
+	global $HTML,$group_id,$forum_name,$forum_id,$f,$group_forum_id;
 
 	if ($group_forum_id) {
 		$forum_id=$group_forum_id;
@@ -41,7 +41,7 @@
 		bastardization for news
 		Show icon bar unless it's a news forum
 	*/
-	if ($group_id == $sys_news_group) {
+	if ($group_id == forge_get_config('news_group')) {
 		//this is a news item, not a regular forum
 		if ($forum_id) {
 			// Show this news item at the top of the page
@@ -86,7 +86,7 @@
 				echo '</p>';
 
 				// display classification
-				if ($params['group'] == $sys_news_group) { 
+				if ($params['group'] == forge_get_config('news_group')) { 
 				   print stripslashes(trove_news_getcatlisting(db_result($result,0,'forum_id'),0,1));
 				} elseif (forge_get_config('use_trove')) {
 				   print stripslashes(trove_getcatlisting($params['group'],0,1));

Modified: trunk/gforge/www/index_std.php
===================================================================
--- trunk/gforge/www/index_std.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/index_std.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -57,7 +57,7 @@
 </ul>
 <?php
 echo $HTML->boxTop(_('Latest News'), 'Latest_News');
-echo news_show_latest($sys_news_group,5,true,false,false,5);
+echo news_show_latest(forge_get_config('news_group'),5,true,false,false,5);
 echo $HTML->boxBottom();
 ?>
 

Modified: trunk/gforge/www/news/admin/index.php
===================================================================
--- trunk/gforge/www/news/admin/index.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/news/admin/index.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -42,7 +42,7 @@
 
 $feedback = '';
 
-if ($group_id && $group_id != $sys_news_group && user_ismember($group_id,'A')) {
+if ($group_id && $group_id != forge_get_config('news_group') && user_ismember($group_id,'A')) {
 	$status = getIntFromRequest('status');
 	$summary = getStringFromRequest('summary');
 	$details = getStringFromRequest('details');
@@ -181,14 +181,14 @@
 	}
 	news_footer(array());
 
-} else if (user_ismember($sys_news_group,'A')) {
+} else if (user_ismember(forge_get_config('news_group'),'A')) {
 	/*
 
 		News uber-user admin pages
 
 		Show all waiting news items except those already rejected.
 
-		Admin members of $sys_news_group (news project) can edit/change/approve news items
+		Admin members of forge_get_config('news_group') (news project) can edit/change/approve news items
 
 	*/
 	if ($post_changes) {

Modified: trunk/gforge/www/news/index.php
===================================================================
--- trunk/gforge/www/news/index.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/news/index.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -53,7 +53,7 @@
 	$limit = 50;
 }
 
-if ($group_id && ($group_id != $sys_news_group)) {
+if ($group_id && ($group_id != forge_get_config('news_group'))) {
 	$result = db_query_params ('SELECT * FROM news_bytes WHERE group_id=$1 AND is_approved <> 4 ORDER BY post_date DESC',
 				   array ($group_id),
 				   $limit+1,

Modified: trunk/gforge/www/news/news_utils.php
===================================================================
--- trunk/gforge/www/news/news_utils.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/news/news_utils.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 */
 
 function news_header($params) {
-	global $HTML,$group_id,$news_name,$news_id,$sys_news_group;
+	global $HTML,$group_id,$news_name,$news_id;
 
 	if (!forge_get_config('use_news')) {
 		exit_disabled();
@@ -40,12 +40,12 @@
 	/*
 		Show horizontal links
 	*/
-	if ($group_id && ($group_id != $sys_news_group)) {
+	if ($group_id && ($group_id != forge_get_config('news_group'))) {
 		site_project_header($params);
 	} else {
 		$HTML->header($params);
 	}
-	if ($group_id && ($group_id != $sys_news_group)) {
+	if ($group_id && ($group_id != forge_get_config('news_group'))) {
 		$menu_texts=array();
 		$menu_links=array();
 
@@ -73,7 +73,7 @@
 /**
  * Display latest news for frontpage or news page.
  *
- * @param int  $group_id group_id of the news ($sys_news_group used if none given)
+ * @param int  $group_id group_id of the news (forge_get_config('news_group') used if none given)
  * @param int  $limit number of news to display (default: 10)
  * @param bool $show_summaries (default: true)
  * @param bool $allow_submit (default: true)
@@ -81,9 +81,9 @@
  * @param int  $tail_headlines number of additional news to display in short (-1 for all the others, default: 0)
  */
 function news_show_latest($group_id='',$limit=10,$show_summaries=true,$allow_submit=true,$flat=false,$tail_headlines=0,$show_forum=true) {
-	global $sys_news_group;
+
 	if (!$group_id) {
-		$group_id=$sys_news_group;
+		$group_id=forge_get_config('news_group');
 	}
 	/*
 		Show a simple list of the latest news items with a link to the forum
@@ -106,8 +106,8 @@
   AND groups.status=$4
 ORDER BY post_date DESC',
 				   array ($group_id,
-					  $group_id != $sys_news_group ? 1 : 0,
-					  $group_id != $sys_news_group ? 0 : 1,
+					  $group_id != forge_get_config('news_group') ? 1 : 0,
+					  $group_id != forge_get_config('news_group') ? 0 : 1,
 					  'A'),
 				   $l);
 	$rows=db_numrows($result);
@@ -203,7 +203,7 @@
 			$return .= "\n\n";
 		}
 
-		if ($group_id != $sys_news_group) {
+		if ($group_id != forge_get_config('news_group')) {
 			$archive_url = '/news/?group_id='.$group_id;
 		} else {
 			$archive_url = '/news/';
@@ -216,7 +216,7 @@
 			}
 		}
 	}
-	if ($allow_submit && $group_id != $sys_news_group) {
+	if ($allow_submit && $group_id != forge_get_config('news_group')) {
 		if(!$result || $rows < 1) {
 			$return .= '';
 		}

Modified: trunk/gforge/www/news/submit.php
===================================================================
--- trunk/gforge/www/news/submit.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/news/submit.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -64,7 +64,7 @@
 
 	$group_id = getIntFromRequest('group_id');
 
-	if ($group_id == $sys_news_group) {
+	if ($group_id == forge_get_config('news_group')) {
 		exit_permission_denied(_('Submitting news from the news group is not allowed.'));
 	}
 
@@ -91,7 +91,7 @@
 	   			*/
 
 				db_begin();
-				$f=new Forum(group_get_object($sys_news_group));
+				$f=new Forum(group_get_object(forge_get_config('news_group')));
 				if (!$f->create(ereg_replace('[^_\.0-9a-z-]','-', strtolower($summary)),$details,1,'',0,0)) {
 					db_rollback();
 					exit_error('Error',$f->getErrorMessage());

Modified: trunk/gforge/www/reporting/groupadded.php
===================================================================
--- trunk/gforge/www/reporting/groupadded.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/groupadded.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -47,7 +47,7 @@
 	$end = $z[count($z)-1];
 }
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 echo report_header(_('Projects Added'));
 

Modified: trunk/gforge/www/reporting/groupadded_graph.php
===================================================================
--- trunk/gforge/www/reporting/groupadded_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/groupadded_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once($sys_path_to_jpgraph.'/jpgraph_line.php');
 require_once $gfcommon.'reporting/ReportGroupAdded.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $SPAN = getIntFromRequest('SPAN');
 $start = getIntFromRequest('start');

Modified: trunk/gforge/www/reporting/groupcum.php
===================================================================
--- trunk/gforge/www/reporting/groupcum.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/groupcum.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -47,7 +47,7 @@
 	$end = $z[count($z)-1];
 }
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 echo report_header(_('Cumulative Projects'));
 

Modified: trunk/gforge/www/reporting/groupcum_graph.php
===================================================================
--- trunk/gforge/www/reporting/groupcum_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/groupcum_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once($sys_path_to_jpgraph.'/jpgraph_line.php');
 require_once $gfcommon.'reporting/ReportGroupCum.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $SPAN = getIntFromRequest('SPAN');
 $start = getIntFromRequest('start');

Modified: trunk/gforge/www/reporting/index.php
===================================================================
--- trunk/gforge/www/reporting/index.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/index.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once $gfcommon.'reporting/Report.class.php';
 require_once $gfcommon.'reporting/ReportSetup.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $feedback = htmlspecialchars(getStringFromRequest('feedback'));
 

Modified: trunk/gforge/www/reporting/projectact.php
===================================================================
--- trunk/gforge/www/reporting/projectact.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/projectact.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/projecttime.php
===================================================================
--- trunk/gforge/www/reporting/projecttime.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/projecttime.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/ReportProjectTime.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/projecttime_graph.php
===================================================================
--- trunk/gforge/www/reporting/projecttime_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/projecttime_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -32,7 +32,7 @@
 require_once $gfcommon.'reporting/ReportProjectTime.class.php';
 require_once $gfcommon.'reporting/report_utils.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $g_id = getStringFromRequest('g_id');
 $type = getStringFromRequest('type');

Modified: trunk/gforge/www/reporting/rebuild.php
===================================================================
--- trunk/gforge/www/reporting/rebuild.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/rebuild.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once $gfcommon.'reporting/Report.class.php';
 require_once $gfcommon.'reporting/ReportSetup.class.php';
 
-session_require( array('group'=>$sys_stats_group,'A') );
+session_require( array('group'=>forge_get_config('stats_group'),'A') );
 
 echo report_header(_('Main Page'));
 if (getStringFromRequest('submit') && getStringFromRequest('im_sure')) {

Modified: trunk/gforge/www/reporting/siteact.php
===================================================================
--- trunk/gforge/www/reporting/siteact.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/siteact.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/siteact_graph.php
===================================================================
--- trunk/gforge/www/reporting/siteact_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/siteact_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -31,7 +31,7 @@
 require_once $gfcommon.'reporting/ReportSiteAct.class.php';
 require_once $gfwww.'include/unicode.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $area = getStringFromRequest('area');
 $SPAN = getIntFromRequest('SPAN');

Modified: trunk/gforge/www/reporting/sitetime.php
===================================================================
--- trunk/gforge/www/reporting/sitetime.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/sitetime.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/ReportSiteTime.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/sitetime_graph.php
===================================================================
--- trunk/gforge/www/reporting/sitetime_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/sitetime_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -32,7 +32,7 @@
 require_once $gfcommon.'reporting/ReportSiteTime.class.php';
 require_once $gfcommon.'reporting/report_utils.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');

Modified: trunk/gforge/www/reporting/sitetimebar.php
===================================================================
--- trunk/gforge/www/reporting/sitetimebar.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/sitetimebar.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/sitetimebar_graph.php
===================================================================
--- trunk/gforge/www/reporting/sitetimebar_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/sitetimebar_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once($sys_path_to_jpgraph.'/jpgraph_bar.php');
 require_once $gfcommon.'reporting/Report.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 //
 //	Create Report

Modified: trunk/gforge/www/reporting/timecategory.php
===================================================================
--- trunk/gforge/www/reporting/timecategory.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/timecategory.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/ReportSetup.class.php';
 
-session_require( array('group'=>$sys_stats_group,'A') );
+session_require( array('group'=>forge_get_config('stats_group'),'A') );
 
 $time_code = getIntFromRequest('time_code');
 $category_name = trim(getStringFromRequest('category_name'));

Modified: trunk/gforge/www/reporting/toolspie.php
===================================================================
--- trunk/gforge/www/reporting/toolspie.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/toolspie.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -43,7 +43,7 @@
 	$start = $z[count($z)-1];
 }
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 echo report_header(_('Tool Pie Graphs'));
 

Modified: trunk/gforge/www/reporting/toolspie_graph.php
===================================================================
--- trunk/gforge/www/reporting/toolspie_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/toolspie_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -32,7 +32,7 @@
 require_once $gfcommon.'reporting/Report.class.php';
 require_once $gfcommon.'reporting/report_utils.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 //
 //	Create Report

Modified: trunk/gforge/www/reporting/trackerpie_graph.php
===================================================================
--- trunk/gforge/www/reporting/trackerpie_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/trackerpie_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -33,7 +33,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfwww.'tracker/include/ArtifactTypeHtml.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 //
 //	Create Report

Modified: trunk/gforge/www/reporting/useract.php
===================================================================
--- trunk/gforge/www/reporting/useract.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/useract.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/useract_graph.php
===================================================================
--- trunk/gforge/www/reporting/useract_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/useract_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -31,7 +31,7 @@
 require_once $gfcommon.'reporting/ReportUserAct.class.php';
 require_once $gfwww.'include/unicode.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $dev_id = getStringFromRequest('dev_id');
 $SPAN = getIntFromRequest('SPAN');

Modified: trunk/gforge/www/reporting/useradded.php
===================================================================
--- trunk/gforge/www/reporting/useradded.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/useradded.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -47,7 +47,7 @@
 	$end = $z[count($z)-1];
 }
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 echo report_header(_('Users Added'));
 

Modified: trunk/gforge/www/reporting/useradded_graph.php
===================================================================
--- trunk/gforge/www/reporting/useradded_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/useradded_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once($sys_path_to_jpgraph.'/jpgraph_line.php');
 require_once $gfcommon.'reporting/ReportUserAdded.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $SPAN = getIntFromRequest('SPAN');
 $start = getIntFromRequest('start');

Modified: trunk/gforge/www/reporting/usercum.php
===================================================================
--- trunk/gforge/www/reporting/usercum.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/usercum.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -47,7 +47,7 @@
 	$end = $z[count($z)-1];
 }
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 echo report_header(_('Cumulative Users'));
 

Modified: trunk/gforge/www/reporting/usercum_graph.php
===================================================================
--- trunk/gforge/www/reporting/usercum_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/usercum_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -30,7 +30,7 @@
 require_once($sys_path_to_jpgraph.'/jpgraph_line.php');
 require_once $gfcommon.'reporting/ReportUserCum.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $SPAN = getIntFromRequest('SPAN');
 $start = getIntFromRequest('start');

Modified: trunk/gforge/www/reporting/usersummary.php
===================================================================
--- trunk/gforge/www/reporting/usersummary.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/usersummary.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/usertime.php
===================================================================
--- trunk/gforge/www/reporting/usertime.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/usertime.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -29,7 +29,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/ReportUserTime.class.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $report=new Report();
 if ($report->isError()) {

Modified: trunk/gforge/www/reporting/usertime_graph.php
===================================================================
--- trunk/gforge/www/reporting/usertime_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/reporting/usertime_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -32,7 +32,7 @@
 require_once $gfcommon.'reporting/ReportUserTime.class.php';
 require_once $gfcommon.'reporting/report_utils.php';
 
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $dev_id = getStringFromRequest('dev_id');
 $type = getStringFromRequest('type');

Modified: trunk/gforge/www/stats/graphs.php
===================================================================
--- trunk/gforge/www/stats/graphs.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/stats/graphs.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -13,7 +13,7 @@
 require_once $gfwww.'stats/site_stats_utils.php';
 
 // require you to be a member of the sfstats group (group_id = 11084)
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $HTML->header(array('title'=>sprintf(_('%1$s Site Statistics'), forge_get_config ('forge_name'))));
 

Modified: trunk/gforge/www/stats/i18n.php
===================================================================
--- trunk/gforge/www/stats/i18n.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/stats/i18n.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -13,7 +13,7 @@
 require_once $gfwww.'stats/site_stats_utils.php';
 
 // require you to be a member of the sfstats group
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $HTML->header(array('title' => sprintf(_('%1$s I18n Statistics'), forge_get_config ('forge_name'))));
 echo "<h1>".sprintf(_('Languages Distributions'), forge_get_config ('forge_name'))." </h1>";

Modified: trunk/gforge/www/stats/index.php
===================================================================
--- trunk/gforge/www/stats/index.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/stats/index.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -15,7 +15,7 @@
 require_once $gfwww.'stats/site_stats_utils.php';
 
 // require you to be a member of the sfstats group
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $HTML->header(array('title'=>sprintf(_('%1$s Site Statistics'), forge_get_config ('forge_name'))));
 

Modified: trunk/gforge/www/stats/projects.php
===================================================================
--- trunk/gforge/www/stats/projects.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/stats/projects.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -21,7 +21,7 @@
 $trovecatid=getIntFromRequest('trovecatid');
 
 // require you to be a member of the sfstats group (group_id = 11084)
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $HTML->header(array('title'=>sprintf(_('%1$s Site Statistics'), forge_get_config ('forge_name'))));
 

Modified: trunk/gforge/www/stats/users_graph.php
===================================================================
--- trunk/gforge/www/stats/users_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/stats/users_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -15,7 +15,7 @@
 require_once $gfwww.'include/graph_lib.php';
 
    // require you to be a member of the sfstats group (group_id = 11084)
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $group_id = getIntFromRequest('group_id');
 $year = getIntFromRequest('year');

Modified: trunk/gforge/www/stats/views_graph.php
===================================================================
--- trunk/gforge/www/stats/views_graph.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/stats/views_graph.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -15,7 +15,7 @@
 require_once $gfwww.'include/graph_lib.php';
 
    // require you to be a member of the sfstats group (group_id = 11084)
-session_require( array('group'=>$sys_stats_group) );
+session_require( array('group'=>forge_get_config('stats_group')) );
 
 $group_id = getIntFromRequest('group_id');
 $year = getIntFromRequest('year');

Modified: trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php
===================================================================
--- trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/themes/gforge-simple-theme/Theme.class.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -392,7 +392,7 @@
 		}
 
 	}
-	if (user_ismember($GLOBALS['sys_stats_group'])) {
+	if (user_ismember(forge_get_config('stats_group'))) {
 		$TABS_IDS[]='reporting';
 		$TABS_DIRS[]=util_make_url ('/reporting/') ;
 		$TABS_TITLES[]=_('Reporting');

Modified: trunk/gforge/www/themes/lite/Theme.class.php
===================================================================
--- trunk/gforge/www/themes/lite/Theme.class.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/themes/lite/Theme.class.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -287,7 +287,7 @@
 		        $TABS_DIRS[]='/admin/';
 		        $TABS_TITLES[]=_('Admin');
 		}
-		if (user_ismember($GLOBALS['sys_stats_group'])) {
+		if (user_ismember(forge_get_config('stats_group'))) {
 		        $TABS_DIRS[]='/reporting/';
 		        $TABS_TITLES[]=_('Reporting');
 		}

Modified: trunk/gforge/www/tracker/admin/form-clonetracker.php
===================================================================
--- trunk/gforge/www/tracker/admin/form-clonetracker.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/gforge/www/tracker/admin/form-clonetracker.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -2,7 +2,7 @@
 //
 //	FORM TO CLONE A TRACKER
 //
-		$g =& group_get_object($sys_template_group);
+		$g =& group_get_object(forge_get_config('template_group'));
 		if (!$g || !is_object($g)) {
 			exit_error('Error','Unable to Create Template Group Object');
 		} elseif ($g->isError()) {

Modified: trunk/tests/code/deprecations/DeprecationsTest.php
===================================================================
--- trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-27 18:56:41 UTC (rev 9607)
+++ trunk/tests/code/deprecations/DeprecationsTest.php	2010-04-27 19:05:29 UTC (rev 9608)
@@ -92,6 +92,10 @@
 			       'sys_ldap_base_dn',
 			       'sys_ldap_bind_dn',
 			       'sys_ldap_admin_dn',
+			       'sys_news_group',
+			       'sys_stats_group',
+			       'sys_peer_rating_group',
+			       'sys_template_group',
 			) ;
 
 		$pattern = implode ('|', $vars) ;




More information about the Fusionforge-commits mailing list