Skip to content

Commit

Permalink
On queriesExecute, ignore case when checking for ip_padded.
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-unwin committed Nov 15, 2024
1 parent 1962a36 commit b3a718f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Views/queriesExecute.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<thead>
<tr>
<?php foreach ($data[0]->attributes as $key => $value) {
if (strrpos($key, 'ip_padded') === strlen($key) - 9) {
if (strripos($key, 'ip_padded') === strlen($key) - 9) {
continue;
}
if ($key === 'devices.icon') {
Expand All @@ -35,7 +35,7 @@
foreach ($data as $item) {
echo "<tr>\n";
foreach ($data[0]->attributes as $key => $value) {
if (strrpos($key, 'ip_padded') === strlen($key) - 9) {
if (strripos($key, 'ip_padded') === strlen($key) - 9) {
continue;
}
if ($key === 'devices.id') {
Expand All @@ -45,7 +45,7 @@
echo collection_button_read($temp[0], $item->attributes->{$key});
} elseif ($key === 'link') {
echo "<td><a href=\"" . base_url() . 'index.php/' . $item->attributes->{$key} . "\" role=\"button\" class=\"btn btn-sm btn-primary\"><span style=\"width:1rem;\" title=\"" . __('View') . "\" class=\"fa fa-eye\" aria-hidden=\"true\"></span></td>";
} elseif ((strrpos($key, 'ip') === strlen($key) - 2)) {
} elseif ((strripos($key, 'ip') === strlen($key) - 2)) {
$padded_key = substr($key, 0, strpos($key, 'ip')) . 'ip_padded';
if (!empty($item->attributes->{$padded_key})) {
echo ' <td><span style="display:none;">' . $item->attributes->{$padded_key} . '</span>' . $item->attributes->{$key} . "</td>\n";
Expand Down

0 comments on commit b3a718f

Please sign in to comment.