Vergleich portal.php - 1.4.10 - 1.4.15

  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: portal.php 4472 2009-10-07 08:32:44Z Tomm $

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

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 32Zeile 32
	}
}


	}
}


$templatelist = "portal_welcome,portal_welcome_membertext,portal_stats,portal_search,portal_whosonline_memberbit,portal_whosonline,portal_latestthreads_thread_lastpost,portal_latestthreads_thread,portal_latestthreads,portal_announcement_numcomments_no,portal_announcement,portal_announcement_numcomments,portal";

$templatelist = "portal_welcome,portal_welcome_membertext,portal_stats,portal_search,portal_whosonline_memberbit,portal_whosonline,portal_latestthreads_thread_lastpost,portal_latestthreads_thread,portal_latestthreads,portal_announcement_numcomments_no,portal_announcement,portal_announcement_numcomments,portal_pms,portal";


require_once $change_dir."/global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once $change_dir."/global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 103Zeile 103


// get forums user cannot view



// get forums user cannot view

$unviewable = get_unviewable_forums();

$unviewable = get_unviewable_forums(true);

if($unviewable)
{
$unviewwhere = " AND fid NOT IN ($unviewable)";

if($unviewable)
{
$unviewwhere = " AND fid NOT IN ($unviewable)";

Zeile 114Zeile 114
	if($mybb->user['uid'] != 0)
{
// Get number of new posts, threads, announcements

	if($mybb->user['uid'] != 0)
{
// Get number of new posts, threads, announcements

		$query = $db->simple_select("posts", "COUNT(pid) AS newposts", "dateline>'".$mybb->user['lastvisit']."' $unviewwhere");

		$query = $db->simple_select("posts", "COUNT(pid) AS newposts", "visible=1 AND dateline>'".$mybb->user['lastvisit']."' $unviewwhere");

		$newposts = $db->fetch_field($query, "newposts");
if($newposts)
{ // if there aren't any new posts, there is no point in wasting two more queries

		$newposts = $db->fetch_field($query, "newposts");
if($newposts)
{ // if there aren't any new posts, there is no point in wasting two more queries

			$query = $db->simple_select("threads", "COUNT(tid) AS newthreads", "dateline>'".$mybb->user['lastvisit']."' $unviewwhere");

			$query = $db->simple_select("threads", "COUNT(tid) AS newthreads", "visible=1 AND dateline>'".$mybb->user['lastvisit']."' $unviewwhere");

			$newthreads = $db->fetch_field($query, "newthreads");

			$newthreads = $db->fetch_field($query, "newthreads");

			$query = $db->simple_select("threads", "COUNT(tid) AS newann", "dateline>'".$mybb->user['lastvisit']."' AND fid IN (".$mybb->settings['portal_announcementsfid'].") $unviewwhere");

			$query = $db->simple_select("threads", "COUNT(tid) AS newann", "visible=1 AND dateline>'".$mybb->user['lastvisit']."' AND fid IN (".$mybb->settings['portal_announcementsfid'].") $unviewwhere");

			$newann = $db->fetch_field($query, "newann");
if(!$newthreads)
{

			$newann = $db->fetch_field($query, "newann");
if(!$newthreads)
{

Zeile 402Zeile 402
$tids = '';
$comma = '';
$query = $db->query("

$tids = '';
$comma = '';
$query = $db->query("

	SELECT p.pid, p.message, p.tid

	SELECT p.pid, p.message, p.tid, p.smilieoff

	FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE t.fid IN (".$announcementsfids.") AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.firstpost=p.pid

	FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
WHERE t.fid IN (".$announcementsfids.") AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.firstpost=p.pid

Zeile 435Zeile 435

$announcements = '';
$query = $db->query("


$announcements = '';
$query = $db->query("

	SELECT t.*, t.username AS threadusername, u.username, u.avatar

	SELECT t.*, t.username AS threadusername, u.username, u.avatar, u.avatardimensions

	FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE t.fid IN (".$announcementsfids.") AND t.tid IN (0{$tids}) AND t.visible='1' AND t.closed NOT LIKE 'moved|%'

	FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE t.fid IN (".$announcementsfids.") AND t.tid IN (0{$tids}) AND t.visible='1' AND t.closed NOT LIKE 'moved|%'

Zeile 446Zeile 446
{
$announcement['message'] = $posts[$announcement['tid']]['message'];
$announcement['pid'] = $posts[$announcement['tid']]['pid'];

{
$announcement['message'] = $posts[$announcement['tid']]['message'];
$announcement['pid'] = $posts[$announcement['tid']]['pid'];

 
	$announcement['smilieoff'] = $posts[$announcement['tid']]['smilieoff'];

	$announcement['threadlink'] = get_thread_link($announcement['tid']);

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

	$announcement['threadlink'] = get_thread_link($announcement['tid']);

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