Possible fix for expired bans with PHP <=5.3

This commit is contained in:
ruan 2015-09-24 09:30:08 +02:00
parent 2eb60e8a75
commit ec48432a94
2 changed files with 7 additions and 2 deletions

View File

@ -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;
}
} }

View File

@ -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();