mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -131,6 +131,8 @@ class pm_extended extends private_message
|
||||
$sc = e107::getScBatch('pm',TRUE);
|
||||
$sc->setVars($pm_info);
|
||||
|
||||
$PM_SEND_PM = $this->updateTemplate($PM_SEND_PM);
|
||||
|
||||
$text = "<form {$enc} method='post' action='".e_SELF."' id='dataform'>
|
||||
<div><input type='hidden' name='numsent' value='{$pm_outbox['outbox']['total']}' />".
|
||||
e107::getParser()->parseTemplate($PM_SEND_PM, TRUE, $sc).
|
||||
@@ -161,6 +163,12 @@ class pm_extended extends private_message
|
||||
$sc = e107::getScBatch('pm',TRUE);
|
||||
$sc->pmNextPrev = array('start' => $start, 'total' => $pmlist['total_messages']);
|
||||
|
||||
|
||||
$PM_INBOX_HEADER = $this->updateTemplate($PM_INBOX_HEADER);
|
||||
$PM_INBOX_TABLE = $this->updateTemplate($PM_INBOX_TABLE);
|
||||
$PM_INBOX_EMPTY = $this->updateTemplate($PM_INBOX_EMPTY);
|
||||
$PM_INBOX_FOOTER = $this->updateTemplate($PM_INBOX_FOOTER);
|
||||
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_INBOX_HEADER, true, $sc);
|
||||
|
||||
@@ -203,6 +211,11 @@ class pm_extended extends private_message
|
||||
$sc = e107::getScBatch('pm',TRUE);
|
||||
$sc->pmNextPrev = array('start' => $start, 'total' => $pmlist['total_messages']);
|
||||
|
||||
$PM_OUTBOX_HEADER = $this->updateTemplate($PM_OUTBOX_HEADER);
|
||||
$PM_OUTBOX_TABLE = $this->updateTemplate($PM_OUTBOX_TABLE);
|
||||
$PM_OUTBOX_EMPTY = $this->updateTemplate($PM_OUTBOX_EMPTY);
|
||||
$PM_OUTBOX_FOOTER = $this->updateTemplate($PM_OUTBOX_FOOTER);
|
||||
|
||||
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_OUTBOX_HEADER, true, $sc);
|
||||
@@ -259,6 +272,9 @@ class pm_extended extends private_message
|
||||
$this->pm_mark_read($pmid, $pm_info);
|
||||
}
|
||||
|
||||
|
||||
$PM_SHOW = $this->updateTemplate($PM_SHOW);
|
||||
|
||||
$txt = e107::getParser()->parseTemplate($PM_SHOW, true, $sc);
|
||||
$ns->tablerender(LAN_PM, $txt);
|
||||
|
||||
@@ -295,6 +311,12 @@ class pm_extended extends private_message
|
||||
$sc = e107::getScBatch('pm',TRUE);
|
||||
$sc->pmBlocks = $pmBlocks;
|
||||
|
||||
$PM_BLOCKED_HEADER = $this->updateTemplate($PM_BLOCKED_HEADER);
|
||||
$PM_BLOCKED_TABLE = $this->updateTemplate($PM_BLOCKED_TABLE);
|
||||
$PM_BLOCKED_EMPTY = $this->updateTemplate($PM_BLOCKED_EMPTY);
|
||||
$PM_BLOCKED_FOOTER = $this->updateTemplate($PM_BLOCKED_FOOTER);
|
||||
|
||||
|
||||
$txt = "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||
$txt .= $tp->parseTemplate($PM_BLOCKED_HEADER, true, $sc);
|
||||
if($pmTotalBlocked = count($pmBlocks))
|
||||
|
@@ -707,4 +707,44 @@ class private_message
|
||||
fclose($res);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateTemplate($template)
|
||||
{
|
||||
$array = array(
|
||||
'FORM_TOUSER' => 'PM_FORM_TOUSER',
|
||||
'FORM_TOCLASS' => 'PM_FORM_TOCLASS',
|
||||
'FORM_SUBJECT' => 'PM_FORM_SUBJECT',
|
||||
'FORM_MESSAGE ' => 'PM_FORM_MESSAGE ',
|
||||
'EMOTES' => 'PM_EMOTES',
|
||||
'ATTACHMENT' => 'PM_ATTACHMENT',
|
||||
'RECEIPT' => 'PM_RECEIPT',
|
||||
'INBOX_TOTAL' => 'PM_INBOX_TOTAL',
|
||||
'INBOX_UNREAD' => 'PM_INBOX_UNREAD',
|
||||
'INBOX_FILLED' => 'PM_INBOX_FILLED',
|
||||
'OUTBOX_TOTAL' => 'PM_OUTBOX_TOTAL',
|
||||
'OUTBOX_UNREAD' => 'PM_OUTBOX_UNREAD',
|
||||
'OUTBOX_FILLED' => 'PM_OUTBOX_FILLED',
|
||||
|
||||
|
||||
'SEND_PM_LINK' => 'PM_SEND_PM_LINK',
|
||||
'NEWPM_ANIMATE' => 'PM_NEWPM_ANIMATE',
|
||||
|
||||
'BLOCKED_SENDERS_MANAGE' => 'PM_BLOCKED_SENDERS_MANAGE',
|
||||
|
||||
|
||||
'DELETE_BLOCKED_SELECTED' => 'DELETE_BLOCKED_SELECTED'
|
||||
);
|
||||
|
||||
|
||||
foreach($array as $old => $new)
|
||||
{
|
||||
$template = str_replace("{".$old."}", "{".$new."}", $template);
|
||||
}
|
||||
|
||||
return $template;
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user