Vergleich syndication.php - 1.6.9 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 13Zeile 13
define("IGNORE_CLEAN_VARS", "fid");
define("NO_ONLINE", 1);
define('THIS_SCRIPT', 'syndication.php');

define("IGNORE_CLEAN_VARS", "fid");
define("NO_ONLINE", 1);
define('THIS_SCRIPT', 'syndication.php');

 

$templatelist = "postbit_attachments_attachment";


require_once "./global.php";

// Load global language phrases
$lang->load("syndication");


require_once "./global.php";

// Load global language phrases
$lang->load("syndication");





// Load syndication class.
require_once MYBB_ROOT."inc/class_feedgeneration.php";
$feedgenerator = new FeedGenerator();

// Load syndication class.
require_once MYBB_ROOT."inc/class_feedgeneration.php";
$feedgenerator = new FeedGenerator();

Zeile 32Zeile 34
if($thread_limit > 50)
{
$thread_limit = 50;

if($thread_limit > 50)
{
$thread_limit = 50;

}

}

else if(!$thread_limit || $thread_limit < 0)
{
$thread_limit = 20;

else if(!$thread_limit || $thread_limit < 0)
{
$thread_limit = 20;

Zeile 68Zeile 70

// If there are no forums to syndicate, syndicate all viewable.
if(!empty($forumlist))


// If there are no forums to syndicate, syndicate all viewable.
if(!empty($forumlist))

{

{

    $forum_ids = "'-1'";
foreach($forumlist as $fid)
{

    $forum_ids = "'-1'";
foreach($forumlist as $fid)
{

Zeile 125Zeile 127
}
if(!empty($onlyusfids))
{

}
if(!empty($onlyusfids))
{

	$permsql .= "AND (fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}')";

	$permsql .= "AND ((fid IN(".implode(',', $onlyusfids).") AND uid='{$mybb->user['uid']}') OR fid NOT IN(".implode(',', $onlyusfids)."))";

}

// Get the threads to syndicate.

}

// Get the threads to syndicate.

Zeile 145Zeile 147
if(!empty($firstposts))
{
$firstpostlist = "pid IN(".$db->escape_string(implode(',', $firstposts)).")";

if(!empty($firstposts))
{
$firstpostlist = "pid IN(".$db->escape_string(implode(',', $firstposts)).")";

 

$attachments = array();
$query = $db->simple_select("attachments", "*", $firstpostlist);
while($attachment = $db->fetch_array($query))
{
if(!isset($attachments[$attachment['pid']]))
{
$attachments[$attachment['pid']] = array();
}
$attachments[$attachment['pid']][] = $attachment;
}


	$query = $db->simple_select("posts", "message, edittime, tid, fid, pid", $firstpostlist, array('order_by' => 'dateline', 'order_dir' => 'desc'));    
while($post = $db->fetch_array($query))
{

	$query = $db->simple_select("posts", "message, edittime, tid, fid, pid", $firstpostlist, array('order_by' => 'dateline', 'order_dir' => 'desc'));    
while($post = $db->fetch_array($query))
{

Zeile 156Zeile 170
			"allow_videocode" => $forumcache[$post['fid']]['allowvideocode'],
"filter_badwords" => 1
);

			"allow_videocode" => $forumcache[$post['fid']]['allowvideocode'],
"filter_badwords" => 1
);

		

		

		$parsed_message = $parser->parse_message($post['message'], $parser_options);


		$parsed_message = $parser->parse_message($post['message'], $parser_options);


		$query2 = $db->simple_select("attachments", "*", "pid=".$post['pid']);
while($attachment = $db->fetch_array($query2))

		if(isset($attachments[$post['pid']]) && is_array($attachments[$post['pid']]))


		{

		{

			$ext = get_extension($attachment['filename']);
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
$attachment['filesize'] = get_friendly_size($attachment['filesize']);
$attachment['icon'] = get_attachment_icon($ext);
eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";");
if(stripos($parsed_message, "[attachment=".$attachment['aid']."]") !== false)
{
$parsed_message = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $parsed_message);
}
else

			foreach($attachments[$post['pid']] as $attachment)










			{

			{

				$parsed_message .= "<br />".$attbit;













				$ext = get_extension($attachment['filename']);
$attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
$attachment['filesize'] = get_friendly_size($attachment['filesize']);
$attachment['icon'] = get_attachment_icon($ext);
eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";");
if(stripos($parsed_message, "[attachment=".$attachment['aid']."]") !== false)
{
$parsed_message = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $parsed_message);
}
else
{
$parsed_message .= "<br />".$attbit;
}

			}
}


			}
}