diff --git a/e107_admin/boot.php b/e107_admin/boot.php index 6d22800b4..7f538ec02 100644 --- a/e107_admin/boot.php +++ b/e107_admin/boot.php @@ -33,6 +33,65 @@ if(ADMIN && defset('e_ADMIN_UI') && varset($_POST['mode']) == 'sef' && !empty($_ exit; } +if(ADMIN && e_AJAX_REQUEST && varset($_GET['mode']) == 'addons' ) +{ + $type = ($_GET['type'] == 'plugin') ? 'plugin' : 'theme'; + $tag = 'infopanel_'.$type; + + $cache = e107::getCache(); + $cache->setMD5('_'); + + if($text = $cache->retrieve($tag,180,true)) // check every 3 hours. + { + echo $text; + + if(e_DEBUG === true) + { + echo "Cached"; + } + exit; + } + + + if($data = e107::getXml()->getRemoteFile('http://e107.org/feed/?limit=3&type='.$type,3)) + { + $rows = e107::getXml()->parseXml($data, 'advanced'); +// print_a($rows); +// exit; + $link = ($type == 'plugin') ? e_ADMIN."plugin.php?mode=online" : e_ADMIN."theme.php?mode=online"; + + $text = "