Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
28847161
Commit
28847161
authored
Oct 20, 2021
by
Michael Iseard
Browse files
Add title attribute for message and context and limit displayed text to 255 chars
parent
69a58128
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/View/kudos-admin-debug.php
View file @
28847161
...
...
@@ -27,7 +27,7 @@ $tab = $_GET['tab'] ?? $default_tab;
<?php
$url
=
admin_url
(
'admin.php?page=kudos-debug'
);
$url
=
admin_url
(
'admin.php?page=kudos-debug'
);
switch
(
$tab
)
:
...
...
@@ -37,7 +37,8 @@ $tab = $_GET['tab'] ?? $default_tab;
$log_array
=
LoggerService
::
get_as_array
();
?>
<p>
Kudos Donations logs to the "
<?php
echo
LoggerService
::
get_table_name
()
?>
" table in the database.
</p>
<p>
Kudos Donations logs to the "
<?php
echo
LoggerService
::
get_table_name
()
?>
" table in the
database.
</p>
<form
style=
"display:inline-block;"
action=
"
<?php
echo
esc_url
(
$url
);
?>
"
method=
'post'
>
...
...
@@ -59,8 +60,10 @@ $tab = $_GET['tab'] ?? $default_tab;
<?php
foreach
(
$log_array
as
$key
=>
$log
)
{
$level
=
LoggerService
::
getLevelName
(
$log
[
'level'
]
);
$style
=
'border-left-width: 4px; border-left-style: solid;'
;
$level
=
LoggerService
::
getLevelName
(
$log
[
'level'
]
);
$style
=
'border-left-width: 4px; border-left-style: solid;'
;
$message
=
esc_textarea
(
$log
[
'message'
]
);
$context
=
esc_textarea
(
$log
[
'context'
]
);
switch
(
$level
)
{
case
'CRITICAL'
:
...
...
@@ -89,11 +92,11 @@ $tab = $_GET['tab'] ?? $default_tab;
<td>
<?php
echo
esc_attr
(
$level
);
?>
</td>
<td>
<?php
echo
(
esc_textarea
(
$log
[
'message'
]
)
);
?>
<td
title=
"
<?php
echo
(
$message
);
?>
"
>
<?php
echo
(
substr
(
$message
,
0
,
255
)
);
?>
</td>
<td>
<?php
echo
(
esc_textarea
(
$log
[
'context'
]
)
);
?>
<td
title=
"
<?php
echo
(
$context
);
?>
"
>
<?php
echo
(
substr
(
$context
,
0
,
255
)
);
?>
</td>
</tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment