1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +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)

View File

@@ -363,18 +363,28 @@ e107::getJs()->renderJs('header_inline', 3);
echo "<!-- *META* -->\n";
// --- Load plugin Meta files and eplug_ before others --------
if (vartrue($pref['e_meta_list']))
/** @var array $incompatibleMeta - plugins that may cause jQuery conflicts etc if loaded. */
$incompatibleMeta = array('aa_jquery', 'fancybox', 'lightwindow', 'e107slider' );
if (!empty($pref['e_meta_list']))
{
foreach ($pref['e_meta_list'] as $val)
{
if(in_array($val,$incompatibleMeta))
{
continue;
}
if (is_readable(e_PLUGIN.$val."/e_meta.php"))
{
echo "<!-- $val meta -->\n";
echo "\n\n<!-- $val meta -->\n";
require_once (e_PLUGIN.$val."/e_meta.php");
}
}
}
unset($incompatibleMeta);
if (!USER && ($pref['user_tracking'] == "session") && varset($pref['password_CHAP'],0))

View File

@@ -125,11 +125,11 @@ if (!$dont_check_update)
// $dbupdate['218_to_219'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.8','2.1.9')), 'message'=> null, 'hide_when_complete'=>true);
// $dbupdate['217_to_218'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.7','2.1.8')), 'message'=> null, 'hide_when_complete'=>true);
$dbupdate['20x_to_220'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.x','2.2.0')), 'message'=> null, 'hide_when_complete'=>false);
$dbupdate['706_to_800'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('1.x','2.0')), 'message'=> LAN_UPDATE_29, 'hide_when_complete'=>true);
$dbupdate['20x_to_220'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.x','2.2.0')), 'message'=> null, 'hide_when_complete'=>false);
// always run these last.
$dbupdate['core_database'] = array('master'=>false, 'title'=> $LAN_UPDATE_5);