Vergleich search.php - 1.6.0 - 1.6.4

  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: search.php 5160 2010-08-01 09:46:26Z RyanGordon $

 * $Id: search.php 5442 2011-04-16 09:09:38Z jammerx2 $

 */



 */



Zeile 288Zeile 288
				error($lang->error_nosearchresults);
}
$threadcount = $count['resultcount'];

				error($lang->error_nosearchresults);
}
$threadcount = $count['resultcount'];

 
		}

$permsql = "";
$onlyusfids = array();

// Check group permissions if we can't view threads not started by us
$group_permissions = forum_permissions();
foreach($group_permissions as $fid => $forum_permissions)
{
if($forum_permissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;
}
}
if(!empty($onlyusfids))
{
$permsql .= "AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";
}

$unsearchforums = get_unsearchable_forums();
if($unsearchforums)
{
$permsql .= " AND t.fid NOT IN ($unsearchforums)";
}
$inactiveforums = get_inactive_forums();
if($inactiveforums)
{
$permsql .= " AND t.fid NOT IN ($inactiveforums)";

		}

// Begin selecting matching threads, cache them.

		}

// Begin selecting matching threads, cache them.

Zeile 302Zeile 330
			FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid=t.prefix)

			FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid=t.prefix)

			WHERE $where_conditions AND {$unapproved_where} AND t.closed NOT LIKE 'moved|%'

			WHERE $where_conditions AND {$unapproved_where} {$permsql} AND t.closed NOT LIKE 'moved|%'

			ORDER BY $sortfield $order
LIMIT $start, $perpage
");

			ORDER BY $sortfield $order
LIMIT $start, $perpage
");

Zeile 526Zeile 554
			}

// If this user is the author of the thread and it is not closed or they are a moderator, they can edit

			}

// If this user is the author of the thread and it is not closed or they are a moderator, they can edit

			if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $fpermissions[$thread['fid']]['caneditposts'] == 1) || is_moderator($fid, "caneditposts"))

			if(($thread['uid'] == $mybb->user['uid'] && $thread['closed'] != 1 && $mybb->user['uid'] != 0 && $fpermissions[$thread['fid']]['caneditposts'] == 1) || is_moderator($thread['fid'], "caneditposts"))

			{
$inline_edit_class = "subject_editable";
}

			{
$inline_edit_class = "subject_editable";
}