Skip to content

Commit

Permalink
Cache use of lang_get within loop on print_all_bug_page_word.php
Browse files Browse the repository at this point in the history
This fixes a possible performance hit introduced in
94902e7.

Cache the result of a lang_get() call once, and use the variable within
the loop. We don't want to make many expensive calls to lang_get() if it
can be avoided.
  • Loading branch information
davidhicks committed Sep 26, 2009
1 parent 34e491c commit 8ccf314
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion print_all_bug_page_word.php
Expand Up @@ -86,6 +86,7 @@
$t_date_format = config_get( 'normal_date_format' );
$t_short_date_format = config_get( 'short_date_format' );

$t_lang_bug_view_title = lang_get( 'bug_view_title' );
$t_lang_id = lang_get( 'id' );
$t_lang_category = lang_get( 'category' );
$t_lang_severity = lang_get( 'severity' );
Expand Down Expand Up @@ -148,7 +149,7 @@
<table class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="3">
<?php echo lang_get( 'bug_view_title' ) ?>
<?php echo $t_lang_bug_view_title ?>
</td>
</tr>
<tr>
Expand Down

0 comments on commit 8ccf314

Please sign in to comment.