diff --git a/modules/pm/inc/pm.functions.php b/modules/pm/inc/pm.functions.php index 8c3174398..b6a60478e 100644 --- a/modules/pm/inc/pm.functions.php +++ b/modules/pm/inc/pm.functions.php @@ -14,9 +14,12 @@ require_once cot_langfile('pm', 'module'); require_once cot_incfile('pm', 'module', 'resources'); +$parser = ! empty(cot::$sys['parser']) ? cot::$sys['parser'] : cot::$cfg['parser']; +$editor = cot::$cfg['plugin'][$parser]['editor']; + cot::$db->registerTable('pm'); -cot::$cfg['pm']['turnajax'] = cot::$cfg['jquery'] && cot::$cfg['turnajax'] && cot::$cfg['pm']['turnajax']; +cot::$cfg['pm']['turnajax'] = cot::$cfg['pm']['turnajax'] && cot::$cfg['jquery'] && cot::$cfg['turnajax'] && $editor != 'elrte' && $editor != 'epiceditor'; /** * Send an email in the recipient's language diff --git a/modules/pm/inc/pm.message.php b/modules/pm/inc/pm.message.php index f9a4c3a71..f0d3ca112 100644 --- a/modules/pm/inc/pm.message.php +++ b/modules/pm/inc/pm.message.php @@ -20,8 +20,6 @@ $q = cot_import('q','G','TXT'); // Quote $history = cot_import('history','G','BOL'); // Turn on history list($pg, $d, $durl) = cot_import_pagenav('d', $cfg['pm']['maxpmperpage']); //pagination history -$parser = ! empty($sys['parser']) ? $sys['parser'] : $cfg['parser']; -$editor = $cfg['plugin'][$parser]['editor']; if (empty($id)) { @@ -193,13 +191,13 @@ switch ($editor) { case 'markitup': - $newpmtext = (!empty($q)) ? '[quote]'.htmlspecialchars($row['pm_text']).'[/quote]' : ''; + $newpmtext = (! empty($q)) ? '[quote]' . htmlspecialchars($row['pm_text']) . '[/quote]' : ''; if ($cfg['jquery']) $onclick = "insertText(document, 'newpmtext', '[quote]'+$('#pm_text').text()+'[/quote]'); return false;"; break; case 'ckeditor': if ($cfg['jquery']) $onclick = "CKEDITOR.instances.newpmtext.insertHtml('
'+$('#pm_text').text()+'

'); return false;"; default: - $newpmtext = (!empty($q)) ? '
'.$row['pm_text'].'
' : ''; + $newpmtext = (! empty($q)) ? '
' . $row['pm_text'] . '
' : ''; } if (COT_AJAX) @@ -225,7 +223,7 @@ 'PM_QUOTE' => cot_rc_link(cot_url('pm', 'm=message&id='.$id.'&q=quote&history='.(int)$history.'&d='.$durl), $L['Quote'], array('onclick' => $onclick)), 'PM_FORM_SEND' => cot_url('pm', 'm=send&a=send&to='.$to), 'PM_FORM_TITLE' => cot_inputbox('text', 'newpmtitle', htmlspecialchars($newpmtitle), 'size="56" maxlength="255"'), - 'PM_FORM_TEXT' => cot_textarea('newpmtext', $newpmtext, 8, 56, '', 'input_textarea_editor').$text_editor_code, + 'PM_FORM_TEXT' => cot_textarea('newpmtext', $newpmtext, 8, 56, '', 'input_textarea_editor') . $text_editor_code, )); /* === Hook === */ diff --git a/modules/pm/inc/pm.send.php b/modules/pm/inc/pm.send.php index 617fb6387..5a57efc86 100644 --- a/modules/pm/inc/pm.send.php +++ b/modules/pm/inc/pm.send.php @@ -19,8 +19,6 @@ $to = cot_import('to', 'G', 'TXT'); $a = cot_import('a','G','TXT'); $id = cot_import('id','G','INT'); -$parser = ! empty($sys['parser']) ? $sys['parser'] : $cfg['parser']; -$editor = $cfg['plugin'][$parser]['editor']; $totalrecipients = 0; $touser_sql = array(); @@ -301,7 +299,7 @@ 'PMSEND_SENTBOX_COUNT' => $totalsentbox, 'PMSEND_FORM_SEND' => cot_url('pm', 'm=send&a=send'.$idurl), 'PMSEND_FORM_TITLE' => cot_inputbox('text', 'newpmtitle', htmlspecialchars($newpmtitle), 'size="56" maxlength="255"'), - 'PMSEND_FORM_TEXT' => cot_textarea('newpmtext', $newpmtext, 8, 56, '', 'input_textarea_editor').$text_editor_code, + 'PMSEND_FORM_TEXT' => cot_textarea('newpmtext', $newpmtext, 8, 56, '', 'input_textarea_editor') . $text_editor_code, 'PMSEND_FORM_TOUSER' => cot_textarea('newpmrecipient', $touser, 3, 56, 'class="userinput"'), ));