Vergleich inc/functions_modcp.php - 1.8.8 - 1.8.24

  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 153Zeile 169
		if($db->type == 'pgsql' || $db->type == 'sqlite')
{
$modsjoin = "LEFT JOIN {$db->table_prefix}moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR ',' || u.additionalgroups || ',' LIKE '%,' || m.id || ',%') AND m.isgroup = 1)";

		if($db->type == 'pgsql' || $db->type == 'sqlite')
{
$modsjoin = "LEFT JOIN {$db->table_prefix}moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR ',' || u.additionalgroups || ',' LIKE '%,' || m.id || ',%') AND m.isgroup = 1)";

		}

		}

		else
{
$modsjoin = "LEFT JOIN {$db->table_prefix}moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', m.id, ',%')) AND m.isgroup = 1)";

		else
{
$modsjoin = "LEFT JOIN {$db->table_prefix}moderators m ON (m.id = u.uid AND m.isgroup = 0) OR ((m.id = u.usergroup OR CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', m.id, ',%')) AND m.isgroup = 1)";

Zeile 161Zeile 177
	}

switch($db->type)

	}

switch($db->type)

	{

	{

		case "pgsql":
case "sqlite":
$query = $db->query("

		case "pgsql":
case "sqlite":
$query = $db->query("

Zeile 169Zeile 185
				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)

				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

				WHERE {$modswhere}g.cancp = 1 OR g.issupermod = 1

			");
break;
default:

			");
break;
default:

Zeile 186Zeile 202
	$lang_string_message = "email_report{$report_type}";

if(empty($lang->$lang_string_subject) || empty($lang->$lang_string_message))

	$lang_string_message = "email_report{$report_type}";

if(empty($lang->$lang_string_subject) || empty($lang->$lang_string_message))

	{

	{

		return false;
}


		return false;
}


Zeile 209Zeile 225
			break;
}


			break;
}


	$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']);

	$plugins->run_hooks("send_report_report_type");






 
	$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);
$pm_recipients = array();


	while($mod = $db->fetch_array($query))
{
if($mybb->settings['reportmethod'] == "pms" && $mod['receivepms'] != 0 && $mybb->settings['enablepms'] != 0)

	while($mod = $db->fetch_array($query))
{
if($mybb->settings['reportmethod'] == "pms" && $mod['receivepms'] != 0 && $mybb->settings['enablepms'] != 0)