[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1284-gcbc5c8f

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Dec 25 21:57:20 CET 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  cbc5c8ff3cc821b654f0719f16d1847280b8fe53 (commit)
      from  4e4d3dc6e6c56fbed3797d147569a8b1bdc6016a (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=cbc5c8ff3cc821b654f0719f16d1847280b8fe53

commit cbc5c8ff3cc821b654f0719f16d1847280b8fe53
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 25 21:57:03 2016 +0100

    Artifact Display Widget: better redirect on preference update.

diff --git a/src/www/include/Layout.class.php b/src/www/include/Layout.class.php
index d321478..b8f4f44 100644
--- a/src/www/include/Layout.class.php
+++ b/src/www/include/Layout.class.php
@@ -1409,8 +1409,12 @@ if (isset($params['group']) && $params['group']) {
 				}
 			}
 			if (strlen($widget->hasPreferences())) {
-				echo html_e('div', array('class' => 'widget_titlebar_prefs'),
-					util_make_link('/widgets/updatelayout.php?owner='.$owner_type.$owner_id.'&action=preferences&name['.$widget->id.']='.$widget->getInstanceId().'&layout_id='.$layout_id, _('Preferences')));
+				$url = '/widgets/updatelayout.php?owner='.$owner_type.$owner_id.'&action=preferences&name['.$widget->id.']='.$widget->getInstanceId().'&layout_id='.$layout_id;
+				if ($owner_type == WidgetLayoutManager::OWNER_TYPE_TRACKER) {
+					global $aid;
+					$url .= '&func=detail&aid='.$aid;
+				}
+				echo html_e('div', array('class' => 'widget_titlebar_prefs'), util_make_link($url, _('Preferences')));
 			}
 		}
 		if ($widget->hasRss()) {
diff --git a/src/www/widgets/updatelayout.php b/src/www/widgets/updatelayout.php
index fbafcd5..094ed5e 100644
--- a/src/www/widgets/updatelayout.php
+++ b/src/www/widgets/updatelayout.php
@@ -70,6 +70,9 @@ if ($owner) {
 				$_REQUEST['group_id'] = $_GET['group_id'] = $at->Group->getID();
 				$request->params['group_id'] = $at->Group->getID(); //bad!
 				$redirect = '/tracker/?group_id='.$at->Group->getID().'&atid='.$at->getID();
+				if ($request->get('func') == 'detail' && $request->get('aid')) {
+					$redirect .= '&func=detail&aid='.$request->get('aid');
+				}
 				if (!forge_check_global_perm('forge_admin') && !forge_check_perm('tracker_admin', $at->getID())) {
 					$GLOBALS['Response']->redirect($redirect);
 				}

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

Summary of changes:
 src/www/include/Layout.class.php | 8 ++++++--
 src/www/widgets/updatelayout.php | 3 +++
 2 files changed, 9 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list