Skip to content

Commit

Permalink
Fix html writer namespace on 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bwalkerl committed Dec 1, 2024
1 parent 1523f80 commit b7a2cf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions classes/reportbuilder/local/entities/email_bounce.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
namespace tool_emailutils\reportbuilder\local\entities;

use lang_string;
use core\output\html_writer;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\filters\number;
use core_reportbuilder\local\report\column;
Expand Down Expand Up @@ -107,7 +106,7 @@ protected function get_all_columns(): array {
->set_is_sortable(true)
->add_callback(function(int $value): string {
if ($value >= helper::get_min_bounces()) {
return html_writer::span($value, 'alert alert-danger p-2');
return \html_writer::span($value, 'alert alert-danger p-2');
}
return $value;
});
Expand Down Expand Up @@ -139,7 +138,7 @@ protected function get_all_columns(): array {
->add_callback(function(?float $value): string {
$float = format_float($value, 2);
if ($value > helper::get_bounce_ratio()) {
return html_writer::span($float, 'alert alert-danger p-2');
return \html_writer::span($float, 'alert alert-danger p-2');
}
return $float;
});
Expand Down
5 changes: 2 additions & 3 deletions classes/reportbuilder/local/entities/notification_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
namespace tool_emailutils\reportbuilder\local\entities;

use lang_string;
use core\output\html_writer;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\filters\date;
use core_reportbuilder\local\filters\text;
Expand Down Expand Up @@ -123,9 +122,9 @@ protected function get_all_columns(): array {
if (empty($subtypes)) {
return '';
} else if (in_array($subtypes, sns_notification::BLOCK_IMMEDIATELY)) {
return html_writer::span($subtypes, 'alert alert-danger p-2');
return \html_writer::span($subtypes, 'alert alert-danger p-2');
} else if (in_array($subtypes, sns_notification::BLOCK_IMMEDIATELY)) {
return html_writer::span($subtypes, 'alert alert-warning p-2');
return \html_writer::span($subtypes, 'alert alert-warning p-2');
}
return $subtypes;
});
Expand Down

0 comments on commit b7a2cf3

Please sign in to comment.