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  1e098ac26740474aa5c6731e4b1e8463eac4101d (commit)
      from  e250de3f159da975304a905c3fe2aed6b2137d6a (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=1e098ac26740474aa5c6731e4b1e8463eac4101d

commit 1e098ac26740474aa5c6731e4b1e8463eac4101d
Author: Franck Villaume <[email protected]>
Date:   Sun Dec 25 21:46:34 2016 +0100

    Artifact Display Widget: better redirect on update preference in Content 
Widget

diff --git a/src/common/widget/Widget_TrackerContent.class.php 
b/src/common/widget/Widget_TrackerContent.class.php
index 6ae27f8..8e6973b 100644
--- a/src/common/widget/Widget_TrackerContent.class.php
+++ b/src/common/widget/Widget_TrackerContent.class.php
@@ -448,6 +448,20 @@ class Widget_TrackerContent extends Widget {
                return $this->getPartialPreferencesFormTitle($this->getTitle());
        }
 
+       function getPreferencesForm($layout_id, $owner_id, $owner_type) {
+               global $HTML;
+               global $aid;
+               $prefs  = $HTML->openForm(array('method' => 'post', 'action' => 
'/widgets/widget.php?owner='.$owner_type.$owner_id.'&action=update&name['.$this->id.']='.$this->getInstanceId().'&content_id='.$this->getInstanceId().'&layout_id='.$layout_id.'&func=detail&aid='.$aid));
+               $prefs .= html_ao('fieldset').html_e('legend', array(), 
_('Preferences'));
+               $prefs .= $this->getPreferences();
+               $prefs .= html_e('br');
+               $prefs .= html_e('input', array('type' => 'submit', 'name' => 
'cancel', 'value' => _('Cancel')));
+               $prefs .= html_e('input', array('type' => 'submit', 'value' => 
_('Submit')));
+               $prefs .= html_ac(html_ap() - 1);
+               $prefs .= $HTML->closeForm();
+               return $prefs;
+       }
+
        function updatePreferences(&$request) {
                $done = false;
                $vContentId = new Valid_UInt('content_id');
diff --git a/src/www/widgets/widget.php b/src/www/widgets/widget.php
index 0a1bf0b..aa275d9 100644
--- a/src/www/widgets/widget.php
+++ b/src/www/widgets/widget.php
@@ -64,6 +64,9 @@ if ($request->valid($vOwner)) {
                                $_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/common/widget/Widget_TrackerContent.class.php | 14 ++++++++++++++
 src/www/widgets/widget.php                        |  3 +++
 2 files changed, 17 insertions(+)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to