Vergleich misc.php - 1.8.20 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 922Zeile 922

$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$version = $mybb->get_input('version');


$fid = $mybb->get_input('fid', MyBB::INPUT_INT);
$version = $mybb->get_input('version');

	$new_limit = $mybb->get_input('limit', MyBB::INPUT_INT);

 
	$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);

	$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);

	$limit = 15;
if(!empty($new_limit) && $new_limit != $limit)
{
$limit = $new_limit;
}
$feedurl = '';
$add = false;


	$limit = $mybb->get_input('limit', MyBB::INPUT_INT);
$url = $mybb->settings['bburl']."/syndication.php";
$syndicate = $urlquery = array();






	add_breadcrumb($lang->nav_syndication);
$unviewable = get_unviewable_forums();
$inactiveforums = get_inactive_forums();

	add_breadcrumb($lang->nav_syndication);
$unviewable = get_unviewable_forums();
$inactiveforums = get_inactive_forums();

	$unexp1 = explode(',', $unviewable);
$unexp2 = explode(',', $inactiveforums);
$unexp = array_merge($unexp1, $unexp2);

	$unexp = explode(',', $unviewable . ',' . $inactiveforums);







	if(is_array($forums))

	if(is_array($forums) && !in_array('all', $forums))

	{

	{

		foreach($unexp as $fid)










		foreach($forums as $fid)
{
if(ctype_digit($fid) && !in_array($fid, $unexp))
{
$syndicate[] = $fid;
$flist[$fid] = true;
}
}

if(!empty($syndicate))

		{

		{

			$unview[$fid] = true;

			$urlquery[] = "fid=". implode(",", $syndicate);

		}

		}


$syndicate = '';
$comma = '';
$all = false;
foreach($forums as $fid)
{
if($fid == "all")
{
$all = true;
break;
}
elseif(ctype_digit($fid))
{
if(!isset($unview[$fid]))
{
$syndicate .= $comma.$fid;
$comma = ",";
$flist[$fid] = true;
}
}
}
$url = $mybb->settings['bburl']."/syndication.php";
if(!$all)
{
$url .= "?fid=$syndicate";
$add = true;
}

// If the version is not RSS2.0, set the type to Atom1.0.
if($version != "rss2.0")
{
if(!$add)
{
$url .= "?";
}
else
{
$url .= "&";
}
$url .= "type=atom1.0";
$add = true;
}
if((int)$limit > 0)
{
if($limit > 50)
{
$limit = 50;
}
if(!$add)
{
$url .= "?";
}
else
{
$url .= "&";
}
if(is_numeric($limit))
{
$url .= "limit=$limit";
}
}
eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");
}
unset($GLOBALS['forumcache']);

	}

































































// If there is no version in the input, check the default (RSS2.0).


// If there is no version in the input, check the default (RSS2.0).

	if($version == "atom1.0")
{







	$json1check = $atom1check = $rss2check = "";
if($version == "json")
{
$json1check = "checked=\"checked\"";
$urlquery[] = "type=".$version;
}
elseif($version == "atom1.0")
{

		$atom1check = "checked=\"checked\"";

		$atom1check = "checked=\"checked\"";

		$rss2check = '';

		$urlquery[] = "type=".$version;

	}
else
{

	}
else
{

		$atom1check = '';

 
		$rss2check = "checked=\"checked\"";

		$rss2check = "checked=\"checked\"";

	}













	}
// Evaluate, reset and set limit (Drive through settings?)
$limit = empty($limit) ? 15 : (($limit > 50) ? 50 : $limit);
$urlquery[] = "limit=" . $limit;

// Generate feed url
if(!empty($urlquery)){
$url .= "?" . implode('&', $urlquery);
}
eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");

unset($GLOBALS['forumcache']);


	$forumselect = makesyndicateforums();

$plugins->run_hooks("misc_syndication_end");

	$forumselect = makesyndicateforums();

$plugins->run_hooks("misc_syndication_end");

Zeile 1088Zeile 1044
					if(isset($flist[$forum['fid']]))
{
$optionselected = 'selected="selected"';

					if(isset($flist[$forum['fid']]))
{
$optionselected = 'selected="selected"';

						$selecteddone = "1";

 
					}

if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password'])))

					}

if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password'])))

Zeile 1100Zeile 1055
					{
$newdepth = $depth."    ";
$forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);

					{
$newdepth = $depth."    ";
$forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);

 
					}
}
else
{
if(isset($flist[$forum['fid']]))
{
unset($flist[$forum['fid']]);

					}
}
}

					}
}
}

Zeile 1108Zeile 1070

if($addselect)
{


if($addselect)
{

		$addsel = '';
if(empty($selecteddone))
{
$addsel = ' selected="selected"';
}


		$addsel = empty($flist) ? ' selected="selected"' : '';






		eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
}


		eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
}