Does it work on PHP 5.3.x yet? Maybe

This commit is contained in:
ruan 2015-10-09 05:11:46 +02:00
parent 162d0ede65
commit 55ebee2724
3 changed files with 4 additions and 5 deletions

View File

@ -19,7 +19,7 @@ class Page {
if (isset($_GET['page'])) { if (isset($_GET['page'])) {
$page = $_GET['page']; // user input $page = $_GET['page']; // user input
if (filter_var($page, FILTER_VALIDATE_INT)) { if (filter_var($page, FILTER_VALIDATE_INT)) {
$this->page = max(0,(int)$page); $this->page = max(0, (int)$page);
} }
} }
$this->name = $name; $this->name = $name;
@ -240,7 +240,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 && $this->active($row) === false) { if ($this->settings->show_inactive_bans && $row['active'] === "0") {
$until .= ' ' . $this->expired[$this->type]; $until .= ' ' . $this->expired[$this->type];
} }
return $until; return $until;

View File

@ -143,14 +143,13 @@ if ($st->execute(array($id))) {
$name = $info->name(); $name = $info->name();
$permanent = $info->permanent(); $permanent = $info->permanent();
$active = $page->active($row);
$page->name = "$name #$id"; $page->name = "$name #$id";
$page->print_title(); $page->print_title();
if (!($info instanceof KickInfo)) { if (!($info instanceof KickInfo)) {
$style = 'style="margin-left: 13px; font-size: 16px;"'; $style = 'style="margin-left: 13px; font-size: 16px;"';
if ($active) { if ($row['active'] === "1") {
$page->name .= "<span $style class='label label-danger'>Active</span>"; $page->name .= "<span $style class='label label-danger'>Active</span>";
} else { } else {
$page->name .= "<span $style class='label label-warning'>Inactive</span>"; $page->name .= "<span $style class='label label-warning'>Inactive</span>";

View File

@ -25,7 +25,7 @@ while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
'Warned By' => $page->get_avatar($page->get_banner_name($row), $row['banned_by_uuid']), 'Warned By' => $page->get_avatar($page->get_banner_name($row), $row['banned_by_uuid']),
'Reason' => $page->clean($row['reason']), 'Reason' => $page->clean($row['reason']),
'Warned Until' => $page->expiry($row), 'Warned Until' => $page->expiry($row),
'Received Warning' => $page->active($row, 'warned') ? "Yes" : "No", 'Received Warning' => ($row['warned'] === "1") ? "Yes" : "No",
)); ));
} }
$page->table_end(); $page->table_end();