Zeile 889 | Zeile 889 |
---|
$modoptions_update = array();
// Close the thread.
|
$modoptions_update = array();
// Close the thread.
|
if(!empty($modoptions['closethread']) && $thread['closed'] != 1)
| if(!empty($modoptions['closethread']) && $thread['closed'] != 1 && is_moderator($post['fid'], "canopenclosethreads", $post['uid']))
|
{ $modoptions_update['closed'] = $closed = 1; log_moderator_action($modlogdata, $lang->thread_closed); }
// Open the thread.
|
{ $modoptions_update['closed'] = $closed = 1; log_moderator_action($modlogdata, $lang->thread_closed); }
// Open the thread.
|
if(empty($modoptions['closethread']) && $thread['closed'] == 1)
| if(empty($modoptions['closethread']) && $thread['closed'] == 1 && is_moderator($post['fid'], "canopenclosethreads", $post['uid']))
|
{ $modoptions_update['closed'] = $closed = 0; log_moderator_action($modlogdata, $lang->thread_opened); }
// Stick the thread.
|
{ $modoptions_update['closed'] = $closed = 0; log_moderator_action($modlogdata, $lang->thread_opened); }
// Stick the thread.
|
if(!empty($modoptions['stickthread']) && $thread['sticky'] != 1)
| if(!empty($modoptions['stickthread']) && $thread['sticky'] != 1 && is_moderator($post['fid'], "canstickunstickthreads", $post['uid']))
|
{ $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck); }
// Unstick the thread.
|
{ $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck); }
// Unstick the thread.
|
if(empty($modoptions['stickthread']) && $thread['sticky'] == 1)
| if(empty($modoptions['stickthread']) && $thread['sticky'] == 1 && is_moderator($post['fid'], "canstickunstickthreads", $post['uid']))
|
{ $modoptions_update['sticky'] = 0; log_moderator_action($modlogdata, $lang->thread_unstuck);
| { $modoptions_update['sticky'] = 0; log_moderator_action($modlogdata, $lang->thread_unstuck);
|
Zeile 1018 | Zeile 1018 |
---|
} }
|
} }
|
if($visible == 1 && $thread['visible'] == 1)
| if($visible == 1)
|
{ $now = TIME_NOW;
|
{ $now = TIME_NOW;
|
|
|
// Yes, the value to the lastpost key in this array has single quotes within double quotes. It's not a bug. $update_array = array( 'lastpost' => "'{$now}'" );
|
// Yes, the value to the lastpost key in this array has single quotes within double quotes. It's not a bug. $update_array = array( 'lastpost' => "'{$now}'" );
|
if($forum['usepostcounts'] != 0)
| if($forum['usepostcounts'] != 0 && $thread['visible'] == 1)
|
{ $update_array['postnum'] = 'postnum+1'; }
| { $update_array['postnum'] = 'postnum+1'; }
|
Zeile 1044 | Zeile 1044 |
---|
"uid" => $post['uid'], "username" => $db->escape_string($post['username']), "dateline" => (int)$post['dateline'],
|
"uid" => $post['uid'], "username" => $db->escape_string($post['username']), "dateline" => (int)$post['dateline'],
|
"message" => $db->escape_string($post['message']), "ipaddress" => $db->escape_binary($post['ipaddress']), "includesig" => $post['options']['signature'], "smilieoff" => $post['options']['disablesmilies'], "visible" => $visible
| "message" => $db->escape_string($post['message']), "ipaddress" => $db->escape_binary($post['ipaddress']), "includesig" => $post['options']['signature'], "smilieoff" => $post['options']['disablesmilies'], "visible" => $visible
|
);
$plugins->run_hooks("datahandler_post_insert_post", $this);
| );
$plugins->run_hooks("datahandler_post_insert_post", $this);
|
Zeile 1094 | Zeile 1094 |
---|
$thread_update = array(); if($visible == 1 && $thread['visible'] == 1) {
|
$thread_update = array(); if($visible == 1 && $thread['visible'] == 1) {
|
$thread = get_thread($post['tid']);
| |
require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new Postparser;
| require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new Postparser;
|
Zeile 1136 | Zeile 1135 |
---|
$args['users'][$subscribedmember['uid']] = (int)$subscribedmember['uid'];
$done_users[$subscribedmember['uid']] = 1;
|
$args['users'][$subscribedmember['uid']] = (int)$subscribedmember['uid'];
$done_users[$subscribedmember['uid']] = 1;
|
|
|
$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
{
| {
|
continue;
|
continue;
|
}
| }
|
if($thread['uid'] != $subscribedmember['uid'] && $forumpermissions['canonlyviewownthread'] == 1 && !is_moderator($thread['fid'], "", $subscribedmember['uid'])) { // User isn't a moderator or the author of the thread...
| if($thread['uid'] != $subscribedmember['uid'] && $forumpermissions['canonlyviewownthread'] == 1 && !is_moderator($thread['fid'], "", $subscribedmember['uid'])) { // User isn't a moderator or the author of the thread...
|
Zeile 1152 | Zeile 1151 |
---|
if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language'])) { $uselang = $subscribedmember['language'];
|
if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language'])) { $uselang = $subscribedmember['language'];
|
}
| }
|
elseif($mybb->settings['orig_bblanguage']) { $uselang = $mybb->settings['orig_bblanguage'];
|
elseif($mybb->settings['orig_bblanguage']) { $uselang = $mybb->settings['orig_bblanguage'];
|
}
| }
|
else { $uselang = "english"; }
if($uselang == $mybb->settings['bblanguage'])
|
else { $uselang = "english"; }
if($uselang == $mybb->settings['bblanguage'])
|
{ if($subscribedmember['notification'] == 1) {
| { if($subscribedmember['notification'] == 1) {
|
$emailsubject = $lang->emailsubject_subscription; $emailmessage = $lang->email_subscription; }
| $emailsubject = $lang->emailsubject_subscription; $emailmessage = $lang->email_subscription; }
|
Zeile 1230 | Zeile 1229 |
---|
$thread_update = array('replies' => '+1');
|
$thread_update = array('replies' => '+1');
|
// Update forum count
| // Update counters
|
update_last_post($post['tid']); update_forum_counters($post['fid'], array("posts" => "+1")); update_forum_lastpost($thread['fid']);
| update_last_post($post['tid']); update_forum_counters($post['fid'], array("posts" => "+1")); update_forum_lastpost($thread['fid']);
|
Zeile 1254 | Zeile 1253 |
---|
// Update the unapproved posts count for the current forum $thread_update = array('replies' => '+1'); update_forum_counters($post['fid'], array("deletedposts" => "+1"));
|
// Update the unapproved posts count for the current forum $thread_update = array('replies' => '+1'); update_forum_counters($post['fid'], array("deletedposts" => "+1"));
|
| }
// Update last poster if($visible == 1 && $thread['visible'] != 1) { update_last_post($post['tid']);
|
}
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'");
| }
$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'");
|
Zeile 1531 | Zeile 1536 |
---|
$modoptions_update = array();
// Close the thread.
|
$modoptions_update = array();
// Close the thread.
|
if(!empty($modoptions['closethread']))
| if(!empty($modoptions['closethread']) && is_moderator($thread['fid'], "canopenclosethreads", $thread['uid']))
|
{ $modoptions_update['closed'] = 1; log_moderator_action($modlogdata, $lang->thread_closed); }
// Stick the thread.
|
{ $modoptions_update['closed'] = 1; log_moderator_action($modlogdata, $lang->thread_closed); }
// Stick the thread.
|
if(!empty($modoptions['stickthread']))
| if(!empty($modoptions['stickthread']) && is_moderator($thread['fid'], "canstickunstickthreads", $thread['uid']))
|
{ $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck);
| { $modoptions_update['sticky'] = 1; log_moderator_action($modlogdata, $lang->thread_stuck);
|