1
0
Fork 0

Fix friend entries having GET removal links in some cases

master
Anonymous Contributor 2023-08-23 18:16:36 +02:00
parent 5d6b6565cd
commit bf07367b0c
1 changed files with 5 additions and 5 deletions

View File

@ -37,16 +37,16 @@
include 'app/OpenSim.php'; include 'app/OpenSim.php';
$opensim = new OpenSim(); $opensim = new OpenSim();
$entry = '<tr><td>'.trim($opensim->getUserName($Friend)).'</td><td><a href="index.php?page=friends&action=remove&uuid='.$row['Friend'].'">LÖSCHEN</a></td></tr>'; $name = trim($opensim->getUserName($Friend));
if(count($FriendData) > 1) {
if(count($FriendData) > 1)
{
$FriendData[1] = str_replace("http://", "", $FriendData[1]); $FriendData[1] = str_replace("http://", "", $FriendData[1]);
$FriendData[1] = str_replace("https://", "", $FriendData[1]); $FriendData[1] = str_replace("https://", "", $FriendData[1]);
$FriendData[1] = str_replace("/", "", $FriendData[1]); $FriendData[1] = str_replace("/", "", $FriendData[1]);
$entry = '<tr><td>'.htmlspecialchars(trim($opensim->getUserName($Friend)).' @ '.strtolower($FriendData[1])).'</td><td><form action="index.php?page=friends" method="post">%%CSRF%%<input type="hidden" name="uuid" value="'.htmlspecialchars($row['Friend']).'"><button type="submit" name="remove" class="btn btn-danger btn-sm">LÖSCHEN</button></form></td></tr>'; $name = $name.' @ '.strtolower($FriendData[1]);
} }
$entry = '<tr><td>'.htmlspecialchars($name).'</td><td><form action="index.php?page=friends" method="post">%%CSRF%%<input type="hidden" name="uuid" value="'.htmlspecialchars($row['Friend']).'"><button type="submit" name="remove" class="btn btn-danger btn-sm">LÖSCHEN</button></form></td></tr>';
$table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table); $table = str_replace("%%ENTRY%%", $entry."%%ENTRY%%", $table);
} }