Skip to content

Commit

Permalink
Add enable_profiles setting to allow profiles to be turned off for an…
Browse files Browse the repository at this point in the history
… individual project.
  • Loading branch information
mantis committed Dec 6, 2008
1 parent a1e44c7 commit 9004805
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 13 deletions.
4 changes: 2 additions & 2 deletions bug_report_advanced_page.php
Expand Up @@ -248,7 +248,7 @@
<td colspan="2"></td>
</tr>


<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<!-- Profile -->
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
Expand Down Expand Up @@ -346,7 +346,7 @@
<tr class="spacer">
<td colspan="2"></td>
</tr>

<?php } ?>

<?php
$t_show_version = ( ON == config_get( 'show_product_version' ) )
Expand Down
14 changes: 13 additions & 1 deletion bug_view_advanced_page.php
Expand Up @@ -288,13 +288,17 @@
<?php echo get_enum_element( 'resolution', $t_bug->resolution ) ?>
</td>

<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<!-- Platform -->
<td class="category">
<?php echo lang_get( 'platform' ) ?>
</td>
<td>
<?php echo $t_bug->platform ?>
</td>
<?php } else {?>
<td colspan="2"></td>
<?php } ?>

</tr>

Expand All @@ -311,14 +315,18 @@

<td colspan="2">&nbsp;</td>

<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<!-- Operating System -->
<td class="category">
<?php echo lang_get( 'os' ) ?>
</td>
<td>
<?php echo $t_bug->os ?>
</td>

<?php } else {?>
<td colspan="2"></td>
<?php } ?>

</tr>


Expand All @@ -335,13 +343,17 @@
<!-- spacer -->
<td colspan="2">&nbsp;</td>

<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<!-- OS Version -->
<td class="category">
<?php echo lang_get( 'os_version' ) ?>
</td>
<td>
<?php echo $t_bug->os_build ?>
</td>
<?php } else {?>
<td colspan="2"></td>
<?php } ?>

</tr>

Expand Down
3 changes: 3 additions & 0 deletions config_defaults_inc.php
Expand Up @@ -2019,6 +2019,9 @@
# Profile Related Settings
#############################

# Enable Profiles
$g_enable_profiles = ON;

# Add profile threshold
$g_add_profile_threshold = REPORTER;

Expand Down
17 changes: 11 additions & 6 deletions core/columns_api.php
Expand Up @@ -26,7 +26,7 @@
* Get a list of standard columns.
*/
function columns_get_standard() {
return array(
$t_array = array(
'additional_information',
'attachment',
'bugnotes_count',
Expand All @@ -39,10 +39,14 @@ function columns_get_standard() {
'fixed_in_version',
'handler_id',
'id',
'last_updated',
'os',
'os_build',
'platform',
'last_updated'
);

if( ON == config_get( 'enable_profiles' ) ) {
$t_array = array_merge( $t_array, array( 'os', 'os_build', 'platform' ) );
}

$t_array =array_merge( $t_array, array(
'priority',
'project_id',
'projection',
Expand All @@ -58,7 +62,8 @@ function columns_get_standard() {
'target_version',
'version',
'view_state',
);
) );
return $t_array;
}

/**
Expand Down
25 changes: 21 additions & 4 deletions core/filter_api.php
Expand Up @@ -2029,7 +2029,9 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_RESOLUTION_ID . '[]';?>" id="show_resolution_filter"><?php PRINT lang_get( 'resolution' )?>:</a>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . 'show_profile[]';?>" id="show_profile_filter"><?php PRINT lang_get( 'profile' )?>:</a>
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php PRINT $t_filters_url . 'show_profile[]';?>" id="show_profile_filter"><?php PRINT lang_get( 'profile' )?>:</a>
<?php } ?>
</td>
<?php if( $t_filter_cols > 8 ) {
echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '">&nbsp;</td>';
Expand Down Expand Up @@ -2249,6 +2251,7 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<td class="small-caption" valign="top" id="show_profile_filter_target">
<?php
$t_output = '';
Expand Down Expand Up @@ -2284,6 +2287,9 @@ function filter_draw_selection_area2( $p_page_number, $p_for_screen = true, $p_e
}
?>
</td>
<?php } else { ?>
<td></td>
<?php } ?>
<?php if( $t_filter_cols > 8 ) {
echo '<td class="small-caption" valign="top" colspan="' . ( $t_filter_cols - 8 ) . '">&nbsp;</td>';
}?>
Expand Down Expand Up @@ -2732,13 +2738,19 @@ function SwitchDateFields() {
</tr>
<tr <?php PRINT "class=\"" . $t_trclass . "\"";?>>
<td class="small-caption" valign="top">
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_PLATFORM;?>" id="platform_filter"><?php echo lang_get( 'platform' )?>:</a>
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php echo $t_filters_url . FILTER_PROPERTY_PLATFORM;?>" id="platform_filter"><?php echo lang_get( 'platform' )?>:</a>
<?php } ?>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_OS;?>" id="os_filter"><?php echo lang_get( 'os' )?>:</a>
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_OS;?>" id="os_filter"><?php echo lang_get( 'os' )?>:</a>
<?php } ?>
</td>
<td class="small-caption" valign="top">
<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_OS_BUILD;?>" id="os_build_filter"><?php echo lang_get( 'os_version' )?>:</a>
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<a href="<?php PRINT $t_filters_url . FILTER_PROPERTY_OS_BUILD;?>" id="os_build_filter"><?php echo lang_get( 'os_version' )?>:</a>
<?php } ?>
</td>
<td class="small-caption" valign="top" colspan="5">
<?php if ( access_has_global_level( config_get( 'tag_view_threshold' ) ) ) { ?>
Expand All @@ -2750,6 +2762,7 @@ function SwitchDateFields() {
}?>
</tr>
<tr class="row-1">
<?php if( ON == config_get( 'enable_profiles' ) ) { ?>
<td class="small-caption" valign="top" id="platform_filter_target">
<?php
print_multivalue_field( FILTER_PROPERTY_PLATFORM, $t_filter[FILTER_PROPERTY_PLATFORM] );
Expand All @@ -2765,6 +2778,10 @@ function SwitchDateFields() {
print_multivalue_field( FILTER_PROPERTY_OS_BUILD, $t_filter[FILTER_PROPERTY_OS_BUILD] );
?>
</td>
<?php } else {?>
<td colspan="3">&nbsp;</td>
<?php } ?>

<td class="small-caption" valign="top" id="tag_string_filter_target" colspan="5">
<?php
$t_tag_string = $t_filter[FILTER_PROPERTY_TAG_STRING];
Expand Down

0 comments on commit 9004805

Please sign in to comment.