mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
Private Messenger: Fix for post coming from profile page.
This commit is contained in:
parent
c483617c52
commit
a8f23f7179
@ -141,18 +141,25 @@ class pm_extended extends private_message
|
||||
{
|
||||
$pm_info = array();
|
||||
$pm_outbox = $this->pmManager->pm_getInfo('outbox');
|
||||
|
||||
if (is_array($to_uid))
|
||||
{
|
||||
$pm_info = $to_uid; // We've been passed a 'reply to' PM
|
||||
$to_uid = $pm_info['pm_from'];
|
||||
}
|
||||
if($to_uid)
|
||||
|
||||
if(!empty($to_uid))
|
||||
{
|
||||
$sql2 = new db;
|
||||
if($sql2->select('user', 'user_name', 'user_id = '.intval($to_uid)))
|
||||
$sql2 = e107::getDb('sql2');
|
||||
if($sql2->select('user', 'user_name', 'user_id = '.intval($to_uid))) //TODO add a check for userclass.
|
||||
{
|
||||
$row = $sql2->fetch();
|
||||
$pm_info['from_name'] = $row['user_name'];
|
||||
$pm_info['pm_from'] = intval($to_uid);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "<div class='alert alert-danger'>User Not Found</div>";
|
||||
}
|
||||
}
|
||||
//echo "Show_send: {$to_uid} from {$pm_info['from_name']} is happening<br />";
|
||||
|
@ -158,7 +158,7 @@ if(!class_exists('plugin_pm_pm_shortcodes'))
|
||||
// TODO Get rid of e107_handlers/user_select_class.php
|
||||
public function sc_pm_form_touser()
|
||||
{
|
||||
if(vartrue($this->var['from_name']))
|
||||
if(vartrue($this->var['pm_from']))
|
||||
{
|
||||
return "<input type='hidden' name='pm_to' value='{$this->var['pm_from']}' />{$this->var['from_name']}";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user