1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Upgrade and Backward Compatibility Fixes.

This commit is contained in:
Cameron
2020-05-05 15:11:49 -07:00
parent 25f580ce2f
commit def50c174d
7 changed files with 64 additions and 10 deletions

View File

@@ -111,6 +111,7 @@ class admin_start
private $exit = false;
private $deprecated = array();
private $upgradeRequiredFirst = false;
function __construct()
{
@@ -120,6 +121,11 @@ class admin_start
return null;
}
if(!e107::getDb()->isTable('admin_log')) // Upgrade from v1.x to v2.x required.
{
$this->upgradeRequiredFirst = true;
}
// Files that can cause comflicts and problems.
$fileInspector = e107::getFileInspector();
$this->deprecated = $fileInspector->insecureFiles;
@@ -264,6 +270,13 @@ class admin_start
return null;
}
if($this->upgradeRequiredFirst)
{
$message = "<p><a class='btn btn-lg btn-primary alert-link' href='e107_update.php'>".LAN_CONTINUE." ".SEP."</a></p>";
e107::getMessage()->addInfo($message);
}
return null;
@@ -494,6 +507,11 @@ TMPO;
private function checkIncompatiblePlugins()
{
if($this->upgradeRequiredFirst)
{
return null;
}
$mes = e107::getMessage();
$installedPlugs = e107::getPref('plug_installed');
@@ -523,6 +541,11 @@ TMPO;
private function checkPasswordEncryption()
{
if($this->upgradeRequiredFirst)
{
return null;
}
$us = e107::getUserSession();
$mes = e107::getMessage();
@@ -558,7 +581,10 @@ TMPO;
private function checkDeprecated()
{
if($this->upgradeRequiredFirst)
{
return null;
}
$found = array();
foreach($this->deprecated as $path)