Vergleich portal.php - 1.8.9 - 1.8.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 365Zeile 365
		}

$lastpostdate = my_date('relative', $thread['lastpost']);

		}

$lastpostdate = my_date('relative', $thread['lastpost']);

		$lastposter = htmlspecialchars_uni($thread['lastposter']);








		if(!$thread['lastposteruid'] && !$thread['lastposter'])
{
$lastposter = htmlspecialchars_uni($lang->guest);
}
else
{
$lastposter = htmlspecialchars_uni($thread['lastposter']);
}

		$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);

// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)

		$thread['replies'] = my_number_format($thread['replies']);
$thread['views'] = my_number_format($thread['views']);

// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)

		{

		{

			$lastposterlink = $lastposter;

			$lastposterlink = $lastposter;

		}

		}

		else

		else

		{

		{

			$lastposterlink = build_profile_link($lastposter, $thread['lastposteruid']);

			$lastposterlink = build_profile_link($lastposter, $thread['lastposteruid']);

		}



		}

$thread['subject'] = $thread['fullsubject'] = $parser->parse_badwords($thread['subject']);

		if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
}

		if(my_strlen($thread['subject']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
}

		$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));



		$thread['subject'] = htmlspecialchars_uni($thread['subject']);
$thread['fullsubject'] = htmlspecialchars_uni($thread['fullsubject']);


		$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
$thread['forumlink'] = get_forum_link($thread['fid']);

		$thread['threadlink'] = get_thread_link($thread['tid']);
$thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
$thread['forumlink'] = get_forum_link($thread['fid']);

Zeile 409Zeile 420
		// First validate announcement fids:
$announcementsfids = explode(',', (string)$mybb->settings['portal_announcementsfid']);
if(is_array($announcementsfids))

		// First validate announcement fids:
$announcementsfids = explode(',', (string)$mybb->settings['portal_announcementsfid']);
if(is_array($announcementsfids))

		{

		{

			foreach($announcementsfids as $fid)
{
$fid_array[] = (int)$fid;

			foreach($announcementsfids as $fid)
{
$fid_array[] = (int)$fid;

Zeile 419Zeile 430
			$announcementsfids = implode(',', $fid_array);

$annfidswhere = " AND t.fid IN ($announcementsfids)";

			$announcementsfids = implode(',', $fid_array);

$annfidswhere = " AND t.fid IN ($announcementsfids)";

		}
}

		}
}


// And get them!
foreach($forum_cache as $fid => $f)


// And get them!
foreach($forum_cache as $fid => $f)

Zeile 428Zeile 439
		if(empty($fid_array) || (is_array($fid_array) && in_array($fid, $fid_array)))
{
$forum[$fid] = $f;

		if(empty($fid_array) || (is_array($fid_array) && in_array($fid, $fid_array)))
{
$forum[$fid] = $f;

		}
}


		}
}


	$query = $db->simple_select("threads t", "COUNT(t.tid) AS threads", "t.visible='1'{$annfidswhere}{$tunviewwhere} AND t.closed NOT LIKE 'moved|%'", array('limit' => 1));
$announcementcount = $db->fetch_field($query, "threads");


	$query = $db->simple_select("threads t", "COUNT(t.tid) AS threads", "t.visible='1'{$annfidswhere}{$tunviewwhere} AND t.closed NOT LIKE 'moved|%'", array('limit' => 1));
$announcementcount = $db->fetch_field($query, "threads");


Zeile 534Zeile 545
			$announcement['threadlink'] = get_thread_link($announcement['tid']);
$announcement['forumlink'] = get_forum_link($announcement['fid']);
$announcement['forumname'] = $forum_cache[$announcement['fid']]['name'];

			$announcement['threadlink'] = get_thread_link($announcement['tid']);
$announcement['forumlink'] = get_forum_link($announcement['fid']);
$announcement['forumname'] = $forum_cache[$announcement['fid']]['name'];



 
			$announcement['username'] = htmlspecialchars_uni($announcement['username']);

			$announcement['username'] = htmlspecialchars_uni($announcement['username']);

			$announcement['threadusername'] = htmlspecialchars_uni($announcement['threadusername']);








			if(!$announcement['uid'] && !$announcement['threadusername'])
{
$announcement['threadusername'] = htmlspecialchars_uni($lang->guest);
}
else
{
$announcement['threadusername'] = htmlspecialchars_uni($announcement['threadusername']);
}


if($announcement['uid'] == 0)
{


if($announcement['uid'] == 0)
{

Zeile 589Zeile 606
			$plugins->run_hooks("portal_announcement");

$parser_options = array(

			$plugins->run_hooks("portal_announcement");

$parser_options = array(

				"allow_html" => $forum[$announcement['fid']]['allowhtml'],

				"allow_html" => $mybb->settings['announcementshtml'] && $forum[$announcement['fid']]['allowhtml'],

				"allow_mycode" => $forum[$announcement['fid']]['allowmycode'],
"allow_smilies" => $forum[$announcement['fid']]['allowsmilies'],
"allow_imgcode" => $forum[$announcement['fid']]['allowimgcode'],

				"allow_mycode" => $forum[$announcement['fid']]['allowmycode'],
"allow_smilies" => $forum[$announcement['fid']]['allowsmilies'],
"allow_imgcode" => $forum[$announcement['fid']]['allowimgcode'],