Zeile 626 | Zeile 626 |
---|
} else {
|
} else {
|
| if(!empty($this->data['tid'])) { // Fetch the thread $thread = get_thread($this->data['tid']); }
|
$prefix_cache = build_prefixes($prefix);
if(empty($prefix_cache)) { $this->set_error('invalid_prefix'); return false;
|
$prefix_cache = build_prefixes($prefix);
if(empty($prefix_cache)) { $this->set_error('invalid_prefix'); return false;
|
}
| }
|
if($prefix_cache['groups'] != "-1") { if(!empty($this->data['edit_uid']))
|
if($prefix_cache['groups'] != "-1") { if(!empty($this->data['edit_uid']))
|
{
| {
|
// Post is being edited $user = get_user($this->data['edit_uid']); } else
|
// Post is being edited $user = get_user($this->data['edit_uid']); } else
|
{
| {
|
$user = get_user($this->data['uid']); }
|
$user = get_user($this->data['uid']); }
|
if(!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
| if(!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])) && (empty($this->data['tid']) || $prefix != $thread['prefix']))
|
{ $this->set_error('invalid_prefix'); return false;
| { $this->set_error('invalid_prefix'); return false;
|
Zeile 656 | Zeile 662 |
---|
// Decide whether this prefix can be used in our forum $forums = explode(",", $prefix_cache['forums']);
|
// Decide whether this prefix can be used in our forum $forums = explode(",", $prefix_cache['forums']);
|
if(!in_array($this->data['fid'], $forums))
| if(!in_array($this->data['fid'], $forums) && (empty($this->data['tid']) || $prefix != $thread['prefix']))
|
{ $this->set_error('invalid_prefix'); return false; }
|
{ $this->set_error('invalid_prefix'); return false; }
|
}
| }
|
}
// Does this forum require a prefix?
| }
// Does this forum require a prefix?
|
Zeile 689 | Zeile 695 |
---|
foreach($prefix_cache as $required) { if($required['forums'] != "-1")
|
foreach($prefix_cache as $required) { if($required['forums'] != "-1")
|
{
| {
|
// Decide whether this prefix can be used in our forum $forums = explode(",", $required['forums']);
|
// Decide whether this prefix can be used in our forum $forums = explode(",", $required['forums']);
|
|
|
if(!in_array($forum['fid'], $forums))
|
if(!in_array($forum['fid'], $forums))
|
{
| {
|
continue; } }
|
continue; } }
|
if($required['groups'] != "-1") { if(!is_member($required['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups']))) { $num_prefixes = true; } } else
| if(is_member($required['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
|
{ $num_prefixes = true; }
| { $num_prefixes = true; }
|
Zeile 1123 | Zeile 1122 |
---|
// Fetch any users subscribed to this thread receiving instant notification and queue up their subscription notices $query = $db->query("
|
// Fetch any users subscribed to this thread receiving instant notification and queue up their subscription notices $query = $db->query("
|
SELECT u.username, u.email, u.uid, u.language, u.loginkey, u.salt, u.regdate, s.subscriptionkey, s.notification
| SELECT u.username, u.email, u.uid, u.language, u.loginkey, u.salt, u.regdate, s.notification
|
FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid) WHERE (s.notification='1' OR s.notification='2') AND s.tid='{$post['tid']}'
| FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=s.uid) WHERE (s.notification='1' OR s.notification='2') AND s.tid='{$post['tid']}'
|
Zeile 1205 | Zeile 1204 |
---|
$emailsubject = $lang->sprintf($emailsubject, $subject);
$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']);
|
$emailsubject = $lang->sprintf($emailsubject, $subject);
$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']);
|
$emailmessage = $lang->sprintf($emailmessage, $subscribedmember['username'], $post['username'], $mybb->settings['bbname'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $subscribedmember['subscriptionkey'], $post_code);
| $emailmessage = $lang->sprintf($emailmessage, $subscribedmember['username'], $post['username'], $mybb->settings['bbname'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $post_code);
|
$new_email = array( "mailto" => $db->escape_string($subscribedmember['email']), "mailfrom" => '',
| $new_email = array( "mailto" => $db->escape_string($subscribedmember['email']), "mailfrom" => '',
|
Zeile 1222 | Zeile 1221 |
---|
$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']); $pm = array( 'subject' => array('pmsubject_subscription', $subject),
|
$post_code = md5($subscribedmember['loginkey'].$subscribedmember['salt'].$subscribedmember['regdate']); $pm = array( 'subject' => array('pmsubject_subscription', $subject),
|
'message' => array('pm_subscription', $subscribedmember['username'], $post['username'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $subscribedmember['subscriptionkey'], $post_code),
| 'message' => array('pm_subscription', $subscribedmember['username'], $post['username'], $subject, $excerpt, $mybb->settings['bburl'], str_replace("&", "&", get_thread_link($thread['tid'], 0, "newpost")), $thread['tid'], $post_code),
|
'touid' => $subscribedmember['uid'], 'language' => $subscribedmember['language'], 'language_file' => 'messages'
| 'touid' => $subscribedmember['uid'], 'language' => $subscribedmember['language'], 'language_file' => 'messages'
|
Zeile 1472 | Zeile 1471 |
---|
"dateline" => (int)$thread['dateline'], "lastpost" => (int)$thread['dateline'], "lastposter" => $db->escape_string($thread['username']),
|
"dateline" => (int)$thread['dateline'], "lastpost" => (int)$thread['dateline'], "lastposter" => $db->escape_string($thread['username']),
|
| "lastposteruid" => $thread['uid'],
|
"views" => 0, "replies" => 0, "visible" => $visible,
| "views" => 0, "replies" => 0, "visible" => $visible,
|