Vergleich inc/tasks/versioncheck.php - 1.8.0 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 19Zeile 19
	);

// Check for the latest version

	);

// Check for the latest version

	require_once MYBB_ROOT.'inc/class_xml.php';
$contents = fetch_remote_file("http://www.mybb.com/version_check.php");

	$contents = fetch_remote_file("https://mybb.com/version_check.php");



if(!$contents)
{


if(!$contents)
{

Zeile 28Zeile 27
		return false;
}


		return false;
}


	$pos = strpos($contents, "<");
if($pos > 1)
{
$contents = substr($contents, $pos);
}

$pos = strpos(strrev($contents), ">");
if($pos > 1)
{
$contents = substr($contents, 0, (-1) * ($pos-1));
}

	$contents = trim($contents);















	$parser = new XMLParser($contents);

	$parser = create_xml_parser($contents);

	$tree = $parser->get_tree();

	$tree = $parser->get_tree();


$latest_code = $tree['mybb']['version_code']['value'];
$latest_version = "<strong>".$tree['mybb']['latest_version']['value']."</strong> (".$latest_code.")";


$latest_code = (int)$tree['mybb']['version_code']['value'];
$latest_version = "<strong>".htmlspecialchars_uni($tree['mybb']['latest_version']['value'])."</strong> (".$latest_code.")";

	if($latest_code > $mybb->version_code)
{
$latest_version = "<span style=\"color: #C00;\">".$latest_version."</span>";

	if($latest_code > $mybb->version_code)
{
$latest_version = "<span style=\"color: #C00;\">".$latest_version."</span>";

Zeile 56Zeile 45
	{
$latest_version = "<span style=\"color: green;\">".$latest_version."</span>";
}

	{
$latest_version = "<span style=\"color: green;\">".$latest_version."</span>";
}





	// Check for the latest news
require_once MYBB_ROOT."inc/class_feedparser.php";

	// Check for the latest news
require_once MYBB_ROOT."inc/class_feedparser.php";





	$feed_parser = new FeedParser();
$feed_parser->parse_feed("http://feeds.feedburner.com/MyBBDevelopmentBlog");

$updated_cache['news'] = array();

	$feed_parser = new FeedParser();
$feed_parser->parse_feed("http://feeds.feedburner.com/MyBBDevelopmentBlog");

$updated_cache['news'] = array();

 

require_once MYBB_ROOT . '/inc/class_parser.php';
$post_parser = new postParser();


if($feed_parser->error == '')
{
foreach($feed_parser->items as $item)
{


if($feed_parser->error == '')
{
foreach($feed_parser->items as $item)
{

			if(isset($updated_cache['news'][2]))

			if (isset($updated_cache['news'][2]))

			{
break;
}

$updated_cache['news'][] = array(
'title' => $item['title'],

			{
break;
}

$updated_cache['news'][] = array(
'title' => $item['title'],

				'description' => preg_replace('#<img(.*)/>#', '', $item['description']),

				'description' => $item['description'],

				'link' => $item['link'],
'author' => $item['author'],
'dateline' => $item['date_timestamp']

				'link' => $item['link'],
'author' => $item['author'],
'dateline' => $item['date_timestamp']