mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
Feed debug fix.
This commit is contained in:
@@ -83,21 +83,22 @@ if(ADMIN && e_AJAX_REQUEST && varset($_GET['mode']) == 'addons' )
|
|||||||
$tag = 'infopanel_'.$type;
|
$tag = 'infopanel_'.$type;
|
||||||
|
|
||||||
$cache = e107::getCache();
|
$cache = e107::getCache();
|
||||||
$cache->setMD5('_');
|
|
||||||
|
|
||||||
if($text = $cache->retrieve($tag,180,true)) // check every 3 hours.
|
$feed = 'https://e107.org/feed/?limit=3&type='.$type;
|
||||||
|
|
||||||
|
if($text = $cache->retrieve($tag,180,true, true)) // check every 3 hours.
|
||||||
{
|
{
|
||||||
echo $text;
|
echo $text;
|
||||||
|
|
||||||
if(e_DEBUG === true)
|
if(e_DEBUG === true)
|
||||||
{
|
{
|
||||||
echo "<span class='label label-warning'>Cached</span>";
|
echo "<span class='label label-warning' title='".$feed."'>Cached</span>";
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($data = e107::getXml()->getRemoteFile('https://e107.org/feed/?limit=3&type='.$type,3))
|
if($data = e107::getXml()->getRemoteFile($feed,3))
|
||||||
{
|
{
|
||||||
$rows = e107::getXml()->parseXml($data, 'advanced');
|
$rows = e107::getXml()->parseXml($data, 'advanced');
|
||||||
// print_a($rows);
|
// print_a($rows);
|
||||||
@@ -128,7 +129,7 @@ if(ADMIN && e_AJAX_REQUEST && varset($_GET['mode']) == 'addons' )
|
|||||||
|
|
||||||
echo $text;
|
echo $text;
|
||||||
|
|
||||||
$cache->set($tag, $text, true);
|
$cache->set($tag, $text, true, null, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
|
Reference in New Issue
Block a user