1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Fixes #2286 - Properly check for attachment when sending PM

This commit is contained in:
Tijn Kuyper
2017-01-16 19:30:30 +01:00
committed by GitHub
parent 69d2d283f9
commit 17ef449420

View File

@@ -534,25 +534,28 @@ class pm_extended extends private_message
}
if(check_class($this->pmPrefs['attach_class']))
if(!empty($_POST['uploaded']))
{
$_POST['uploaded'] = $this->processAttachments();
foreach($_POST['uploaded'] as $var)
if(check_class($this->pmPrefs['attach_class']))
{
if(!empty($var['message']))
$_POST['uploaded'] = $this->processAttachments();
foreach($_POST['uploaded'] as $var)
{
$msg .= $var['message']."<br />";
if(!empty($var['message']))
{
$msg .= $var['message']."<br />";
}
}
}
else
{
$msg .= LAN_PM_23.'<br />';
unset($_POST['uploaded']);
}
}
else
{
$msg .= LAN_PM_23.'<br />';
unset($_POST['uploaded']);
}
$_POST['from_id'] = USERID;