mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-04 04:47:32 +00:00
Support displaying Random ID for info.php
This commit is contained in:
parent
0ca1a87b8d
commit
ff0c56124d
@ -524,6 +524,9 @@ class Page {
|
|||||||
$this->table_headers_printed = true;
|
$this->table_headers_printed = true;
|
||||||
}
|
}
|
||||||
$id = $row['id'];
|
$id = $row['id'];
|
||||||
|
if ($this->settings->info_show_random_id) {
|
||||||
|
$id = $this->obscureID->obscure($id);
|
||||||
|
}
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
foreach ($array as $header => $text) {
|
foreach ($array as $header => $text) {
|
||||||
$a = "a";
|
$a = "a";
|
||||||
|
@ -34,16 +34,20 @@ class Settings {
|
|||||||
// (Note: this feature requires LiteBans version 2.16.2 or later.)
|
// (Note: this feature requires LiteBans version 2.16.2 or later.)
|
||||||
$this->random_secret = '';
|
$this->random_secret = '';
|
||||||
|
|
||||||
|
|
||||||
// Show server scope column?
|
// Show server scope column?
|
||||||
$this->show_server_scope = false;
|
$this->show_server_scope = false;
|
||||||
|
|
||||||
// Show server origin column?
|
// Show server origin column?
|
||||||
$this->show_server_origin = false;
|
$this->show_server_origin = false;
|
||||||
|
|
||||||
// Show server scope column in info.php?
|
// Show random ID on info.php?
|
||||||
|
$this->info_show_random_id = false;
|
||||||
|
|
||||||
|
// Show server scope column on info.php?
|
||||||
$this->info_show_server_scope = false;
|
$this->info_show_server_scope = false;
|
||||||
|
|
||||||
// Show server origin column in info.php?
|
// Show server origin column on info.php?
|
||||||
$this->info_show_server_origin = true;
|
$this->info_show_server_origin = true;
|
||||||
|
|
||||||
// Show inactive bans? Removed bans will show (Unbanned), mutes will show (Unmuted), warnings will show (Expired).
|
// Show inactive bans? Removed bans will show (Unbanned), mutes will show (Unmuted), warnings will show (Expired).
|
||||||
|
6
info.php
6
info.php
@ -157,6 +157,10 @@ $page->set_info($page->type_info($type));
|
|||||||
filter_var($id, FILTER_VALIDATE_INT) or die("Invalid ID");
|
filter_var($id, FILTER_VALIDATE_INT) or die("Invalid ID");
|
||||||
|
|
||||||
$id = (int)$id;
|
$id = (int)$id;
|
||||||
|
$displayID = $id;
|
||||||
|
if ($page->settings->info_show_random_id) {
|
||||||
|
$displayID = $page->obscureID->obscure($id);
|
||||||
|
}
|
||||||
|
|
||||||
// Safe user input (constants only)
|
// Safe user input (constants only)
|
||||||
$type = $page->type;
|
$type = $page->type;
|
||||||
@ -180,7 +184,7 @@ if ($st->execute()) {
|
|||||||
$name = $page->t("generic.$type");
|
$name = $page->t("generic.$type");
|
||||||
$permanent = $info->permanent();
|
$permanent = $info->permanent();
|
||||||
|
|
||||||
$page->name = $page->title = "$name #$id";
|
$page->name = $page->title = "$name #$displayID";
|
||||||
$page->print_title();
|
$page->print_title();
|
||||||
|
|
||||||
$header = $page->name;
|
$header = $page->name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user