logo       
Google Custom Search
    AddThis Social Bookmark Button

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

mantisbt bug_actiongroup.php,1.46,1.47 bug_actiongroup_page.php,1.50,1.51: msg#00057

Subject: mantisbt bug_actiongroup.php,1.46,1.47 bug_actiongroup_page.php,1.50,1.51
Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31183

Modified Files:
        bug_actiongroup.php bug_actiongroup_page.php 
Log Message:
final part of fix for 0005432: Viewing a bug should change the "current project"


Index: bug_actiongroup_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_actiongroup_page.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- bug_actiongroup_page.php    12 Jun 2005 00:20:46 -0000      1.50
+++ bug_actiongroup_page.php    16 Jun 2005 02:26:48 -0000      1.51
@@ -26,7 +26,28 @@
                print_header_redirect( 'view_all_bug_page.php' );
        }
 
-       $t_project_id = helper_get_current_project();
+       # run through the issues to see if they are all from one project
+       $t_project_id = ALL_PROJECTS;
+       $t_multiple_projects = false;
+       foreach( $f_bug_arr as $t_bug_id ) {
+               $t_bug = bug_get( $t_bug_id );
+               if ( $t_project_id != $t_bug->project_id ) {
+                       if ( ( $t_project_id != ALL_PROJECTS ) && 
!$t_multiple_projects ) {
+                               $t_multiple_projects = true;
+                       } else {
+                               $t_project_id = $t_bug->project_id;
+                       }
+               }
+       }
+       if ( $t_multiple_projects ) {
+               $t_project_id = ALL_PROJECTS;
+       }
+       # override the project if necessary
+       if( $t_project_id != helper_get_current_project() ) {
+               # in case the current project is not the same project of the 
bug we are viewing...
+               # ... override the current project. This to avoid problems with 
categories and handlers lists etc.
+               $g_project_override = $t_project_id;
+       }
 
        $t_finished = false;
        $t_request = '';
@@ -137,6 +158,10 @@
        }
 
        bug_group_action_print_top();
+       
+       if ( $t_multiple_projects ) {
+               echo '<p class="bold">' . lang_get( 'multiple_projects' ) . 
'</p>';
+       }
 ?>
 
 <br />

Index: bug_actiongroup.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_actiongroup.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- bug_actiongroup.php 12 Jun 2005 00:20:46 -0000      1.46
+++ bug_actiongroup.php 16 Jun 2005 02:26:48 -0000      1.47
@@ -44,7 +44,17 @@
 
        foreach( $f_bug_arr as $t_bug_id ) {
                bug_ensure_exists( $t_bug_id );
-               $t_status = bug_get_field( $t_bug_id, 'status' );
+               $t_bug = bug_get( $t_bug_id, true );
+
+               if( $t_bug->project_id != helper_get_current_project() ) {
+                       # in case the current project is not the same project 
of the bug we are viewing...
+                       # ... override the current project. This to avoid 
problems with categories and handlers lists etc.
+                       $g_project_override = $t_bug->project_id;
+                       # @@@ (thraxisp) the next line goes away if the cache 
was smarter and used project
+                       config_flush_cache(); # flush the config cache so that 
configs are refetched
+               }
+
+               $t_status = $t_bug->status;
 
                switch ( $f_action ) {
 



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>