Skip to content

Commit

Permalink
Fixed 4724: Is there a way to control the display of the history?
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@3060 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
vboctor committed Oct 16, 2004
1 parent ad3a081 commit acd2641
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bug_view_advanced_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_view_advanced_page.php,v 1.63 2004-09-26 01:57:25 thraxisp Exp $
# $Id: bug_view_advanced_page.php,v 1.64 2004-10-16 00:22:39 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -37,6 +37,9 @@

html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) );
html_page_top2();

$t_access_level_needed = config_get( 'view_history_threshold' );
$t_can_view_history = access_has_bug_level( $t_access_level_needed, $f_bug_id );
?>

<br />
Expand Down Expand Up @@ -86,8 +89,10 @@
<span class="small"><?php print_bracket_link( 'bug_view_page.php?bug_id=' . $f_bug_id, lang_get( 'view_simple_link' ) ) ?></span>
<?php } ?>

<?php if ( $t_can_view_history ) { ?>
<!-- History -->
<span class="small"><?php print_bracket_link( 'bug_view_page.php?bug_id=' . $f_bug_id . '&amp;history=1#history', lang_get( 'bug_history' ) ) ?></span>
<?php } ?>

<!-- Print Bug -->
<span class="small"><?php print_bracket_link( 'print_bug_page.php?bug_id=' . $f_bug_id, lang_get( 'print' ) ) ?></span>
Expand Down
7 changes: 6 additions & 1 deletion bug_view_page.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: bug_view_page.php,v 1.67 2004-09-26 01:57:26 thraxisp Exp $
# $Id: bug_view_page.php,v 1.68 2004-10-16 00:22:39 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand Down Expand Up @@ -34,6 +34,9 @@

$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );

$t_access_level_needed = config_get( 'view_history_threshold' );
$t_can_view_history = access_has_bug_level( $t_access_level_needed, $f_bug_id );

compress_enable();
?>
<?php html_page_top1( bug_format_summary( $f_bug_id, SUMMARY_CAPTION ) ) ?>
Expand Down Expand Up @@ -86,8 +89,10 @@
<span class="small"><?php print_bracket_link( 'bug_view_advanced_page.php?bug_id=' . $f_bug_id, lang_get( 'view_advanced_link' ) )?></span>
<?php }?>

<?php if ( $t_can_view_history ) { ?>
<!-- History -->
<span class="small"><?php print_bracket_link( 'bug_view_page.php?bug_id=' . $f_bug_id . '&amp;history=1#history', lang_get( 'bug_history' ) ) ?></span>
<?php } ?>

<!-- Print Bug -->
<span class="small"><?php print_bracket_link( 'print_bug_page.php?bug_id=' . $f_bug_id, lang_get( 'print' ) ) ?></span>
Expand Down
9 changes: 8 additions & 1 deletion history_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: history_inc.php,v 1.24 2004-09-22 08:55:35 bpfennigschmidt Exp $
# $Id: history_inc.php,v 1.25 2004-10-16 00:22:39 vboctor Exp $
# --------------------------------------------------------
?>
<?php
Expand All @@ -20,6 +20,13 @@
require_once( $t_core_path.'history_api.php' );
?>

<?php
$t_access_level_needed = config_get( 'view_history_threshold' );
if ( !access_has_bug_level( $t_access_level_needed, $f_bug_id ) ) {
return;
}
?>

<a name="history" id="history" /><br />

<?php if ( ON == config_get( 'use_javascript' ) ) { ?>
Expand Down

0 comments on commit acd2641

Please sign in to comment.