Vergleich inc/functions_modcp.php - 1.8.8 - 1.8.38

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 143Zeile 143
 */
function send_report($report, $report_type='post')
{

 */
function send_report($report, $report_type='post')
{

	global $db, $lang, $forum, $mybb, $post, $thread, $reputation, $user;

















	global $db, $lang, $forum, $mybb, $post, $thread, $reputation, $user, $plugins;

$report_reason = '';
if($report['reasonid'])
{
$query = $db->simple_select("reportreasons", "title", "rid = '".(int)$report['reasonid']."'", array('limit' => 1));
$reason = $db->fetch_array($query);

$lang->load('report');

$report_reason = $lang->parse($reason['title']);
}

if($report['reason'])
{
$report_reason = $lang->sprintf($lang->email_report_comment_extra, $report_reason, $report['reason']);
}


$modsjoin = $modswhere = '';
if(!empty($forum['parentlist']))


$modsjoin = $modswhere = '';
if(!empty($forum['parentlist']))

Zeile 164Zeile 180
	{
case "pgsql":
case "sqlite":

	{
case "pgsql":
case "sqlite":

			$query = $db->query("
SELECT DISTINCT u.username, u.email, u.receivepms, u.uid
FROM {$db->table_prefix}users u
{$modsjoin}

			$query = $db->query("
SELECT DISTINCT u.username, u.email, u.receivepms, u.uid
FROM {$db->table_prefix}users u
{$modsjoin}

				LEFT JOIN {$db->table_prefix}usergroups g ON (',' || u.additionalgroups || ',' LIKE '%,' || g.gid || ',%' OR g.gid = u.usergroup)
WHERE {$modswhere}g.cancp = 1 OR g.issupermod = 1
");

				LEFT JOIN {$db->table_prefix}usergroups g ON (',' || u.additionalgroups || ',' LIKE '%,' || g.gid || ',%' OR g.gid = u.usergroup)
WHERE {$modswhere}g.cancp = 1 OR g.issupermod = 1
");

Zeile 188Zeile 204
	if(empty($lang->$lang_string_subject) || empty($lang->$lang_string_message))
{
return false;

	if(empty($lang->$lang_string_subject) || empty($lang->$lang_string_message))
{
return false;

	}


	}


	global $send_report_subject, $send_report_url;

switch($report_type)

	global $send_report_subject, $send_report_url;

switch($report_type)

Zeile 201Zeile 217
		case 'profile':
$send_report_subject = $user['username'];
$send_report_url = str_replace('&', '&', get_profile_link($user['uid']));

		case 'profile':
$send_report_subject = $user['username'];
$send_report_url = str_replace('&', '&', get_profile_link($user['uid']));

			break;

			break;

		case 'reputation':
$from_user = get_user($reputation['adduid']);
$send_report_subject = $from_user['username'];
$send_report_url = "reputation.php?uid={$reputation['uid']}#rid{$reputation['rid']}";
break;
}

		case 'reputation':
$from_user = get_user($reputation['adduid']);
$send_report_subject = $from_user['username'];
$send_report_url = "reputation.php?uid={$reputation['uid']}#rid{$reputation['rid']}";
break;
}

 

$plugins->run_hooks("send_report_report_type");


$emailsubject = $lang->sprintf($lang->$lang_string_subject, $mybb->settings['bbname']);


$emailsubject = $lang->sprintf($lang->$lang_string_subject, $mybb->settings['bbname']);

	$emailmessage = $lang->sprintf($lang->$lang_string_message, $mybb->user['username'], $mybb->settings['bbname'], $send_report_subject, $mybb->settings['bburl'], $send_report_url, $report['reason']);



	$emailmessage = $lang->sprintf($lang->$lang_string_message, $mybb->user['username'], $mybb->settings['bbname'], $send_report_subject, $mybb->settings['bburl'], $send_report_url, $report_reason);
$pm_recipients = array();


	while($mod = $db->fetch_array($query))

	while($mod = $db->fetch_array($query))

	{

	{

		if($mybb->settings['reportmethod'] == "pms" && $mod['receivepms'] != 0 && $mybb->settings['enablepms'] != 0)
{
$pm_recipients[] = $mod['uid'];

		if($mybb->settings['reportmethod'] == "pms" && $mod['receivepms'] != 0 && $mybb->settings['enablepms'] != 0)
{
$pm_recipients[] = $mod['uid'];

Zeile 237Zeile 256
			"toid" => $pm_recipients,
"ipaddress" => $mybb->session->packedip
);

			"toid" => $pm_recipients,
"ipaddress" => $mybb->session->packedip
);

 

$pm['options'] = array(
"signature" => 0,
"disablesmilies" => 0,
"savecopy" => 0,
"readreceipt" => 0
);
$pm['saveasdraft'] = 0;


$pmhandler->admin_override = true;
$pmhandler->set_data($pm);


$pmhandler->admin_override = true;
$pmhandler->set_data($pm);