"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/inc/tasks/versioncheck.php" between
mybb_1819.zip and mybb_1820.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

versioncheck.php  (mybb_1819):versioncheck.php  (mybb_1820)
skipping to change at line 31 skipping to change at line 31
// Check for the latest version // Check for the latest version
require_once MYBB_ROOT.'inc/class_xml.php'; require_once MYBB_ROOT.'inc/class_xml.php';
$contents = fetch_remote_file("https://mybb.com/version_check.php"); $contents = fetch_remote_file("https://mybb.com/version_check.php");
if(!$contents) if(!$contents)
{ {
add_task_log($task, $lang->task_versioncheck_ran_errors); add_task_log($task, $lang->task_versioncheck_ran_errors);
return false; return false;
} }
$pos = strpos($contents, "<"); $contents = trim($contents);
if($pos > 1)
{
$contents = substr($contents, $pos);
}
$pos = strpos(strrev($contents), ">");
if($pos > 1)
{
$contents = substr($contents, 0, (-1) * ($pos-1));
}
$parser = new XMLParser($contents); $parser = new XMLParser($contents);
$tree = $parser->get_tree(); $tree = $parser->get_tree();
$latest_code = (int)$tree['mybb']['version_code']['value']; $latest_code = (int)$tree['mybb']['version_code']['value'];
$latest_version = "<strong>".htmlspecialchars_uni($tree['mybb']['latest_v ersion']['value'])."</strong> (".$latest_code.")"; $latest_version = "<strong>".htmlspecialchars_uni($tree['mybb']['latest_v ersion']['value'])."</strong> (".$latest_code.")";
if($latest_code > $mybb->version_code) if($latest_code > $mybb->version_code)
{ {
$latest_version = "<span style=\"color: #C00;\">".$latest_version ."</span>"; $latest_version = "<span style=\"color: #C00;\">".$latest_version ."</span>";
$version_warn = 1; $version_warn = 1;
 End of changes. 1 change blocks. 
11 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)