Zeile 32 | Zeile 32 |
---|
if(!empty($mybb->input['type'])) { $report_type = htmlspecialchars_uni($mybb->get_input('type'));
|
if(!empty($mybb->input['type'])) { $report_type = htmlspecialchars_uni($mybb->get_input('type'));
|
| }
if(empty($permissions['canbereported'])) { $error = $lang->sprintf($lang->error_invalid_report, $report_type);
|
}
$report_title = $lang->report_content; $report_string = "report_reason_{$report_type}";
if(isset($lang->$report_string))
|
}
$report_title = $lang->report_content; $report_string = "report_reason_{$report_type}";
if(isset($lang->$report_string))
|
{
| {
|
$report_title = $lang->$report_string; }
| $report_title = $lang->$report_string; }
|
Zeile 46 | Zeile 51 |
---|
if($report_type == 'post') { if($mybb->usergroup['canview'] == 0)
|
if($report_type == 'post') { if($mybb->usergroup['canview'] == 0)
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 55 | Zeile 60 |
---|
if(!$post) {
|
if(!$post) {
|
$error = $lang->error_invalid_report;
| $error = $lang->sprintf($lang->error_invalid_report, $report_type);
|
} else { $id = $post['pid']; $id2 = $post['tid']; $report_type_db = "(type = 'post' OR type = '')";
|
} else { $id = $post['pid']; $id2 = $post['tid']; $report_type_db = "(type = 'post' OR type = '')";
|
|
|
// Check for a valid forum $forum = get_forum($post['fid']);
if(!isset($forum['fid']))
|
// Check for a valid forum $forum = get_forum($post['fid']);
if(!isset($forum['fid']))
|
{ $error = $lang->error_invalid_report; } else {
| { $error = $lang->sprintf($lang->error_invalid_report, $report_type); } else {
|
$verified = true; }
// Password protected forums ......... yhummmmy! $id3 = $forum['fid']; check_forum_password($forum['parentlist']);
|
$verified = true; }
// Password protected forums ......... yhummmmy! $id3 = $forum['fid']; check_forum_password($forum['parentlist']);
|
}
| }
|
} else if($report_type == 'profile') {
| } else if($report_type == 'profile') {
|
Zeile 86 | Zeile 91 |
---|
if(!isset($user['uid'])) {
|
if(!isset($user['uid'])) {
|
$error = $lang->error_invalid_report;
| $error = $lang->sprintf($lang->error_invalid_report, $report_type);
|
} else {
|
} else {
|
| $verified = true; $report_type_db = "type = 'profile'";
|
$id2 = $id3 = 0; // We don't use these on the profile $id = $user['uid']; // id is the profile user $permissions = user_permissions($user['uid']);
|
$id2 = $id3 = 0; // We don't use these on the profile $id = $user['uid']; // id is the profile user $permissions = user_permissions($user['uid']);
|
if(empty($permissions['canbereported'])) { $error = $lang->error_invalid_report; } else { $verified = true; $report_type_db = "type = 'profile'"; }
| |
} } else if($report_type == 'reputation')
| } } else if($report_type == 'reputation')
|
Zeile 112 | Zeile 110 |
---|
if(!$db->num_rows($query)) {
|
if(!$db->num_rows($query)) {
|
$error = $lang->error_invalid_report;
| $error = $lang->sprintf($lang->error_invalid_report, $report_type);
|
} else {
| } else {
|
Zeile 184 | Zeile 182 |
---|
if(!$db->num_rows($query)) {
|
if(!$db->num_rows($query)) {
|
$error = $lang->error_invalid_report_reason;
| $error = $lang->sprintf($lang->error_invalid_report, $report_type);
|
$verified = false; } else
| $verified = false; } else
|
Zeile 235 | Zeile 233 |
---|
if($verified == false && empty($error)) {
|
if($verified == false && empty($error)) {
|
$error = $lang->error_invalid_report;
| $error = $lang->sprintf($lang->error_invalid_report, $report_type);
|
} }
| } }
|