Vergleich inc/functions_forumlist.php - 1.6.3 - 1.6.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: functions_forumlist.php 5380 2011-02-21 12:04:43Z Tomm $

 * $Id: functions_forumlist.php 5711 2011-12-08 15:22:29Z Tomm $

 */

/**

 */

/**

Zeile 18Zeile 18
*/
function build_forumbits($pid=0, $depth=1)
{

*/
function build_forumbits($pid=0, $depth=1)
{

	global $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;


	global $db, $fcache, $moderatorcache, $forumpermissions, $theme, $mybb, $templates, $bgcolor, $collapsed, $lang, $showdepth, $plugins, $parser, $forum_viewers;
static $private_forums;

	
$forum_listing = '';


	
$forum_listing = '';


Zeile 48Zeile 49
				continue;
}


				continue;
}


			$plugins->run_hooks_by_ref("build_forumbits_forum", $forum);

			$forum = $plugins->run_hooks("build_forumbits_forum", $forum);


// Build the link to this forum
$forum_url = get_forum_link($forum['fid']);


// Build the link to this forum
$forum_url = get_forum_link($forum['fid']);

Zeile 65Zeile 66
			if($permissions['canonlyviewownthreads'] == 1)
{
$hideinfo = true;

			if($permissions['canonlyviewownthreads'] == 1)
{
$hideinfo = true;

				$hidelastpostinfo = true;
}



















































// If we only see our own threads, find out if there's a new post in one of them so the lightbulb shows
if(!is_array($private_forums))
{
$private_forums = $fids = array();
foreach($fcache[$pid] as $parent_p)
{
foreach($parent_p as $forum_p)
{
if($forumpermissions[$forum_p['fid']]['canonlyviewownthreads'])
{
$fids[] = $forum_p['fid'];
}
}
}

if(!empty($fids))
{
$fids = implode(',', $fids);
$query = $db->simple_select("threads", "tid, fid, lastpost", "uid = '{$mybb->user['uid']}' AND fid IN ({$fids})", array("order_by" => "lastpost", "order_dir" => "desc"));

while($thread = $db->fetch_array($query))
{
if(!$private_forums[$thread['fid']])
{
$private_forums[$thread['fid']] = $thread;
}
}
}
}

if($private_forums[$forum['fid']]['lastpost'])
{
$forum['lastpost'] = $private_forums[$forum['fid']]['lastpost'];

$lastpost_data = array(
"lastpost" => $private_forums[$forum['fid']]['lastpost']
);
}
}
else
{
$lastpost_data = array(
"lastpost" => $forum['lastpost'],
"lastpostsubject" => $forum['lastpostsubject'],
"lastposter" => $forum['lastposter'],
"lastposttid" => $forum['lastposttid'],
"lastposteruid" => $forum['lastposteruid']
);
}


			if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']))
{
$hideinfo = true;
$showlockicon = 1;
}

			if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password']))
{
$hideinfo = true;
$showlockicon = 1;
}

			
$lastpost_data = array(
"lastpost" => $forum['lastpost'],
"lastpostsubject" => $forum['lastpostsubject'],
"lastposter" => $forum['lastposter'],
"lastposttid" => $forum['lastposttid'],
"lastposteruid" => $forum['lastposteruid']
);












			// Fetch subforums of this forum
if(isset($fcache[$forum['fid']]))
{

			// Fetch subforums of this forum
if(isset($fcache[$forum['fid']]))
{

Zeile 116Zeile 157
			}

// If we are hiding information (lastpost) because we aren't authenticated against the password for this forum, remove them

			}

// If we are hiding information (lastpost) because we aren't authenticated against the password for this forum, remove them

			if($hideinfo == true || $hidelastpostinfo == true)

			if($hidelastpostinfo == true)

			{
unset($lastpost_data);
}

			{
unset($lastpost_data);
}