Zeile 83 | Zeile 83 |
---|
if($user['warningpoints'] >= $mybb->settings['maxwarningpoints']) { $this->set_error('error_user_reached_max_warning');
|
if($user['warningpoints'] >= $mybb->settings['maxwarningpoints']) { $this->set_error('error_user_reached_max_warning');
|
return false; }
return true; }
/** * Validate a warning thread. * * @return boolean True when valid, false when invalid. */ function validate_thread() { $warning = &$this->data;
$thread = get_thread($warning['tid']);
if(!$thread['tid']) { $this->set_error('error_invalid_post');
| |
return false; }
| return false; }
|
Zeile 124 | Zeile 104 |
---|
{ $this->set_error('error_invalid_post'); return false;
|
{ $this->set_error('error_invalid_post'); return false;
|
}
if(!isset($warning['tid'])) { $warning['tid'] = $post['tid'];
| |
}
return true;
| }
return true;
|
Zeile 283 | Zeile 258 |
---|
if(array_key_exists('pid', $warning)) { $this->validate_post();
|
if(array_key_exists('pid', $warning)) { $this->validate_post();
|
$this->validate_thread();
| |
} if(array_key_exists('type', $warning)) {
| } if(array_key_exists('type', $warning)) {
|
Zeile 696 | Zeile 670 |
---|
$this->write_warning_data = array( "uid" => (int)$warning['uid'],
|
$this->write_warning_data = array( "uid" => (int)$warning['uid'],
|
"tid" => (int)$warning['tid'],
| "tid" => (int)$warning['type'],
|
"pid" => (int)$warning['pid'], "title" => $db->escape_string($warning['title']), "points" => (int)$warning['points'],
| "pid" => (int)$warning['pid'], "title" => $db->escape_string($warning['title']), "points" => (int)$warning['points'],
|