Skip to content

Commit

Permalink
Use new icon API functions - admin & tests
Browse files Browse the repository at this point in the history
Replace hardcoded fontawesome <i> tags with new print_icon() or
icon_get() calls.

Fixes #27828
  • Loading branch information
dregad committed Jan 8, 2021
1 parent 09477d8 commit 28291f7
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion admin/db_stats.php
Expand Up @@ -65,7 +65,7 @@ function helper_table_row_count( $p_table ) {
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-database"></i>
<?php print_icon( 'fa-database', 'ace-icon' ); ?>
<?php echo lang_get( 'mantisbt_database_statistics' ) ?>
</h4>
</div>
Expand Down
8 changes: 4 additions & 4 deletions admin/email_queue.php
Expand Up @@ -85,13 +85,13 @@

if( !$t_result ) {
echo '<div class="alert alert-sm alert-danger">';
echo '<i class="ace-icon fa fa-times fa-lg"></i> ';
print_icon( 'fa-times', 'ace-icon fa-lg' );
echo '<strong>Testing Mail</strong> - ';
echo ' PROBLEMS SENDING MAIL TO: ' . config_get_global( 'webmaster_email' ) . '. Please check your php/mail server settings.';
echo '</div>';
} else {
echo '<div class="alert alert-sm alert-success">';
echo '<i class="ace-icon fa fa-check fa-lg"></i> ';
print_icon( 'fa-check', 'ace-icon fa-lg' );
echo '<strong>Testing Mail</strong> - ';
echo ' mail() send successful.';
echo '</div>';
Expand All @@ -105,8 +105,8 @@
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-envelope"></i>
Email Queue
<?php print_icon( 'fa-envelope', 'ace-icon' ); ?>
Email Queue
</h4>
</div>
<div class="widget-body">
Expand Down
2 changes: 1 addition & 1 deletion admin/index.php
Expand Up @@ -55,7 +55,7 @@ function print_info_row( $p_description, $p_value ) {
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-download"></i>
<?php print_icon( 'fa-download', 'ace-icon' ); ?>
<?php echo lang_get( 'install_information' ) ?>
</h4>
</div>
Expand Down
17 changes: 9 additions & 8 deletions admin/move_attachments.php
Expand Up @@ -309,14 +309,15 @@ function move_attachments_to_disk( $p_type, array $p_projects ) {
echo '<div class="widget-box widget-color-blue2">';
echo '<div class="widget-header widget-header-small">';
echo '<h4 class="widget-title lighter">';
echo '<i class="ace-icon fa fa-paperclip"></i>';
printf(
"Project '%s' : %d attachments %s",
$t_row['name'],
$t_row['rows'],
( 0 == $t_row['failed']
? 'moved successfully'
: 'to move, ' . $t_row['failed'] . ' failures') );
print_icon( 'fa-paperclip', 'ace-icon' );
printf(
"Project '%s' : %d attachments %s",
$t_row['name'],
$t_row['rows'],
( 0 == $t_row['failed']
? 'moved successfully'
: 'to move, ' . $t_row['failed'] . ' failures')
);
echo '</h4>';
echo '</div>';
echo '<div class="widget-body">';
Expand Down
2 changes: 1 addition & 1 deletion admin/move_attachments_page.php
Expand Up @@ -107,7 +107,7 @@ function get_attachment_stats( $p_file_type, $p_in_db ) {
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-paperclip"></i>
<?php print_icon( 'fa-paperclip', 'ace-icon' ); ?>
<?php echo "$t_type to move"; ?>
</h4>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/system_utils.php
Expand Up @@ -43,7 +43,7 @@
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-wrench"></i>
<?php print_icon( 'fa-wrench', 'ace-icon' ); ?>
System Utilities
</h4>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/test_langs.php
Expand Up @@ -61,7 +61,7 @@
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-text-width"></i>
<?php print_icon( 'fa-text-width', 'ace-icon' ); ?>
Test Langs
</h4>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tests/Mantis/PrepareTest.php
Expand Up @@ -92,7 +92,7 @@ public function providerEmailLink() {
$t_text = 'Link Text';
$t_tooltip = 'Tooltip';
$t_button_classes = 'class="noprint blue zoom-130"';
$t_button_text = sprintf( '<i class="fa fa-envelope-o bigger-115"></i>&nbsp;%s', $t_text );
$t_button_text = icon_get( 'fa-envelope-o', 'bigger-115' ) . '&nbsp;' . $t_text;

$t_test_data = array(
'Basic' => array(
Expand Down

0 comments on commit 28291f7

Please sign in to comment.