mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27:32 +00:00
Possible fix for expired bans with PHP <=5.3
This commit is contained in:
parent
2eb60e8a75
commit
ec48432a94
@ -220,7 +220,7 @@ class Page {
|
|||||||
} else {
|
} else {
|
||||||
$until = $this->millis_to_date($row['until']);
|
$until = $this->millis_to_date($row['until']);
|
||||||
}
|
}
|
||||||
if ($this->settings->show_inactive_bans && !$row['active']) {
|
if ($this->settings->show_inactive_bans && $this->active($row) === false) {
|
||||||
$until .= ' ' . $this->expired[$this->type];
|
$until .= ' ' . $this->expired[$this->type];
|
||||||
}
|
}
|
||||||
return $until;
|
return $until;
|
||||||
@ -353,4 +353,9 @@ class Page {
|
|||||||
$this->table = $info['table'];
|
$this->table = $info['table'];
|
||||||
$this->title = $info['title'];
|
$this->title = $info['title'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function active($row) {
|
||||||
|
$active = $row['active'];
|
||||||
|
return $active === 1 || $active === true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
2
info.php
2
info.php
@ -150,7 +150,7 @@ if ($st->execute(array($id))) {
|
|||||||
|
|
||||||
$name = $info->name();
|
$name = $info->name();
|
||||||
$permanent = $info->permanent();
|
$permanent = $info->permanent();
|
||||||
$active = $row['active'];
|
$active = $page->active($row);
|
||||||
|
|
||||||
$page->name = "$name #$id";
|
$page->name = "$name #$id";
|
||||||
$page->print_title();
|
$page->print_title();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user