logo       

mantisbt bug_change_status_page.php, 1.25, 1.26 bug_update_advanced_page.ph: msg#00035

Subject: mantisbt bug_change_status_page.php, 1.25, 1.26 bug_update_advanced_page.php, 1.93, 1.94 bug_update_page.php, 1.93, 1.94 bug_view_page.php, 1.82, 1.83 bugnote_add_inc.php, 1.27, 1.28 bugnote_edit_page.php, 1.51, 1.52 bugnote_view_inc.php, 1.35, 1.36 config_defaults_inc.php, 1.322, 1.323
Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31228

Modified Files:
        bug_change_status_page.php bug_update_advanced_page.php 
        bug_update_page.php bug_view_page.php bugnote_add_inc.php 
        bugnote_edit_page.php bugnote_view_inc.php 
        config_defaults_inc.php 
Log Message:
Add g_time_tracking_view_threshold and g_time_tracking_edit_threshold to 
access_has_global_level


Index: bugnote_view_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_view_inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- bugnote_view_inc.php        26 Dec 2006 10:56:07 -0000      1.35
+++ bugnote_view_inc.php        29 Dec 2006 19:24:16 -0000      1.36
@@ -172,7 +172,9 @@
                                        }
                                        echo implode( ', ', $t_to ) . '</em><br 
/><br />';
                                case TIME_TRACKING:
-                                       echo '<b><big>', 
$v3_time_tracking_hhmm, '</big></b><br /><br />';
+                                       if ( access_has_global_level( 
config_get( 'time_tracking_view_threshold' ) ) ) {
+                                               echo '<b><big>', 
$v3_time_tracking_hhmm, '</big></b><br /><br />';
+                                       }
                                        break;
                        }
 

Index: bugnote_edit_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_edit_page.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- bugnote_edit_page.php       20 Dec 2006 19:49:54 -0000      1.51
+++ bugnote_edit_page.php       29 Dec 2006 19:24:16 -0000      1.52
@@ -57,8 +57,13 @@
        }
 
        $t_bugnote_text = string_textarea( bugnote_get_text( $f_bugnote_id ) );
-       $t_time_tracking = bugnote_get_field( $f_bugnote_id, "time_tracking" );
-       $t_time_tracking = db_minutes_to_hhmm( $t_time_tracking );
+
+       # No need to gather the extra information if not used
+       if ( config_get('time_tracking_enabled') &&
+               access_has_global_level( config_get( 
'time_tracking_edit_threshold' ) ) ) {
+               $t_time_tracking = bugnote_get_field( $f_bugnote_id, 
"time_tracking" );
+               $t_time_tracking = db_minutes_to_hhmm( $t_time_tracking );
+       }
 
        # Determine which view page to redirect back to.
        $t_redirect_url = string_get_bug_view_url( $t_bug_id );
@@ -85,6 +90,7 @@
        </td>
 </tr>
 <?php if ( config_get('time_tracking_enabled') ) { ?>
+<?php if ( access_has_global_level( config_get( 'time_tracking_edit_threshold' 
) ) ) { ?>
 <tr class="row-2">
        <td class="center" colspan="2">
                <b><?php echo lang_get( 'time_tracking') ?> (HH:MM)</b><br />
@@ -92,6 +98,7 @@
        </td>
 </tr>
 <?php } ?>
+<?php } ?>
 <tr>
        <td class="center" colspan="2">
                <input type="submit" class="button" value="<?php echo lang_get( 
'update_information_button' ) ?>" />

Index: bugnote_add_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bugnote_add_inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- bugnote_add_inc.php 12 Dec 2006 18:26:28 -0000      1.27
+++ bugnote_add_inc.php 29 Dec 2006 19:24:16 -0000      1.28
@@ -71,6 +71,7 @@
 <?php } ?>
 
 <?php if ( config_get('time_tracking_enabled') ) { ?>
+<?php if ( access_has_global_level( config_get( 'time_tracking_edit_threshold' 
) ) ) { ?>
 <tr <?php echo helper_alternate_class() ?>>
        <td class="category">
                <?php echo lang_get( 'time_tracking' ) ?>
@@ -87,6 +88,7 @@
        </td>
 </tr>
 <?php } ?>
+<?php } ?>
 
 <tr>
        <td class="center" colspan="2">

Index: config_defaults_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
retrieving revision 1.322
retrieving revision 1.323
diff -u -d -r1.322 -r1.323
--- config_defaults_inc.php     12 Dec 2006 18:26:28 -0000      1.322
+++ config_defaults_inc.php     29 Dec 2006 19:24:16 -0000      1.323
@@ -1787,4 +1787,12 @@
        # Stop watch to build time tracking field
        $g_time_tracking_stopwatch = OFF;
 
+       # access level required to view time tracking information
+       $g_time_tracking_view_threshold = DEVELOPER;
+
+       # access level required to add/edit time tracking information
+       $g_time_tracking_edit_threshold = DEVELOPER;
+
+       # access level required to run reports
+       $g_time_tracking_reporting_threshold = MANAGER;
 ?>

Index: bug_update_advanced_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update_advanced_page.php,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- bug_update_advanced_page.php        16 Dec 2006 19:48:55 -0000      1.93
+++ bug_update_advanced_page.php        29 Dec 2006 19:24:16 -0000      1.94
@@ -535,8 +535,9 @@
 </tr>
 <?php } ?>
 
-<!-- Bugnote Time Tracking (if permitted) -->
+<!-- Time Tracking (if permitted) -->
 <?php if ( config_get('time_tracking_enabled') ) { ?>
+<?php if ( access_has_global_level( config_get( 'time_tracking_edit_threshold' 
) ) ) { ?>
 <tr <?php echo helper_alternate_class() ?>>
        <td class="category">
                <?php echo lang_get( 'time_tracking' ) ?>
@@ -546,6 +547,7 @@
        </td>
 </tr>
 <?php } ?>
+<?php } ?>
 
 <!-- Submit Button -->
 <tr>

Index: bug_view_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_view_page.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- bug_view_page.php   12 Dec 2006 18:26:28 -0000      1.82
+++ bug_view_page.php   29 Dec 2006 19:24:16 -0000      1.83
@@ -446,7 +446,8 @@
 <?php } ?>
 <?php
        # Time Tracking stats
-       if ( config_get('time_tracking_enabled') ) {
+       if ( config_get('time_tracking_enabled') &&
+               access_has_global_level( config_get( 
'time_tracking_reporting_threshold' ) ) ) {
                include( $t_mantis_dir . 'bugnote_stats_inc.php' );
        }
        # History

Index: bug_change_status_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_change_status_page.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- bug_change_status_page.php  12 Dec 2006 18:26:28 -0000      1.25
+++ bug_change_status_page.php  29 Dec 2006 19:24:16 -0000      1.26
@@ -286,6 +286,7 @@
 
 <?php if ( config_get('time_tracking_enabled') ) { ?>
 <?php if ( access_has_bug_level( config_get( 'private_bugnote_threshold' ), 
$f_bug_id ) ) { ?>
+<?php if ( access_has_global_level( config_get( 'time_tracking_edit_threshold' 
) ) ) { ?>
 <tr <?php echo helper_alternate_class() ?>>
        <td class="category">
                <?php echo lang_get( 'time_tracking' ) ?>
@@ -296,6 +297,7 @@
 </tr>
 <?php } ?>
 <?php } ?>
+<?php } ?>
 
 <!-- Submit Button -->
 <tr>

Index: bug_update_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_update_page.php,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- bug_update_page.php 12 Dec 2006 18:26:28 -0000      1.93
+++ bug_update_page.php 29 Dec 2006 19:24:16 -0000      1.94
@@ -410,8 +410,9 @@
 </tr>
 <?php } ?>
 
-<!-- Bugnote Time Tracking (if permitted) -->
+<!-- Time Tracking (if permitted) -->
 <?php if ( config_get('time_tracking_enabled') ) { ?>
+<?php if ( access_has_global_level( config_get( 'time_tracking_edit_threshold' 
) ) ) { ?>
 <tr <?php echo helper_alternate_class() ?>>
        <td class="category">
                <?php echo lang_get( 'time_tracking' ) ?>
@@ -421,6 +422,7 @@
        </td>
 </tr>
 <?php } ?>
+<?php } ?>
 
 
 <!-- Submit Button -->


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe