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

Fixes #3711 - check local themes/plugins against author names as well as versions before suggesting updates.

This commit is contained in:
Cameron
2019-04-11 12:28:14 -07:00
parent f148e20837
commit 18a8571ed3
6 changed files with 38 additions and 12 deletions

View File

@@ -62,8 +62,10 @@ if(in_array($pref['adminstyle'], array('infopanel', 'flexpanel')))
}
}
// DEBUG THE ADDON_UPDATED INFOPANEL
//e107::getCache()->clear('Infopanel_plugin', true);
//e107::getSession()->clear('addons-update-status');
//e107::getSession()->set('addons-update-checked',false); // set to recheck it.
define('e_ADMIN_HOME', true); // used by some admin shortcodes.

View File

@@ -56,6 +56,7 @@ if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'addons' && ($_G
{
e107::getSession()->set('addons-update-checked',true);
/** @var admin_shortcodes $sc */
$sc = e107::getScBatch('admin');
$themes = $sc->getUpdateable('theme');
@@ -64,6 +65,7 @@ if(e_AJAX_REQUEST && getperms('0') && varset($_GET['mode']) == 'addons' && ($_G
$text = $sc->renderAddonUpdate($plugins);
$text .= $sc->renderAddonUpdate($themes);
if(empty($text))
{
exit;

View File

@@ -572,6 +572,7 @@ class plugin_ui extends e_admin_ui
if(file_exists($_path.'plugin.xml'))
{
$plugin->install_plugin_xml($id, 'upgrade');
$text = LAN_UPGRADE_SUCCESSFUL;
}
else
{
@@ -656,13 +657,17 @@ class plugin_ui extends e_admin_ui
e107::getConfig('core')->save();
}
$mes->addSuccess($text);
//$plugin->save_addon_prefs('update');
// make sure ALL plugin/addon pref lists get update and are current
e107::getPlug()->clearCache()->buildAddonPrefLists();
// clear infopanel in admin dashboard.
e107::getCache()->clear('Infopanel_plugin', true);
e107::getSession()->clear('addons-update-status');
e107::getSession()->set('addons-update-checked',false); // set to recheck it.
$this->redirectAction('list');
}

View File

@@ -290,8 +290,12 @@ class theme_admin_ui extends e_admin_ui
if($this->themeObj->setTheme($id))
{
$mes->addSuccess($message);
// clear infopanel in admin dashboard.
e107::getCache()->clear('Infopanel_theme', true);
e107::getSession()->clear('addons-update-status');
e107::getSession()->set('addons-update-checked',false); // set to recheck it.
}
else
{