Zeile 44 | Zeile 44 |
---|
$options = array( "limit" => 1 );
|
$options = array( "limit" => 1 );
|
$query = $db->simple_select("posts", "tid", "pid=".$mybb->get_input('pid', MyBB::INPUT_INT), $options);
| $query = $db->simple_select("posts", "fid,tid,visible", "pid=".$mybb->get_input('pid', MyBB::INPUT_INT), $options);
|
$post = $db->fetch_array($query);
|
$post = $db->fetch_array($query);
|
if(empty($post))
| if(empty($post) || ($post['visible'] == 0 && !is_moderator($post['fid'], 'canviewunapprove')) || ($post['visible'] == -1 && !is_moderator($post['fid'], 'canviewdeleted')))
|
{ // post does not exist --> show corresponding error error($lang->error_invalidpost);
| { // post does not exist --> show corresponding error error($lang->error_invalidpost);
|
Zeile 121 | Zeile 121 |
---|
else { $ismod = false;
|
else { $ismod = false;
|
| $visibleonly = " AND visible=1"; $visibleonly2 = "AND p.visible=1 AND t.visible=1";
|
}
// Make sure we are looking at a real thread here.
| }
// Make sure we are looking at a real thread here.
|
Zeile 256 | Zeile 258 |
---|
{ // show them to the last post $mybb->input['action'] = "lastpost";
|
{ // show them to the last post $mybb->input['action'] = "lastpost";
|
} }
| } }
|
// Jump to the last post. if($mybb->input['action'] == "lastpost")
| // Jump to the last post. if($mybb->input['action'] == "lastpost")
|
Zeile 284 | Zeile 286 |
---|
); $query = $db->simple_select('posts', 'pid', "tid={$tid} {$visibleonly}", $options); $pid = $db->fetch_field($query, "pid");
|
); $query = $db->simple_select('posts', 'pid', "tid={$tid} {$visibleonly}", $options); $pid = $db->fetch_field($query, "pid");
|
}
| }
|
header("Location: ".htmlspecialchars_decode(get_post_link($pid, $tid))."#pid{$pid}"); exit; }
| header("Location: ".htmlspecialchars_decode(get_post_link($pid, $tid))."#pid{$pid}"); exit; }
|
Zeile 304 | Zeile 306 |
---|
if(!$nextthread['tid']) { error($lang->error_nonextnewest);
|
if(!$nextthread['tid']) { error($lang->error_nonextnewest);
|
} $options = array( "limit_start" => 0, "limit" => 1, "order_by" => "dateline", "order_dir" => "desc" );
| } $options = array( "limit_start" => 0, "limit" => 1, "order_by" => "dateline", "order_dir" => "desc" );
|
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);
|
$query = $db->simple_select('posts', 'pid', "tid='{$nextthread['tid']}'", $options);
|
|
|
// Redirect to the proper page. $pid = $db->fetch_field($query, "pid"); header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");
| // Redirect to the proper page. $pid = $db->fetch_field($query, "pid"); header("Location: ".htmlspecialchars_decode(get_post_link($pid, $nextthread['tid']))."#pid{$pid}");
|
Zeile 321 | Zeile 323 |
---|
// Jump to the next oldest posts. if($mybb->input['action'] == "nextoldest")
|
// Jump to the next oldest posts. if($mybb->input['action'] == "nextoldest")
|
{ $options = array( "limit" => 1, "limit_start" => 0,
| { $options = array( "limit" => 1, "limit_start" => 0,
|
"order_by" => "lastpost", "order_dir" => "desc" );
| "order_by" => "lastpost", "order_dir" => "desc" );
|
Zeile 362 | Zeile 364 |
---|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
|
}
| }
|
$query = $db->simple_select("forums", "threads, unapprovedthreads", "fid = '{$fid}'", array('limit' => 1)); $forum_threads = $db->fetch_array($query); $threadcount = $forum_threads['threads'];
| $query = $db->simple_select("forums", "threads, unapprovedthreads", "fid = '{$fid}'", array('limit' => 1)); $forum_threads = $db->fetch_array($query); $threadcount = $forum_threads['threads'];
|
Zeile 455 | Zeile 457 |
---|
// If the user is not a guest, check if he already voted. if($mybb->user['uid'] != 0)
|
// If the user is not a guest, check if he already voted. if($mybb->user['uid'] != 0)
|
{
| {
|
$query = $db->simple_select("pollvotes", "*", "uid='".$mybb->user['uid']."' AND pid='".$poll['pid']."'"); while($votecheck = $db->fetch_array($query))
|
$query = $db->simple_select("pollvotes", "*", "uid='".$mybb->user['uid']."' AND pid='".$poll['pid']."'"); while($votecheck = $db->fetch_array($query))
|
{ $alreadyvoted = 1;
| { $alreadyvoted = 1;
|
$votedfor[$votecheck['voteoption']] = 1; } }
| $votedfor[$votecheck['voteoption']] = 1; } }
|
Zeile 468 | Zeile 470 |
---|
if(isset($mybb->cookies['pollvotes'][$poll['pid']]) && $mybb->cookies['pollvotes'][$poll['pid']] !== "") { $alreadyvoted = 1;
|
if(isset($mybb->cookies['pollvotes'][$poll['pid']]) && $mybb->cookies['pollvotes'][$poll['pid']] !== "") { $alreadyvoted = 1;
|
}
| }
|
} $optionsarray = explode("||~|~||", $poll['options']); $votesarray = explode("||~|~||", $poll['votes']);
| } $optionsarray = explode("||~|~||", $poll['options']); $votesarray = explode("||~|~||", $poll['votes']);
|
Zeile 785 | Zeile 787 |
---|
else if($mybb->settings['threadusenetstyle'] == 1) { $defaultmode = 'threaded';
|
else if($mybb->settings['threadusenetstyle'] == 1) { $defaultmode = 'threaded';
|
}
| }
|
else { $defaultmode = 'linear';
| else { $defaultmode = 'linear';
|
Zeile 811 | Zeile 813 |
---|
else { $where = " ORDER BY dateline LIMIT 0, 1";
|
else { $where = " ORDER BY dateline LIMIT 0, 1";
|
} $query = $db->query("
| } $query = $db->query("
|
SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
| SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
|
Zeile 891 | Zeile 893 |
---|
if(!empty($mybb->input['pid'])) { $post = get_post($mybb->input['pid']);
|
if(!empty($mybb->input['pid'])) { $post = get_post($mybb->input['pid']);
|
if($post)
| if(empty($post) || ($post['visible'] == 0 && !is_moderator($post['fid'], 'canviewunapprove')) || ($post['visible'] == -1 && !is_moderator($post['fid'], 'canviewdeleted'))) { $footer .= '<script type="text/javascript">$(document).ready(function() { $.jGrowl(\''.$lang->error_invalidpost.'\', {theme: \'jgrowl_error\'}); });</script>'; } else
|
{ $query = $db->query(" SELECT COUNT(p.dateline) AS count FROM ".TABLE_PREFIX."posts p
| { $query = $db->query(" SELECT COUNT(p.dateline) AS count FROM ".TABLE_PREFIX."posts p
|