[Fusionforge-commits] FusionForge branch master updated. 6.0.4-407-g3ef943d

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Apr 30 17:46:05 CEST 2016


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  3ef943dd7d563300cce5b80f17c2e49dd4c9d940 (commit)
      from  8d1061af3112abf1033fa46d303839ed8ec6f0ee (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=3ef943dd7d563300cce5b80f17c2e49dd4c9d940

commit 3ef943dd7d563300cce5b80f17c2e49dd4c9d940
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Apr 30 17:45:50 2016 +0200

    widget Project Documents Activity: better handling user preference

diff --git a/src/common/widget/Widget_ProjectDocumentsActivity.class.php b/src/common/widget/Widget_ProjectDocumentsActivity.class.php
index d94eba4..b4a8f34 100644
--- a/src/common/widget/Widget_ProjectDocumentsActivity.class.php
+++ b/src/common/widget/Widget_ProjectDocumentsActivity.class.php
@@ -27,13 +27,14 @@ require_once 'Widget.class.php';
 
 class Widget_ProjectDocumentsActivity extends Widget {
 	var $content;
-	var $_statistic_show;
+	var $_statistic_show = 'FUD';
 	function __construct() {
 		$this->Widget('projectdocumentsactivity');
 		if (session_loggedin()) {
-			$this->_statistic_show = UserManager::instance()->getCurrentUser()->getPreference('my_docman_project_activitity_show');
-		} else {
-			$this->_statistic_show = 'FUD';
+			$userPrefValue = UserManager::instance()->getCurrentUser()->getPreference('my_docman_project_activitity_show');
+			if ($userPrefValue) {
+				$this->_statistic_show = $userPrefValue;
+			}
 		}
 		$request =& HTTPRequest::instance();
 		$pm = ProjectManager::instance();
@@ -91,7 +92,7 @@ class Widget_ProjectDocumentsActivity extends Widget {
 		$textsArray[] = _('new and update Files'.' [FU]');
 		$textsArray[] = _('new files and directories'.' [FD]');
 		$textsArray[] = _('new and update files and directories'.' [FUD]');
-		$prefs = _('Display statistics')._(': ').html_build_select_box_from_arrays($optionsArray, $textsArray, "show", $this->_statistic_show);
+		$prefs = _('Display statistics')._(': ').html_build_select_box_from_arrays($optionsArray, $textsArray, 'show', $this->_statistic_show, false);
 		return $prefs;
 	}
 

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

Summary of changes:
 src/common/widget/Widget_ProjectDocumentsActivity.class.php | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list