diff --git a/e107_admin/admin.php b/e107_admin/admin.php
index f0ed6e9b3..426f7449d 100644
--- a/e107_admin/admin.php
+++ b/e107_admin/admin.php
@@ -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.
diff --git a/e107_admin/boot.php b/e107_admin/boot.php
index 9fad46996..b019c6cea 100644
--- a/e107_admin/boot.php
+++ b/e107_admin/boot.php
@@ -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;
diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php
index f8e451815..5c79f37a5 100755
--- a/e107_admin/plugin.php
+++ b/e107_admin/plugin.php
@@ -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');
}
diff --git a/e107_admin/theme.php b/e107_admin/theme.php
index 70bf88c8a..876ad3283 100644
--- a/e107_admin/theme.php
+++ b/e107_admin/theme.php
@@ -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
{
diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php
index 437edaa0f..cc31b8477 100644
--- a/e107_core/shortcodes/batch/admin_shortcodes.php
+++ b/e107_core/shortcodes/batch/admin_shortcodes.php
@@ -131,6 +131,8 @@ class admin_shortcodes
$e107_var['x'.$key]['link'] = e_ADMIN.'docs.php?'.$key;
}
+ $act = null; // FIXME
+
$text = show_admin_menu(FOOTLAN_14, $act, $e107_var, FALSE, TRUE, TRUE);
return $ns -> tablerender(FOOTLAN_14,$text, array('id' => 'admin_docs', 'style' => 'button_menu'), TRUE);
}
@@ -1131,7 +1133,7 @@ class admin_shortcodes
$text .= $themeinfo ? "
".FOOTLAN_7.": ".$themeinfo : '';
- $sqlMode = str_replace(",", ", ",e107::getDB()->getMode());
+ $sqlMode = str_replace(",", ", ", e107::getDb()->getMode());
$text .= "
".FOOTLAN_8."
@@ -1152,10 +1154,10 @@ class admin_shortcodes
".FOOTLAN_12."
- ".e107::getDB()->getServerInfo(). // mySqlServerInfo.
+ ".e107::getDb()->getServerInfo(). // mySqlServerInfo.
"
".FOOTLAN_16.": ".$mySQLdefaultdb."
-
PDO: ".((e107::getDB()->getPDO() === true) ? LAN_ENABLED : LAN_DISABLED)."
+
PDO: ".((e107::getDb()->getPDO() === true) ? LAN_ENABLED : LAN_DISABLED)."
Mode: ".$sqlMode."
@@ -1411,7 +1413,7 @@ Inverse 10 10
$res = e107::getSession()->get('addons-update-status');
- if($res !== null)
+ if($res !== null) // cached version.
{
return $res;
}
@@ -1469,20 +1471,31 @@ Inverse 10 10
case "plugin":
$versions = $mp->getVersionList('plugin');
- $list = e107::getPref('plug_installed');
+ $plg = e107::getPlug();
+ $tmp = $plg->getInstalled();
+ $list = array();
+ foreach($tmp as $folder=>$version)
+ {
+ $plg->load($folder);
+ $list[$folder] = array('version'=>$version, 'author'=>$plg->getAuthor());
+ }
+
break;
}
$ret = array();
- foreach($list as $folder=>$version)
+ foreach($list as $folder=>$var)
{
+ $version = $var['version'];
+ $author = $var['author'];
- if(!empty($versions[$folder]['version']) && version_compare( $version, $versions[$folder]['version'], '<'))
+ if(!empty($versions[$folder]['version']) && version_compare( $version, $versions[$folder]['version'], '<') && ($versions[$folder]['author'] === $author))
{
$versions[$folder]['modalDownload'] = $mp->getDownloadModal($type, $versions[$folder]);
$ret[] = $versions[$folder];
e107::getMessage()->addDebug("Local version: ".$version." Remote version: ".$versions[$folder]['version']);
+ e107::getMessage()->addDebug("Local author: ".$$author." Remote author: ".$versions[$folder]['author']);
}
}
diff --git a/e107_handlers/theme_handler.php b/e107_handlers/theme_handler.php
index 275e4ad56..2b94d5751 100644
--- a/e107_handlers/theme_handler.php
+++ b/e107_handlers/theme_handler.php
@@ -447,7 +447,7 @@ class e_theme
{
foreach($this->_data as $dir=>$v)
{
- $arr[$dir] = $v['version'];
+ $arr[$dir] = array('version'=>$v['version'], 'author'=>$v['author']);
}
}