[Fusionforge-commits] r7149 - in trunk/gforge: . etc etc/local.d www/include

Julien HEYMAN jheyman at libremir.placard.fr.eu.org
Wed Mar 11 08:48:08 CET 2009


Author: jheyman
Date: 2009-03-11 08:48:08 +0100 (Wed, 11 Mar 2009)
New Revision: 7149

Modified:
   trunk/gforge/etc/local.d/25features
   trunk/gforge/etc/local.inc.example
   trunk/gforge/setup
   trunk/gforge/www/include/html.php
   trunk/gforge/www/include/user_home.php
Log:
Add features : sys_use_diary

Modified: trunk/gforge/etc/local.d/25features
===================================================================
--- trunk/gforge/etc/local.d/25features	2009-03-11 01:06:53 UTC (rev 7148)
+++ trunk/gforge/etc/local.d/25features	2009-03-11 07:48:08 UTC (rev 7149)
@@ -19,6 +19,7 @@
 $sys_use_people={sys_use_people};
 $sys_use_shell={sys_use_shell};
 $sys_use_private_project={sys_use_private_project};
+$sys_use_diary={sys_use_diary};
 
 // Enable/Disable user ratings
 $sys_use_ratings={sys_use_ratings};

Modified: trunk/gforge/etc/local.inc.example
===================================================================
--- trunk/gforge/etc/local.inc.example	2009-03-11 01:06:53 UTC (rev 7148)
+++ trunk/gforge/etc/local.inc.example	2009-03-11 07:48:08 UTC (rev 7149)
@@ -160,6 +160,7 @@
 $sys_use_people=true;
 $sys_use_shell=true;
 $sys_use_private_project=true;
+$sys_use_diary=true;
 
 // Enable/Disable user ratings
 $sys_use_ratings=true;

Modified: trunk/gforge/setup
===================================================================
--- trunk/gforge/setup	2009-03-11 01:06:53 UTC (rev 7148)
+++ trunk/gforge/setup	2009-03-11 07:48:08 UTC (rev 7149)
@@ -106,6 +106,7 @@
 	DEFAULTsys_use_ssl=false
 	DEFAULTsys_use_people=true
 	DEFAULTsys_use_ftpuploads=false
+	DEFAULTsys_use_diary=true
 	DEFAULTsys_use_gateways=true
 	DEFAULTsys_use_project_vhost=true
 	DEFAULTsys_use_project_database=false

Modified: trunk/gforge/www/include/html.php
===================================================================
--- trunk/gforge/www/include/html.php	2009-03-11 01:06:53 UTC (rev 7148)
+++ trunk/gforge/www/include/html.php	2009-03-11 07:48:08 UTC (rev 7149)
@@ -655,15 +655,25 @@
 	echo $HTML->header($params);
 	echo html_feedback_top((isset($GLOBALS['feedback']) ? $GLOBALS['feedback'] : ''));
 	echo ($HTML->beginSubMenu());
-	echo ($HTML->printSubMenu(
-		array(_('My Personal Page'),
-			_('Diary & Notes'),
-			_('Account Maintenance'),
-			_('Register Project')),
-		array('/my/',
-			'/my/diary.php',
-			'/account/',
-			'/register/')));
+	if ($sys_use_diary) { 
+		echo ($HTML->printSubMenu(
+			array(_('My Personal Page'),
+				_('Diary & Notes'),
+				_('Account Maintenance'),
+				_('Register Project')),
+			array('/my/',
+				'/my/diary.php',
+				'/account/',
+				'/register/')));
+	} else {
+		echo ($HTML->printSubMenu(
+			array(_('My Personal Page'),
+				_('Account Maintenance'),
+				_('Register Project')),
+			array('/my/',
+				'/account/',
+				'/register/')));
+	}
 	plugin_hook ("usermenu", false) ;
 	echo ($HTML->endSubMenu());
 }

Modified: trunk/gforge/www/include/user_home.php
===================================================================
--- trunk/gforge/www/include/user_home.php	2009-03-11 01:06:53 UTC (rev 7148)
+++ trunk/gforge/www/include/user_home.php	2009-03-11 07:48:08 UTC (rev 7149)
@@ -102,26 +102,27 @@
 		}
 	}
 
-	echo $HTML->boxMiddle(_('Diary and Notes'));
- 
-	/*
+	if ($sys_use_diary) {
+		echo $HTML->boxMiddle(_('Diary and Notes'));
+	 
+		/*
 
-		Get their diary information
+			Get their diary information
 
-	*/
+		*/
 
-	$res=db_query("SELECT count(*) from user_diary ".
-		"WHERE user_id='". $user_id ."' AND is_public=1");
-	echo _('Diary/Note entries:').' '.db_result($res,0,0).'
-	<p/>'.util_make_link ('/developer/diary.php?diary_user='.$user_id,_('View Diary & Notes')).'</p>
-	<p/>';
-	echo util_make_link ('/developer/monitor.php?diary_user='.$user_id,
-			    html_image("ic/check.png",'15','13',array(),0) ._('Monitor this Diary')
-		) ;
-	echo '</p>';
-	$hookparams['user_id'] = $user_id;
-	plugin_hook("user_personal_links",$hookparams);
-	
+		$res=db_query("SELECT count(*) from user_diary ".
+			"WHERE user_id='". $user_id ."' AND is_public=1");
+		echo _('Diary/Note entries:').' '.db_result($res,0,0).'
+		<p/>'.util_make_link ('/developer/diary.php?diary_user='.$user_id,_('View Diary & Notes')).'</p>
+		<p/>';
+		echo util_make_link ('/developer/monitor.php?diary_user='.$user_id,
+						html_image("ic/check.png",'15','13',array(),0) ._('Monitor this Diary')
+			) ;
+		echo '</p>';
+		$hookparams['user_id'] = $user_id;
+		plugin_hook("user_personal_links",$hookparams);
+	}	
 	?>
 	</td>
 </tr>




More information about the Fusionforge-commits mailing list