Skip to content

Commit bb16b8e

Browse files
committed
Fix html writer namespace on 4.4
1 parent 1523f80 commit bb16b8e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

classes/reportbuilder/local/entities/email_bounce.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
namespace tool_emailutils\reportbuilder\local\entities;
1818

1919
use lang_string;
20-
use core\output\html_writer;
2120
use core_reportbuilder\local\entities\base;
2221
use core_reportbuilder\local\filters\number;
2322
use core_reportbuilder\local\report\column;
@@ -107,7 +106,7 @@ protected function get_all_columns(): array {
107106
->set_is_sortable(true)
108107
->add_callback(function(int $value): string {
109108
if ($value >= helper::get_min_bounces()) {
110-
return html_writer::span($value, 'alert alert-danger p-2');
109+
return \html_writer::span($value, 'alert alert-danger p-2');
111110
}
112111
return $value;
113112
});
@@ -139,7 +138,7 @@ protected function get_all_columns(): array {
139138
->add_callback(function(?float $value): string {
140139
$float = format_float($value, 2);
141140
if ($value > helper::get_bounce_ratio()) {
142-
return html_writer::span($float, 'alert alert-danger p-2');
141+
return \html_writer::span($float, 'alert alert-danger p-2');
143142
}
144143
return $float;
145144
});

classes/reportbuilder/local/entities/notification_log.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
namespace tool_emailutils\reportbuilder\local\entities;
1818

1919
use lang_string;
20-
use core\output\html_writer;
2120
use core_reportbuilder\local\entities\base;
2221
use core_reportbuilder\local\filters\date;
2322
use core_reportbuilder\local\filters\text;
@@ -123,9 +122,9 @@ protected function get_all_columns(): array {
123122
if (empty($subtypes)) {
124123
return '';
125124
} else if (in_array($subtypes, sns_notification::BLOCK_IMMEDIATELY)) {
126-
return html_writer::span($subtypes, 'alert alert-danger p-2');
125+
return \html_writer::span($subtypes, 'alert alert-danger p-2');
127126
} else if (in_array($subtypes, sns_notification::BLOCK_IMMEDIATELY)) {
128-
return html_writer::span($subtypes, 'alert alert-warning p-2');
127+
return \html_writer::span($subtypes, 'alert alert-warning p-2');
129128
}
130129
return $subtypes;
131130
});

0 commit comments

Comments
 (0)