Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: search.php 5380 2011-02-21 12:04:43Z Tomm $
| * $Id$
|
*/
|
*/
|
| |
define("IN_MYBB", 1); define("IGNORE_CLEAN_VARS", "sid"); define('THIS_SCRIPT', 'search.php');
|
define("IN_MYBB", 1); define("IGNORE_CLEAN_VARS", "sid"); define('THIS_SCRIPT', 'search.php');
|
|
|
$templatelist = "search,forumdisplay_thread_gotounread,search_results_threads_thread,search_results_threads,search_results_posts,search_results_posts_post"; $templatelist .= ",multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage";
|
$templatelist = "search,forumdisplay_thread_gotounread,search_results_threads_thread,search_results_threads,search_results_posts,search_results_posts_post"; $templatelist .= ",multipage_nextpage,multipage_page_current,multipage_page,multipage_start,multipage_end,multipage,forumdisplay_thread_multipage_more,forumdisplay_thread_multipage_page,forumdisplay_thread_multipage";
|
$templatelist .= ",search_results_posts_inlinecheck,search_results_posts_nocheck,search_results_threads_inlinecheck,search_results_threads_nocheck,search_results_inlinemodcol,search_results_posts_inlinemoderation_custom_tool,search_results_posts_inlinemoderation_custom,search_results_posts_inlinemoderation,search_results_threads_inlinemoderation_custom_tool,search_results_threads_inlinemoderation_custom,search_results_threads_inlinemoderation,search_orderarrow,search_moderator_options"; $templatelist .= ",forumdisplay_thread_attachment_count,forumdisplay_threadlist_inlineedit_js,search_threads_inlinemoderation_selectall";
| $templatelist .= ",search_results_posts_inlinecheck,search_results_posts_nocheck,search_results_threads_inlinecheck,search_results_threads_nocheck,search_results_inlinemodcol,search_results_posts_inlinemoderation_custom_tool"; $templatelist .= ",search_results_posts_inlinemoderation_custom,search_results_posts_inlinemoderation,search_results_threads_inlinemoderation_custom_tool,search_results_threads_inlinemoderation_custom,search_results_threads_inlinemoderation,search_orderarrow,search_moderator_options"; $templatelist .= ",forumdisplay_thread_attachment_count,forumdisplay_threadlist_inlineedit_js,search_threads_inlinemoderation_selectall,search_posts_inlinemoderation_selectall,multipage_prevpage";
|
require_once "./global.php";
|
require_once "./global.php";
|
|
|
require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_search.php"; require_once MYBB_ROOT."inc/class_parser.php";
| require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_search.php"; require_once MYBB_ROOT."inc/class_parser.php";
|
Zeile 49 | Zeile 51 |
---|
$limitsql = ""; if(intval($mybb->settings['searchhardlimit']) > 0) {
|
$limitsql = ""; if(intval($mybb->settings['searchhardlimit']) > 0) {
|
$limitsql = "ORDER BY t.dateline DESC LIMIT ".intval($mybb->settings['searchhardlimit']);
| $limitsql = "LIMIT ".intval($mybb->settings['searchhardlimit']);
|
}
if($mybb->input['action'] == "results")
| }
if($mybb->input['action'] == "results")
|
Zeile 66 | Zeile 68 |
---|
$plugins->run_hooks("search_results_start");
// Decide on our sorting fields and sorting order.
|
$plugins->run_hooks("search_results_start");
// Decide on our sorting fields and sorting order.
|
$order = my_strtolower(htmlspecialchars($mybb->input['order'])); $sortby = my_strtolower(htmlspecialchars($mybb->input['sortby']));
| $order = my_strtolower(htmlspecialchars_uni($mybb->input['order'])); $sortby = my_strtolower(htmlspecialchars_uni($mybb->input['sortby']));
|
switch($sortby) {
| switch($sortby) {
|
Zeile 127 | Zeile 129 |
---|
$oppsort = $lang->desc; }
|
$oppsort = $lang->desc; }
|
if(!$mybb->settings['threadsperpage'])
| if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
|
{ $mybb->settings['threadsperpage'] = 20; }
| { $mybb->settings['threadsperpage'] = 20; }
|
Zeile 184 | Zeile 186 |
---|
ORDER BY pid, disporder ");
|
ORDER BY pid, disporder ");
|
$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']);
|
} else {
| } else {
|
Zeile 197 | Zeile 199 |
---|
ORDER BY pid, disporder "); }
|
ORDER BY pid, disporder "); }
|
|
|
while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
| while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
|
Zeile 207 | Zeile 210 |
---|
} } $readforums[$forum['fid']] = $forum['lastread'];
|
} } $readforums[$forum['fid']] = $forum['lastread'];
|
}
| }
|
$fpermissions = forum_permissions(); // Inline Mod Column for moderators
| $fpermissions = forum_permissions(); // Inline Mod Column for moderators
|
Zeile 243 | Zeile 246 |
---|
// Normal moderators $moderated_forums = '0'; while($forum = $db->fetch_array($query))
|
// Normal moderators $moderated_forums = '0'; while($forum = $db->fetch_array($query))
|
{
| {
|
$moderated_forums .= ','.$forum['fid']; } $unapproved_where = "(t.visible>0 OR (t.visible=0 AND t.fid IN ({$moderated_forums})))";
| $moderated_forums .= ','.$forum['fid']; } $unapproved_where = "(t.visible>0 OR (t.visible=0 AND t.fid IN ({$moderated_forums})))";
|
Zeile 258 | Zeile 261 |
---|
if($search['querycache'] != "") { $where_conditions = $search['querycache'];
|
if($search['querycache'] != "") { $where_conditions = $search['querycache'];
|
$query = $db->simple_select("threads t", "t.tid", $where_conditions. " AND {$unapproved_where} AND t.closed NOT LIKE 'moved|%' {$limitsql}");
| $query = $db->simple_select("threads t", "t.tid", $where_conditions. " AND {$unapproved_where} AND t.closed NOT LIKE 'moved|%' ORDER BY t.lastpost DESC {$limitsql}");
|
while($thread = $db->fetch_array($query)) { $threads[$thread['tid']] = $thread['tid'];
| while($thread = $db->fetch_array($query)) { $threads[$thread['tid']] = $thread['tid'];
|
Zeile 268 | Zeile 271 |
---|
if($threadcount > 0) { $search['threads'] = implode(",", $threads);
|
if($threadcount > 0) { $search['threads'] = implode(",", $threads);
|
}
| }
|
// No results. else {
| // No results. else {
|
Zeile 288 | Zeile 291 |
---|
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 302 | Zeile 333 |
---|
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|%' ORDER BY $sortfield $order LIMIT $start, $perpage
| WHERE $where_conditions AND {$unapproved_where} {$permsql} AND t.closed NOT LIKE 'moved|%' ORDER BY $sortfield $order LIMIT $start, $perpage
|
"); $thread_cache = array(); while($thread = $db->fetch_array($query))
|
"); $thread_cache = array(); while($thread = $db->fetch_array($query))
|
{
| {
|
$thread_cache[$thread['tid']] = $thread; } $thread_ids = implode(",", array_keys($thread_cache)); if(empty($thread_ids))
|
$thread_cache[$thread['tid']] = $thread; } $thread_ids = implode(",", array_keys($thread_cache)); if(empty($thread_ids))
|
{
| {
|
error($lang->error_nosearchresults);
|
error($lang->error_nosearchresults);
|
}
| }
|
// Fetch dot icons if enabled if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && $thread_cache)
| // Fetch dot icons if enabled if($mybb->settings['dotfolders'] != 0 && $mybb->user['uid'] && $thread_cache)
|
Zeile 325 | Zeile 356 |
---|
while($thread = $db->fetch_array($query)) { $thread_cache[$thread['tid']]['dot_icon'] = 1;
|
while($thread = $db->fetch_array($query)) { $thread_cache[$thread['tid']]['dot_icon'] = 1;
|
} }
| } }
|
// Fetch the read threads. if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0)
|
// Fetch the read threads. if($mybb->user['uid'] && $mybb->settings['threadreadcut'] > 0)
|
{
| {
|
$query = $db->simple_select("threadsread", "tid,dateline", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")"); while($readthread = $db->fetch_array($query)) { $thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline']; }
|
$query = $db->simple_select("threadsread", "tid,dateline", "uid='".$mybb->user['uid']."' AND tid IN(".$thread_ids.")"); while($readthread = $db->fetch_array($query)) { $thread_cache[$readthread['tid']]['lastread'] = $readthread['dateline']; }
|
| }
if(!$mybb->settings['maxmultipagelinks']) { $mybb->settings['maxmultipagelinks'] = 5;
|
}
foreach($thread_cache as $thread)
| }
foreach($thread_cache as $thread)
|
Zeile 368 | Zeile 404 |
---|
if($icon_cache[$thread['icon']]) { $posticon = $icon_cache[$thread['icon']];
|
if($icon_cache[$thread['icon']]) { $posticon = $icon_cache[$thread['icon']];
|
| $posticon['path'] = htmlspecialchars_uni($posticon['path']); $posticon['name'] = htmlspecialchars_uni($posticon['name']);
|
$icon = "<img src=\"".$posticon['path']."\" alt=\"".$posticon['name']."\" />"; } else
|
$icon = "<img src=\"".$posticon['path']."\" alt=\"".$posticon['name']."\" />"; } else
|
{
| {
|
$icon = " ";
|
$icon = " ";
|
}
| }
|
if($thread['poll'])
|
if($thread['poll'])
|
{
| {
|
$prefix = $lang->poll_prefix; }
| $prefix = $lang->poll_prefix; }
|
Zeile 383 | Zeile 421 |
---|
$folder = ''; $folder_label = ''; if($thread['dot_icon'])
|
$folder = ''; $folder_label = ''; if($thread['dot_icon'])
|
{
| {
|
$folder = "dot_"; $folder_label .= $lang->icon_dot; }
| $folder = "dot_"; $folder_label .= $lang->icon_dot; }
|
Zeile 395 | Zeile 433 |
---|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$thread['fid']];
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$thread['fid']];
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff; }
| $read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff; }
|
} else {
| } else {
|
Zeile 455 | Zeile 493 |
---|
} $folder .= "folder";
|
} $folder .= "folder";
|
if(!$mybb->settings['postsperpage'])
| if(!$mybb->settings['postsperpage'] || (int)$mybb->settings['postsperpage'] < 1)
|
{
|
{
|
$mybb->settings['postperpage'] = 20;
| $mybb->settings['postsperpage'] = 20;
|
}
$thread['pages'] = 0;
| }
$thread['pages'] = 0;
|
Zeile 473 | Zeile 511 |
---|
{ $thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage']; $thread['pages'] = ceil($thread['pages']);
|
{ $thread['pages'] = $thread['posts'] / $mybb->settings['postsperpage']; $thread['pages'] = ceil($thread['pages']);
|
if($thread['pages'] > 4)
| if($thread['pages'] > $mybb->settings['maxmultipagelinks'])
|
{
|
{
|
$pagesstop = 4;
| $pagesstop = $mybb->settings['maxmultipagelinks'] - 1;
|
$page_link = get_thread_link($thread['tid'], $thread['pages']).$highlight; eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";"); }
| $page_link = get_thread_link($thread['tid'], $thread['pages']).$highlight; eval("\$morelink = \"".$templates->get("forumdisplay_thread_multipage_more")."\";"); }
|
Zeile 526 | Zeile 564 |
---|
}
// 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"; }
|
Zeile 596 | Zeile 634 |
---|
$lang->all_selected = $lang->sprintf($lang->all_selected, intval($threadcount)); $lang->select_all = $lang->sprintf($lang->select_all, intval($threadcount)); eval("\$selectall = \"".$templates->get("search_threads_inlinemoderation_selectall")."\";");
|
$lang->all_selected = $lang->sprintf($lang->all_selected, intval($threadcount)); $lang->select_all = $lang->sprintf($lang->select_all, intval($threadcount)); eval("\$selectall = \"".$templates->get("search_threads_inlinemoderation_selectall")."\";");
|
|
|
$customthreadtools = ''; switch($db->type) {
| $customthreadtools = ''; switch($db->type) {
|
Zeile 618 | Zeile 656 |
---|
eval("\$customthreadtools = \"".$templates->get("search_results_threads_inlinemoderation_custom")."\";"); } eval("\$inlinemod = \"".$templates->get("search_results_threads_inlinemoderation")."\";");
|
eval("\$customthreadtools = \"".$templates->get("search_results_threads_inlinemoderation_custom")."\";"); } eval("\$inlinemod = \"".$templates->get("search_results_threads_inlinemoderation")."\";");
|
} $plugins->run_hooks("search_results_end");
| } $plugins->run_hooks("search_results_end");
|
eval("\$searchresults = \"".$templates->get("search_results_threads")."\";"); output_page($searchresults);
| eval("\$searchresults = \"".$templates->get("search_results_threads")."\";"); output_page($searchresults);
|
Zeile 630 | Zeile 668 |
---|
if(!$search['posts']) { error($lang->error_nosearchresults);
|
if(!$search['posts']) { error($lang->error_nosearchresults);
|
}
| }
|
$postcount = 0; // Moderators can view unapproved threads
| $postcount = 0; // Moderators can view unapproved threads
|
Zeile 643 | Zeile 681 |
---|
$t_unapproved_where = "visible < 0"; } elseif($db->num_rows($query))
|
$t_unapproved_where = "visible < 0"; } elseif($db->num_rows($query))
|
{
| {
|
// Normal moderators $moderated_forums = '0'; while($forum = $db->fetch_array($query))
| // Normal moderators $moderated_forums = '0'; while($forum = $db->fetch_array($query))
|
Zeile 651 | Zeile 689 |
---|
$moderated_forums .= ','.$forum['fid']; $test_moderated_forums[$forum['fid']] = $forum['fid']; }
|
$moderated_forums .= ','.$forum['fid']; $test_moderated_forums[$forum['fid']] = $forum['fid']; }
|
$p_unapproved_where = "visible >= 0";
| $p_unapproved_where = "(visible > 0 OR (visible=0 AND fid IN ({$moderated_forums})))";
|
$t_unapproved_where = "visible < 0 AND fid NOT IN ({$moderated_forums})"; } else
| $t_unapproved_where = "visible < 0 AND fid NOT IN ({$moderated_forums})"; } else
|
Zeile 668 | Zeile 706 |
---|
} if(strpos($sortfield, 'p.') !== false)
|
} if(strpos($sortfield, 'p.') !== false)
|
{
| {
|
$post_cache_options['order_by'] = str_replace('p.', '', $sortfield); $post_cache_options['order_dir'] = $order; }
| $post_cache_options['order_by'] = str_replace('p.', '', $sortfield); $post_cache_options['order_dir'] = $order; }
|
Zeile 692 | Zeile 730 |
---|
while($thread = $db->fetch_array($query)) { if(array_key_exists($thread['tid'], $tids) != false)
|
while($thread = $db->fetch_array($query)) { if(array_key_exists($thread['tid'], $tids) != false)
|
{
| {
|
$temp_pids = $tids[$thread['tid']]; foreach($temp_pids as $pid) {
| $temp_pids = $tids[$thread['tid']]; foreach($temp_pids as $pid) {
|
Zeile 752 | Zeile 790 |
---|
if(!$post['visible']) { $bgcolor = 'trow_shaded';
|
if(!$post['visible']) { $bgcolor = 'trow_shaded';
|
}
| }
|
if($post['userusername']) { $post['username'] = $post['userusername'];
| if($post['userusername']) { $post['username'] = $post['userusername'];
|
Zeile 765 | Zeile 803 |
---|
if($icon_cache[$post['icon']]) { $posticon = $icon_cache[$post['icon']];
|
if($icon_cache[$post['icon']]) { $posticon = $icon_cache[$post['icon']];
|
| $posticon['path'] = htmlspecialchars_uni($posticon['path']); $posticon['name'] = htmlspecialchars_uni($posticon['name']);
|
$icon = "<img src=\"".$posticon['path']."\" alt=\"".$posticon['name']."\" />"; } else
| $icon = "<img src=\"".$posticon['path']."\" alt=\"".$posticon['name']."\" />"; } else
|
Zeile 775 | Zeile 815 |
---|
if($forumcache[$thread['fid']]) { $post['forumlink'] = "<a href=\"".get_forum_link($post['fid'])."\">".$forumcache[$post['fid']]['name']."</a>";
|
if($forumcache[$thread['fid']]) { $post['forumlink'] = "<a href=\"".get_forum_link($post['fid'])."\">".$forumcache[$post['fid']]['name']."</a>";
|
} else
| } else
|
{ $post['forumlink'] = "";
|
{ $post['forumlink'] = "";
|
}
| }
|
// Determine the folder $folder = ''; $folder_label = '';
| // Determine the folder $folder = ''; $folder_label = '';
|
Zeile 788 | Zeile 828 |
---|
$donenew = 0; $last_read = 0; $post['thread_lastread'] = $readthreads[$post['tid']];
|
$donenew = 0; $last_read = 0; $post['thread_lastread'] = $readthreads[$post['tid']];
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $post['thread_lastpost'] > $forumread)
| if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$post['fid']]; $read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff; } } else { $forum_read = $forumsread[$post['fid']]; }
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $post['thread_lastpost'] > $forum_read)
|
{ $cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($post['thread_lastpost'] > $cutoff)
| { $cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($post['thread_lastpost'] > $cutoff)
|
Zeile 813 | Zeile 869 |
---|
if(!$last_read) { $readcookie = $threadread = my_get_array_cookie("threadread", $post['tid']);
|
if(!$last_read) { $readcookie = $threadread = my_get_array_cookie("threadread", $post['tid']);
|
if($readcookie > $forumread)
| if($readcookie > $forum_read)
|
{ $last_read = $readcookie; }
|
{ $last_read = $readcookie; }
|
elseif($forumread > $mybb->user['lastvisit'])
| elseif($forum_read > $mybb->user['lastvisit'])
|
{
|
{
|
$last_read = $forumread;
| $last_read = $forum_read;
|
} else {
| } else {
|
Zeile 844 | Zeile 900 |
---|
$folder .= "hot"; $folder_label .= $lang->icon_hot; }
|
$folder .= "hot"; $folder_label .= $lang->icon_hot; }
|
if($thread['thread_closed'] == 1)
| if($post['thread_closed'] == 1)
|
{ $folder .= "lock"; $folder_label .= $lang->icon_lock;
| { $folder .= "lock"; $folder_label .= $lang->icon_lock;
|
Zeile 928 | Zeile 984 |
---|
$num_results = $db->num_rows($query); $lang->page_selected = $lang->sprintf($lang->page_selected, intval($num_results)); $lang->select_all = $lang->sprintf($lang->select_all, intval($postcount));
|
$num_results = $db->num_rows($query); $lang->page_selected = $lang->sprintf($lang->page_selected, intval($num_results)); $lang->select_all = $lang->sprintf($lang->select_all, intval($postcount));
|
$lang->all_selected = $lang->sprintf($lang->page_selected, intval($postcount));
| $lang->all_selected = $lang->sprintf($lang->all_selected, intval($postcount));
|
eval("\$selectall = \"".$templates->get("search_posts_inlinemoderation_selectall")."\";"); $customthreadtools = $customposttools = '';
| eval("\$selectall = \"".$templates->get("search_posts_inlinemoderation_selectall")."\";"); $customthreadtools = $customposttools = '';
|
Zeile 1165 | Zeile 1221 |
---|
elseif($mybb->input['action'] == "getnew") {
|
elseif($mybb->input['action'] == "getnew") {
|
$where_sql = "t.lastpost >= '".$mybb->user['lastvisit']."'";
| $where_sql = "t.lastpost >= '".intval($mybb->user['lastvisit'])."'";
|
if($mybb->input['fid']) {
| if($mybb->input['fid']) {
|
Zeile 1414 | Zeile 1470 |
---|
{ $sortorder = "desc"; }
|
{ $sortorder = "desc"; }
|
$sortby = htmlspecialchars($mybb->input['sortby']);
| $sortby = htmlspecialchars_uni($mybb->input['sortby']);
|
$plugins->run_hooks("search_do_search_end"); redirect("search.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults); }
| $plugins->run_hooks("search_do_search_end"); redirect("search.php?action=results&sid=".$sid."&sortby=".$sortby."&order=".$sortorder, $lang->redirect_searchresults); }
|
Zeile 1440 | Zeile 1496 |
---|
{ error($lang->error_closedinvalidforum); }
|
{ error($lang->error_closedinvalidforum); }
|
if($forum_permissions['canview'] == 0 || $forum_permissions['canviewthreads'] != 1)
| if($forum_permissions['canview'] == 0 || $forum_permissions['canviewthreads'] != 1 || (isset($forum_permissions['canonlyviewownthreads']) && $forum_permissions['canonlyviewownthreads'] != 0 && $thread['uid'] != $mybb->user['uid']))
|
{ error_no_permission(); }
| { error_no_permission(); }
|