1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Bugtracker #3882 - reduce errors/lockups if SourceForge can't be contacted

This commit is contained in:
e107steved
2007-04-05 19:53:06 +00:00
parent 47d22181eb
commit 0a2a4b3030
2 changed files with 21 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
// $Id: admin_update.sc,v 1.4 2007-02-12 18:16:57 e107coders Exp $
// $Id: admin_update.sc,v 1.5 2007-04-05 19:53:00 e107steved Exp $
global $e107cache,$ns;
if (is_readable(e_ADMIN."ver.php"))
@@ -14,6 +14,10 @@
return $ns -> tablerender(LAN_NEWVERSION, $cacheData);
}
// Don't check for updates if running locally (comment out the next line to allow check - but
// remember it can cause delays/errors if its not possible to access the Internet
if ((strpos(e_SELF,'localhost') !== FALSE) || (strpos(e_SELF,'127.0.0.1') !== FALSE)) return '';
require_once(e_HANDLER."xml_class.php");
$xml = new parseXml;
require_once(e_HANDLER."magpie_rss.php");
@@ -22,8 +26,6 @@
if($rawData = $xml -> getRemoteXmlFile($feed))
{
$rss = new MagpieRSS( $rawData );
}
list($cur_version,$tag) = explode(" ",$e107info['e107_version']);
$c = 0;
foreach($rss->items as $val)
@@ -38,6 +40,11 @@
}
$c++;
}
}
else
{ // Error getting data
$ftext = ADLAN_154;
}
$e107cache->set("updatecheck", $ftext, TRUE);
if($ftext)

View File

@@ -4,8 +4,8 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_admin.php,v $
| $Revision: 1.3 $
| $Date: 2007-01-28 21:13:21 $
| $Revision: 1.4 $
| $Date: 2007-04-05 19:53:06 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -173,6 +173,7 @@ define("ADLAN_151", "Main");
define("ADLAN_152", "Enter Code");
define("ADLAN_153", "Administration Area");
define('ADLAN_154', "Error contacting Sourceforge to check for new version");
define('ADLAN_CL_1', 'Settings');
define('ADLAN_CL_2', 'Users');