Fix new expiry method issues

This commit is contained in:
ruan 2017-06-29 23:19:58 +02:00
parent bfccfee536
commit 663221c76a
No known key found for this signature in database
GPG Key ID: 062534EE618F498C

View File

@ -267,8 +267,8 @@ class Page {
} else { } else {
$until = $this->millis_to_date($row['until']); $until = $this->millis_to_date($row['until']);
} }
$expired = $this->is_expired($row);
if ($this->active($row) === false) { if ($this->active($row) === false) {
$until .= ' ';
$done = false; $done = false;
@ -284,18 +284,21 @@ class Page {
$name = $this->clean($row['removed_by_name']); $name = $this->clean($row['removed_by_name']);
} }
if ($name !== null) { if ($name !== null) {
$until .= str_replace('{name}', $name, $this->expired_by[$this->type]); $until .= ' ' . str_replace('{name}', $name, $this->expired_by[$this->type]);
$done = true; $done = true;
} }
} }
if ($this->is_expired($row)) { if ($expired) {
$until .= $this->lang->page_expire;
$done = true; $done = true;
} }
if ($done === false) { if ($done === false) {
$until .= $this->expired[$this->type]; $until .= ' ' . $this->expired[$this->type];
} }
} }
if ($expired) {
$until .= ' ';
$until .= $this->lang->page_expire;
}
return $until; return $until;
} }