mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Updates
This commit is contained in:
parent
570d1c762a
commit
2d519f6396
28
error/outdated-plugin.php
Normal file
28
error/outdated-plugin.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description" content="">
|
||||||
|
<title>litebans-php - Outdated Plugin</title>
|
||||||
|
<link href="../inc/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="jumbotron">
|
||||||
|
<h2>Outdated Plugin</h2><br>
|
||||||
|
<div class="text-warning">
|
||||||
|
The web interface has connected to the database, but this database is managed by an older version of LiteBans.
|
||||||
|
<br>
|
||||||
|
You will need to update LiteBans before you can continue using the web interface. Older versions are not supported.
|
||||||
|
<br>
|
||||||
|
Updates can be downloaded here: https://www.spigotmc.org/resources/litebans.3715/
|
||||||
|
<br>
|
||||||
|
LiteBans will automatically upgrade the tables in the database after you have updated. After this, the web interface will work as normal.
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<a href="../" class="btn btn-default">Try Again</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -137,7 +137,7 @@ class Page {
|
|||||||
// Under certain versions of PHP, there is a bug with BIT columns.
|
// Under certain versions of PHP, there is a bug with BIT columns.
|
||||||
// An empty string is returned no matter what the value is.
|
// An empty string is returned no matter what the value is.
|
||||||
// Workaround: cast to unsigned.
|
// Workaround: cast to unsigned.
|
||||||
$selection = "id,uuid,reason,banned_by_name,banned_by_uuid,time,until,CAST(active AS UNSIGNED) AS active";
|
$selection = "id,uuid,reason,banned_by_name,banned_by_uuid,removed_by_name,time,until,CAST(active AS UNSIGNED) AS active";
|
||||||
if ($table === $this->settings->table['warnings']) {
|
if ($table === $this->settings->table['warnings']) {
|
||||||
$selection .= ",CAST(warned AS UNSIGNED) AS warned";
|
$selection .= ",CAST(warned AS UNSIGNED) AS warned";
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,9 @@ final class Settings {
|
|||||||
if (strstr($message, "Base table or view not found:")) {
|
if (strstr($message, "Base table or view not found:")) {
|
||||||
$settings->redirect("error/tables-not-found.php");
|
$settings->redirect("error/tables-not-found.php");
|
||||||
}
|
}
|
||||||
|
if (strstr($message, "Unknown column")) {
|
||||||
|
$settings->redirect("error/outdated-plugin.php");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
die('Database error: ' . $message);
|
die('Database error: ' . $message);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user