1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Fixes "Updates to be Installed" functionality in Plugin Manager.

This commit is contained in:
Cameron 2020-12-31 10:24:13 -08:00
parent 8871cdd097
commit 60027348b4
2 changed files with 17 additions and 5 deletions

View File

@ -348,6 +348,7 @@ class plugin_ui extends e_admin_ui
function renderHelp()
{
$plg = e107::getPlug();
$plg->clearCache();
if(!$list = $plg->getUpgradableList())
{
return null;
@ -358,18 +359,17 @@ class plugin_ui extends e_admin_ui
foreach($list as $path=>$ver)
{
$plg->load($path);
$url = e_ADMIN."plugin.php?mode=installed&action=upgrade&id=".$path;
$name = $plg->getName();
$url = e_ADMIN."plugin.php?mode=installed&action=upgrade&path=".$path;
$text .= "<li class='media'>
<div class='media-left'>
<a href='".$url."'>".$plg->getIcon(32)."</a>
</div><div class='media-body'><a href='".$url."'>".$plg->getName()."</a></div></li>";
</div><div class='media-body'><a class='e-spinner' href='".$url."' title=\"".EPL_UPGRADE." ".$name." v".$ver."\">".$name."</a></div></li>";
}
$text .= "</ul>";
return array('caption'=>EPL_ADLAN_247, 'text'=>$text);
}
@ -526,6 +526,7 @@ class plugin_ui extends e_admin_ui
function upgradePage()
{
$this->pluginUpgrade();
}
@ -609,11 +610,14 @@ class plugin_ui extends e_admin_ui
$_path = e_PLUGIN.$id.'/';
if(file_exists($_path.'plugin.xml'))
{
$plugin->install_plugin_xml($id, 'upgrade');
$text = LAN_UPGRADE_SUCCESSFUL;
}
else
{
e107::getMessage()->addDebug("Running Legacy plugin upgrade. <b>".$_path."</b> not found."); // NO LAN
$eplug_folder = null;
$upgrade_alter_tables = null;
$upgrade_add_prefs = null;
@ -623,7 +627,6 @@ class plugin_ui extends e_admin_ui
$eplug_version = null;
include(e_PLUGIN.$plug['plugin_path'].'/plugin.php');
$text = '';

View File

@ -174,6 +174,15 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
$(document).ready(function()
{
$('a.e-spinner').on('click', function() {
var orig = $(this).text();
var spin = "<i class='fa fa-spin fa-spinner fa-fw'></i>";
$(this).html(orig + spin);
});
$('#e-modal-submit').click(function () {
$('#e-modal-iframe').contents().find('#etrigger-submit').trigger('click');