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

bugfix - update notification started giving false info after SF made changes to the way their feed works.

This commit is contained in:
CaMer0n 2007-02-08 03:37:28 +00:00
parent 944dce5102
commit d86eda0697

@ -1,4 +1,4 @@
// $Id: admin_update.sc,v 1.2 2006-12-08 21:37:09 e107coders Exp $
// $Id: admin_update.sc,v 1.3 2007-02-08 03:37:28 e107coders Exp $
global $e107cache,$ns;
if (is_readable(e_ADMIN."ver.php"))
@ -6,7 +6,7 @@
include(e_ADMIN."ver.php");
}
$feed = "http://sourceforge.net/export/rss2_projfiles.php?group_id=63748";
$feed = "http://sourceforge.net/export/rss2_projfiles.php?group_id=63748&rss_limit=70";
$e107cache->CachePageMD5 = md5($e107info['e107_version']);
if($cacheData = $e107cache->retrieve("updatecheck",3600, TRUE))
@ -25,17 +25,17 @@
}
list($cur_version,$tag) = explode(" ",$e107info['e107_version']);
$c = 0;
foreach($rss->items as $val)
{
$search = array((strstr($val['title'],"(")),"e107","released"," v");
$version = trim(str_replace($search,"",$val['title']));
if(version_compare($version,$cur_version,">"))
if(($c > 49) && version_compare($version,$cur_version)==1) // 49 being the number of old versions before this check was introduced.
{
$ftext .= "<a rel='external' href='".$val['link']."' >e107 v".$version."</a><br />\n";
$ftext = "<a rel='external' href='".$val['link']."' >e107 v".$version."</a><br />\n";
}
break;
$c++;
}
$e107cache->set("updatecheck", $ftext, TRUE);