Skip to content

Commit

Permalink
Rename $tpl_ to $t_ to match our own coding guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed Sep 8, 2013
1 parent 2c08b31 commit bcd8099
Show file tree
Hide file tree
Showing 9 changed files with 538 additions and 538 deletions.
10 changes: 5 additions & 5 deletions bug_change_status_page.php
Expand Up @@ -64,11 +64,11 @@
$f_bug_id = gpc_get_int( 'id' );
$t_bug = bug_get( $f_bug_id );

$tpl_file = __FILE__;
$tpl_mantis_dir = dirname( __FILE__ ) . '/';
$tpl_show_page_header = false;
$tpl_force_readonly = true;
$tpl_fields_config_option = 'bug_change_status_page_columns';
$t_file = __FILE__;
$t_mantis_dir = dirname( __FILE__ ) . '/';
$t_show_page_header = false;
$t_force_readonly = true;
$t_fields_config_option = 'bug_change_status_page_columns';

MantisContext::SetProject( $t_bug->project_id );

Expand Down
10 changes: 5 additions & 5 deletions bug_relationship_graph.php
Expand Up @@ -179,11 +179,11 @@

<?php
$_GET['id'] = $f_bug_id;
$tpl_fields_config_option = 'bug_view_page_columns';
$tpl_show_page_header = false;
$tpl_force_readonly = true;
$tpl_mantis_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
$tpl_file = __FILE__;
$t_fields_config_option = 'bug_view_page_columns';
$t_show_page_header = false;
$t_force_readonly = true;
$t_mantis_dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
$t_file = __FILE__;

define ( 'BUG_VIEW_INC_ALLOW', true );
include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'bug_view_inc.php' );
10 changes: 5 additions & 5 deletions bug_reminder_page.php
Expand Up @@ -130,11 +130,11 @@
<br />
<?php
$_GET['id'] = $f_bug_id;
$tpl_fields_config_option = 'bug_view_page_columns';
$tpl_show_page_header = false;
$tpl_force_readonly = true;
$tpl_mantis_dir = dirname( __FILE__ ) . '/';
$tpl_file = __FILE__;
$t_fields_config_option = 'bug_view_page_columns';
$t_show_page_header = false;
$t_force_readonly = true;
$t_mantis_dir = dirname( __FILE__ ) . '/';
$t_file = __FILE__;

define ( 'BUG_VIEW_INC_ALLOW', true );
include( dirname( __FILE__ ) . '/bug_view_inc.php' );
72 changes: 36 additions & 36 deletions bug_report_page.php
Expand Up @@ -167,27 +167,27 @@
$t_fields = config_get( 'bug_report_page_columns', columns_get_default( 'bug_report_page' ) );
$t_fields = columns_filter_disabled( $t_fields );

$tpl_show_category = in_array( 'category_id', $t_fields );
$tpl_show_reproducibility = in_array( 'reproducibility', $t_fields );
$tpl_show_severity = in_array( 'severity', $t_fields );
$tpl_show_priority = in_array( 'priority', $t_fields );
$tpl_show_steps_to_reproduce = in_array( 'steps_to_reproduce', $t_fields );
$tpl_show_handler = in_array( 'handler', $t_fields ) && access_has_project_level( config_get( 'update_bug_assign_threshold' ) );
$tpl_show_profiles = config_get( 'enable_profiles' );
$tpl_show_platform = $tpl_show_profiles && in_array( 'platform', $t_fields );
$tpl_show_os = $tpl_show_profiles && in_array( 'os', $t_fields );
$tpl_show_os_version = $tpl_show_profiles && in_array( 'os_version', $t_fields );

$tpl_show_versions = version_should_show_product_version( $t_project_id );
$tpl_show_product_version = $tpl_show_versions && in_array( 'product_version', $t_fields );
$tpl_show_product_build = $tpl_show_versions && in_array( 'product_build', $t_fields ) && config_get( 'enable_product_build' ) == ON;
$tpl_show_target_version = $tpl_show_versions && in_array( 'target_version', $t_fields ) && access_has_project_level( config_get( 'roadmap_update_threshold' ) );
$tpl_show_additional_info = in_array( 'additional_info', $t_fields );
$tpl_show_due_date = in_array( 'due_date', $t_fields ) && access_has_project_level( config_get( 'due_date_update_threshold' ), helper_get_current_project(), auth_get_current_user_id() );
$tpl_show_attachments = in_array( 'attachments', $t_fields ) && file_allow_bug_upload();
$tpl_show_view_state = in_array( 'view_state', $t_fields ) && access_has_project_level( config_get( 'set_view_status_threshold' ) );

if ( $tpl_show_due_date ) {
$t_show_category = in_array( 'category_id', $t_fields );
$t_show_reproducibility = in_array( 'reproducibility', $t_fields );
$t_show_severity = in_array( 'severity', $t_fields );
$t_show_priority = in_array( 'priority', $t_fields );
$t_show_steps_to_reproduce = in_array( 'steps_to_reproduce', $t_fields );
$t_show_handler = in_array( 'handler', $t_fields ) && access_has_project_level( config_get( 'update_bug_assign_threshold' ) );
$t_show_profiles = config_get( 'enable_profiles' );
$t_show_platform = $t_show_profiles && in_array( 'platform', $t_fields );
$t_show_os = $t_show_profiles && in_array( 'os', $t_fields );
$t_show_os_version = $t_show_profiles && in_array( 'os_version', $t_fields );

$t_show_versions = version_should_show_product_version( $t_project_id );
$t_show_product_version = $t_show_versions && in_array( 'product_version', $t_fields );
$t_show_product_build = $t_show_versions && in_array( 'product_build', $t_fields ) && config_get( 'enable_product_build' ) == ON;
$t_show_target_version = $t_show_versions && in_array( 'target_version', $t_fields ) && access_has_project_level( config_get( 'roadmap_update_threshold' ) );
$t_show_additional_info = in_array( 'additional_info', $t_fields );
$t_show_due_date = in_array( 'due_date', $t_fields ) && access_has_project_level( config_get( 'due_date_update_threshold' ), helper_get_current_project(), auth_get_current_user_id() );
$t_show_attachments = in_array( 'attachments', $t_fields ) && file_allow_bug_upload();
$t_show_view_state = in_array( 'view_state', $t_fields ) && access_has_project_level( config_get( 'set_view_status_threshold' ) );

if ( $t_show_due_date ) {
require_js( 'jscalendar/calendar.js' );
require_js( 'jscalendar/lang/calendar-en.js' );
require_js( 'jscalendar/calendar-setup.js' );
Expand All @@ -203,7 +203,7 @@
?>
<br />
<div>
<form name="report_bug_form" method="post" <?php if ( $tpl_show_attachments ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php?posted=1">
<form name="report_bug_form" method="post" <?php if ( $t_show_attachments ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php?posted=1">
<?php echo form_security_field( 'bug_report' ) ?>
<table class="width90" cellspacing="1">
<tr>
Expand All @@ -216,7 +216,7 @@
<?php
event_signal( 'EVENT_REPORT_BUG_FORM_TOP', array( $t_project_id ) );

if ( $tpl_show_category ) {
if ( $t_show_category ) {
?>
<tr>
<th class="category" width="30%">
Expand All @@ -240,7 +240,7 @@
</tr>
<?php }

if ( $tpl_show_reproducibility ) {
if ( $t_show_reproducibility ) {
?>

<tr>
Expand All @@ -256,7 +256,7 @@
<?php
}

if ( $tpl_show_severity ) {
if ( $t_show_severity ) {
?>
<tr>
<th class="category">
Expand All @@ -271,7 +271,7 @@
<?php
}

if ( $tpl_show_priority ) {
if ( $t_show_priority ) {
?>
<tr>
<th class="category">
Expand All @@ -286,7 +286,7 @@
<?php
}

if ( $tpl_show_due_date ) {
if ( $t_show_due_date ) {
$t_date_to_display = '';

if ( !date_is_null( $f_due_date ) ) {
Expand All @@ -302,7 +302,7 @@
</td>
</tr>
<?php } ?>
<?php if ( $tpl_show_platform || $tpl_show_os || $tpl_show_os_version ) { ?>
<?php if ( $t_show_platform || $t_show_os || $t_show_os_version ) { ?>
<tr>
<th class="category">
<label for="profile_id"><?php echo _( 'Select Profile' ) ?></label>
Expand Down Expand Up @@ -386,7 +386,7 @@
</tr>
<?php } ?>
<?php
if ( $tpl_show_product_version ) {
if ( $t_show_product_version ) {
$t_product_version_released_mask = VERSION_RELEASED;

if (access_has_project_level( config_get( 'report_issues_for_unreleased_versions_threshold' ) ) ) {
Expand All @@ -406,7 +406,7 @@
<?php
}
?>
<?php if ( $tpl_show_product_build ) { ?>
<?php if ( $t_show_product_build ) { ?>
<tr>
<th class="category">
<label for="build"><?php echo _( 'Product Build' ) ?></label>
Expand All @@ -417,7 +417,7 @@
</tr>
<?php } ?>

<?php if ( $tpl_show_handler ) { ?>
<?php if ( $t_show_handler ) { ?>
<tr>
<th class="category">
<label for="handler_id"><?php echo _( 'Assign To' ) ?></label>
Expand All @@ -432,7 +432,7 @@
<?php } ?>

<?php // Target Version (if permissions allow)
if ( $tpl_show_target_version ) { ?>
if ( $t_show_target_version ) { ?>
<tr>
<th class="category">
<label for="target_version"><?php echo _( 'Target Version' ) ?></label>
Expand Down Expand Up @@ -462,7 +462,7 @@
</td>
</tr>

<?php if ( $tpl_show_steps_to_reproduce ) { ?>
<?php if ( $t_show_steps_to_reproduce ) { ?>
<tr>
<th class="category">
<label for="steps_to_reproduce"><?php echo _( 'Steps To Reproduce' ) ?></label>
Expand All @@ -473,7 +473,7 @@
</tr>
<?php } ?>

<?php if ( $tpl_show_additional_info ) { ?>
<?php if ( $t_show_additional_info ) { ?>
<tr>
<th class="category">
<label for="additional_info"><?php echo _( 'Additional Information' ) ?></label>
Expand Down Expand Up @@ -508,7 +508,7 @@
}
} # foreach( $t_related_custom_field_ids as $t_id )
?>
<?php if ( $tpl_show_attachments ) { // File Upload (if enabled)
<?php if ( $t_show_attachments ) { // File Upload (if enabled)
$t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );
?>
<tr>
Expand All @@ -524,7 +524,7 @@
<?php
}

if ( $tpl_show_view_state ) {
if ( $t_show_view_state ) {
?>
<tr>
<th class="category">
Expand Down

0 comments on commit bcd8099

Please sign in to comment.