Skip to content

Commit

Permalink
Only retrieve language string once
Browse files Browse the repository at this point in the history
Code optimization
  • Loading branch information
dregad committed Mar 20, 2017
1 parent f1ea5ab commit 18ead4c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions adm_config_report.php
Expand Up @@ -515,7 +515,11 @@ function check_config_value( $p_config ) {
<!-- Config Set Form -->
<div class="space-10"></div>

<?php if( config_can_delete( $t_edit_option ) ){ ?>
<?php
if( config_can_delete( $t_edit_option ) ) {
$t_action_label = lang_get( 'set_configuration_option_action_' . $t_edit_action );
?>

<div id="config-edit-div">
<form id="config_set_form" method="post" action="adm_config_set.php">

Expand All @@ -524,7 +528,7 @@ function check_config_value( $p_config ) {
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-sliders"></i>
<?php echo lang_get( 'set_configuration_option_action_' . $t_edit_action ) ?>
<?php echo $t_action_label; ?>
</h4>
</div>

Expand Down Expand Up @@ -615,16 +619,20 @@ function check_config_value( $p_config ) {
<div class="widget-toolbox padding-4 clearfix">
<input type="hidden" name="action" value="<?php echo $t_edit_action; ?>" />
<input type="submit" name="config_set" class="btn btn-primary btn-white btn-round"
value="<?php echo lang_get( 'set_configuration_option_action_' . $t_edit_action ) ?>"/>
value="<?php echo $t_action_label; ?>"/>
</div>
</div>
</div>
</div>
</form>
</div>
<?php } # end if config_can_delete ?>

<?php
} # end user can change config
echo '</div>';
} # end if config_can_delete
} # end if user can change config (read-write access)
?>

</div>

<?php
layout_page_end();

0 comments on commit 18ead4c

Please sign in to comment.