Vergleich forumdisplay.php - 1.4.8 - 1.4.16

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: forumdisplay.php 4322 2009-02-21 23:00:49Z Tikitiki $

 * $Id: forumdisplay.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 69Zeile 69
$currentitem = $fid;
build_forum_breadcrumb($fid);
$parentlist = $foruminfo['parentlist'];

$currentitem = $fid;
build_forum_breadcrumb($fid);
$parentlist = $foruminfo['parentlist'];

 

// To validate, turn & to & but keep unicode support
$foruminfo['name'] = preg_replace("#&(?!\#[0-9]+;)#si", "&", $foruminfo['name']);


$forumpermissions = forum_permissions();
$fpermissions = $forumpermissions[$fid];


$forumpermissions = forum_permissions();
$fpermissions = $forumpermissions[$fid];





if($fpermissions['canview'] != 1)

if($fpermissions['canview'] != 1)

{

{

	error_no_permission();
}

	error_no_permission();
}





if($mybb->user['uid'] == 0)
{
// Build a forum cache.

if($mybb->user['uid'] == 0)
{
// Build a forum cache.

Zeile 89Zeile 92
	");

$forumsread = unserialize($mybb->cookies['mybb']['forumread']);

	");

$forumsread = unserialize($mybb->cookies['mybb']['forumread']);

 

if(!is_array($forumsread))
{
$forumsread = array();
}

}
else
{

}
else
{

Zeile 552Zeile 560
	switch($db->type)
{
case "pgsql":

	switch($db->type)
{
case "pgsql":

			$ratingadd = '';
$query = $db->query("
SELECT t.numratings, t.totalratings, t.tid
FROM ".TABLE_PREFIX."threads t
WHERE t.fid='$fid' $tvisibleonly $datecutsql2
ORDER BY t.sticky DESC, t.$sortfield $sortordernow $sortfield2
LIMIT $start, $perpage
");
while($thread = $db->fetch_array($query))
{
if($thread['totalratings'] == 0)
{
$rating = 0;
}
else
{
$rating = $thread['totalratings'] / $thread['numratings'];
}

$avaragerating[$thread['tid']] = $rating;
}
$t = "t.";
$sortfield = "lastpost";

			$ratingadd = "CASE WHEN t.numratings=0 THEN 0 ELSE t.totalratings/t.numratings::numeric END AS averagerating, ";























			break;
default:
$ratingadd = "(t.totalratings/t.numratings) AS averagerating, ";

			break;
default:
$ratingadd = "(t.totalratings/t.numratings) AS averagerating, ";

Zeile 620Zeile 606
	WHERE a.startdate<='$time' AND (a.enddate>='$time' OR a.enddate='0') AND ($sql OR fid='-1')
ORDER BY a.startdate DESC $limit
");

	WHERE a.startdate<='$time' AND (a.enddate>='$time' OR a.enddate='0') AND ($sql OR fid='-1')
ORDER BY a.startdate DESC $limit
");

 
$bgcolor = alt_trow(true); // Reset the trow colours

while($announcement = $db->fetch_array($query))
{
if($announcement['startdate'] > $mybb->user['lastvisit'])

while($announcement = $db->fetch_array($query))
{
if($announcement['startdate'] > $mybb->user['lastvisit'])

Zeile 640Zeile 627
	$posttime = my_date($mybb->settings['timeformat'], $announcement['startdate']);
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);


	$posttime = my_date($mybb->settings['timeformat'], $announcement['startdate']);
$announcement['profilelink'] = build_profile_link($announcement['username'], $announcement['uid']);


	if($foruminfo['allowtratings'] != 0)

	if($foruminfo['allowtratings'] != 0 && $fpermissions['canviewthreads'] != 0)

	{
eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";");
$lpbackground = "trow2";

	{
eval("\$rating = \"".$templates->get("forumdisplay_announcement_rating")."\";");
$lpbackground = "trow2";

Zeile 686Zeile 673
	");
while($thread = $db->fetch_array($query))
{

	");
while($thread = $db->fetch_array($query))
{

		if($db->type == "pgsql")
{
$thread['averagerating'] = $averagerating[$thread['tid']];
}


 
		$threadcache[$thread['tid']] = $thread;

// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread

		$threadcache[$thread['tid']] = $thread;

// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread

Zeile 698Zeile 680
		{
$tid = substr($thread['closed'], 6);
if(!$tids[$tid])

		{
$tid = substr($thread['closed'], 6);
if(!$tids[$tid])

			{

			{

				$moved_threads[$tid] = $thread['tid'];
$tids[$thread['tid']] = $tid;
}

				$moved_threads[$tid] = $thread['tid'];
$tids[$thread['tid']] = $tid;
}

Zeile 722Zeile 704
if($tids)
{
$tids = implode(",", $tids);

if($tids)
{
$tids = implode(",", $tids);

}

}


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && $threadcache)


// Check participation by the current user in any of these threads - for 'dot' folder icons
if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && $threadcache)

Zeile 754Zeile 736
		if($threadcache[$readthread['tid']])
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];

		if($threadcache[$readthread['tid']])
{
$threadcache[$readthread['tid']]['lastread'] = $readthread['dateline'];

		}

		}

	}
}


	}
}


Zeile 1017Zeile 999
		if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)
{
$inline_edit_class = "subject_editable";

		if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $can_edit_titles == 1) || $ismod == true)
{
$inline_edit_class = "subject_editable";

		}
else

		}
else

		{
$inline_edit_class = "";
}

		{
$inline_edit_class = "";
}

Zeile 1033Zeile 1015
		if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

		if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

		}

		}

		else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}

		else
{
$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}





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


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


Zeile 1048Zeile 1030
			if($thread['unapprovedposts'] > 1)
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_posts_count, $thread['unapprovedposts']);

			if($thread['unapprovedposts'] > 1)
{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_posts_count, $thread['unapprovedposts']);

			}
else

			}
else

			{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_post_count, 1);
}

			{
$unapproved_posts_count = $lang->sprintf($lang->thread_unapproved_post_count, 1);
}





			$unapproved_posts = " <span title=\"{$unapproved_posts_count}\">(".my_number_format($thread['unapprovedposts']).")</span>";

			$unapproved_posts = " <span title=\"{$unapproved_posts_count}\">(".my_number_format($thread['unapprovedposts']).")</span>";

		}

		}

		else

		else

		{

		{

			$unapproved_posts = '';
}


			$unapproved_posts = '';
}


Zeile 1065Zeile 1047
		if($thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)

		if($thread['attachmentcount'] > 0)
{
if($thread['attachmentcount'] > 1)

			{

			{

				$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);

				$attachment_count = $lang->sprintf($lang->attachment_count_multiple, $thread['attachmentcount']);

			}

			}

			else
{
$attachment_count = $lang->attachment_count;

			else
{
$attachment_count = $lang->attachment_count;

Zeile 1081Zeile 1063
		}

eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

		}

eval("\$threads .= \"".$templates->get("forumdisplay_thread")."\";");

	}

	}


$customthreadtools = '';
if($ismod)


$customthreadtools = '';
if($ismod)

Zeile 1114Zeile 1096
if(fetch_unread_count($fid) == 0 && $unread_forums == 0)
{
mark_forum_read($fid);

if(fetch_unread_count($fid) == 0 && $unread_forums == 0)
{
mark_forum_read($fid);

}


}



// Subscription status
$query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));


// Subscription status
$query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));

Zeile 1123Zeile 1105
{
$add_remove_subscription = 'remove';
$add_remove_subscription_text = $lang->unsubscribe_forum;

{
$add_remove_subscription = 'remove';
$add_remove_subscription_text = $lang->unsubscribe_forum;

}

}

else
{
$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_forum;
}

else
{
$add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_forum;
}







// Is this a real forum with threads?
if($foruminfo['type'] != "c")
{
if(!$threadcount)
{
eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");

// Is this a real forum with threads?
if($foruminfo['type'] != "c")
{
if(!$threadcount)
{
eval("\$threads = \"".$templates->get("forumdisplay_nothreads")."\";");

	}


	}


	if($foruminfo['password'] != '')

	if($foruminfo['password'] != '')

	{

	{

		eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");
}


		eval("\$clearstoredpass = \"".$templates->get("forumdisplay_threadlist_clearpass")."\";");
}


	if($load_inline_edit_js == 1)







	if($load_inline_edit_js == 1)
{
eval("\$inline_edit_js = \"".$templates->get("forumdisplay_threadlist_inlineedit_js")."\";");
}

$post_code_string = '';
if($mybb->user['uid'])

	{

	{

		eval("\$inline_edit_js = \"".$templates->get("forumdisplay_threadlist_inlineedit_js")."\";");

		$post_code_string = "&my_post_key=".$mybb->post_code;

	}

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));

	}

$lang->rss_discovery_forum = $lang->sprintf($lang->rss_discovery_forum, htmlspecialchars_uni(strip_tags($foruminfo['name'])));