[Fusionforge-commits] FusionForge branch master updated. e59389ba83c18a8023b0f06aa8d49e6af355d78a

Franck VILLAUME nerville at fusionforge.org
Wed Feb 20 10:11:43 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  e59389ba83c18a8023b0f06aa8d49e6af355d78a (commit)
       via  c6c5e89aab6b153cc2e7a4d6d3839e1bbcb1bf57 (commit)
      from  94fe780d401e17d528df453d07dc4539a5b663ef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e59389ba83c18a8023b0f06aa8d49e6af355d78a
Merge: 94fe780 c6c5e89
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 20 10:11:51 2013 +0100

    port from Branch_5_2: widgets: fix availability based on patch from French Ministry of education

diff --cc src/common/widget/Widget_MyArtifacts.class.php
index 301ddc6,c781e7b..e413f71
--- a/src/common/widget/Widget_MyArtifacts.class.php
+++ b/src/common/widget/Widget_MyArtifacts.class.php
@@@ -292,6 -255,19 +293,17 @@@ class Widget_MyArtifacts extends Widge
  	}
  
  	function getDescription() {
 -		return _("List artifacts you have submitted or assigned to you, by project.");
 +		return _("List artifacts you have submitted or assigned to you or you are monitoring, by project.");
  	}
+ 
+ 	function isAvailable() {
+ 		if (!forge_get_config('use_tracker')) {
+ 			return false;
+ 		}
+ 		foreach (UserManager::instance()->getCurrentUser()->getGroups(false) as $p) {
+ 			if ($p->usesTracker()) {
+ 				return true;
+ 			}
+ 		}
+ 	}
  }
 -
 -?>
diff --cc src/common/widget/Widget_MyMonitoredDocuments.class.php
index c22d105,a5779f9..e31d0c8
--- a/src/common/widget/Widget_MyMonitoredDocuments.class.php
+++ b/src/common/widget/Widget_MyMonitoredDocuments.class.php
@@@ -106,4 -114,16 +106,15 @@@ class Widget_MyMonitoredDocuments exten
  	function getDescription() {
  		return _("List documents that you are currently monitoring, by project.<br />To cancel any of the monitored items just click on the trash icon next to the item label.");
  	}
+ 
+ 	function isAvailable() {
+ 		if (!forge_get_config('use_docman')) {
+ 			return false;
+ 		}
+ 		foreach (UserManager::instance()->getCurrentUser()->getGroups(false) as $p) {
+ 			if ($p->usesDocman()) {
+ 				return true;
+ 			}
+ 		}
+ 	}
  }
 -?>
diff --cc src/common/widget/Widget_MyMonitoredForums.class.php
index 97b3e62,fe45c89..612ad17
--- a/src/common/widget/Widget_MyMonitoredForums.class.php
+++ b/src/common/widget/Widget_MyMonitoredForums.class.php
@@@ -154,4 -141,16 +154,15 @@@ class Widget_MyMonitoredForums extends 
  		}
  		return $ajax_url;
  	}
+ 
+ 	function isAvailable() {
+ 		if (!forge_get_config('use_forum')) {
+ 			return false;
+ 		}
+ 		foreach (UserManager::instance()->getCurrentUser()->getGroups(false) as $p) {
+ 			if ($p->usesForum()) {
+ 				return true;
+ 			}
+ 		}
+ 	}
  }
 -?>

-----------------------------------------------------------------------

Summary of changes:
 src/common/widget/Widget_MyArtifacts.class.php           |   14 +++++++++++++-
 src/common/widget/Widget_MyMonitoredDocuments.class.php  |   13 ++++++++++++-
 src/common/widget/Widget_MyMonitoredForums.class.php     |   13 ++++++++++++-
 .../widget/Widget_MyProjectsLastDocuments.class.php      |   13 ++++++++++++-
 4 files changed, 49 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list