Line 55 | Line 55 |
---|
$address_list = $request->variable('address_list', array('' => array(0 => '')));
|
$address_list = $request->variable('address_list', array('' => array(0 => '')));
|
$submit = (isset($_POST['post'])) ? true : false;
| |
$preview = (isset($_POST['preview'])) ? true : false; $save = (isset($_POST['save'])) ? true : false; $load = (isset($_POST['load'])) ? true : false;
| $preview = (isset($_POST['preview'])) ? true : false; $save = (isset($_POST['save'])) ? true : false; $load = (isset($_POST['load'])) ? true : false;
|
Line 69 | Line 68 |
---|
$refresh = isset($_POST['add_file']) || isset($_POST['delete_file']) || $save || $load || $remove_u || $remove_g || $add_to || $add_bcc;
|
$refresh = isset($_POST['add_file']) || isset($_POST['delete_file']) || $save || $load || $remove_u || $remove_g || $add_to || $add_bcc;
|
| $submit = $request->is_set_post('post') && !$refresh && !$preview;
|
$action = ($delete && !$preview && !$refresh && $submit) ? 'delete' : $action; $select_single = ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? false : true;
| $action = ($delete && !$preview && !$refresh && $submit) ? 'delete' : $action; $select_single = ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? false : true;
|
Line 89 | Line 89 |
---|
// Since viewtopic.php language entries are used in several modes, // we include the language file here $user->add_lang('viewtopic');
|
// Since viewtopic.php language entries are used in several modes, // we include the language file here $user->add_lang('viewtopic');
|
| /** * Modify the default vars before composing a PM * * @event core.ucp_pm_compose_modify_data * @var int msg_id post_id in the page request * @var int to_user_id The id of whom the message is to * @var int to_group_id The id of the group the message is to * @var bool submit Whether the form has been submitted * @var bool preview Whether the user is previewing the PM or not * @var string action One of: post, reply, quote, forward, quotepost, edit, delete, smilies * @var bool delete Whether the user is deleting the PM * @var int reply_to_all Value of reply_to_all request variable. * @since 3.1.4-RC1 */ $vars = array( 'msg_id', 'to_user_id', 'to_group_id', 'submit', 'preview', 'action', 'delete', 'reply_to_all', ); extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_data', compact($vars)));
|
// Output PM_TO box if message composing if ($action != 'edit')
| // Output PM_TO box if message composing if ($action != 'edit')
|
Line 128 | Line 154 |
---|
'S_SHOW_PM_BOX' => true, 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false, 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
|
'S_SHOW_PM_BOX' => true, 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false, 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm_group')) ? $group_options : '',
|
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=$select_single"),
| 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=searchuser&form=postform&field=username_list&select_single=" . (int) $select_single),
|
)); }
| )); }
|
Line 423 | Line 449 |
---|
{ $message_attachment = 0; $message_text = $message_subject = '';
|
{ $message_attachment = 0; $message_text = $message_subject = '';
|
| /** * Predefine message text and subject * * @event core.ucp_pm_compose_predefined_message * @var string message_text Message text * @var string message_subject Messate subject * @since 3.1.11-RC1 */ $vars = array('message_text', 'message_subject'); extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_predefined_message', compact($vars)));
|
if ($to_user_id && $to_user_id != ANONYMOUS && $action == 'post') {
| if ($to_user_id && $to_user_id != ANONYMOUS && $action == 'post') {
|
Line 724 | Line 761 |
---|
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true; $enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1; $enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
|
$enable_smilies = (!$smilies_status || isset($_POST['disable_smilies'])) ? false : true; $enable_urls = (isset($_POST['disable_magic_url'])) ? 0 : 1; $enable_sig = (!$config['allow_sig'] ||!$config['allow_sig_pm']) ? false : ((isset($_POST['attach_sig'])) ? true : false);
|
| /** * Modify private message * * @event core.ucp_pm_compose_modify_parse_before * @var bool enable_bbcode Whether or not bbcode is enabled * @var bool enable_smilies Whether or not smilies are enabled * @var bool enable_urls Whether or not urls are enabled * @var bool enable_sig Whether or not signature is enabled * @var string subject PM subject text * @var object message_parser The message parser object * @var bool submit Whether or not the form has been sumitted * @var bool preview Whether or not the signature is being previewed * @var array error Any error strings * @since 3.1.10-RC1 */ $vars = array( 'enable_bbcode', 'enable_smilies', 'enable_urls', 'enable_sig', 'subject', 'message_parser', 'submit', 'preview', 'error', ); extract($phpbb_dispatcher->trigger_event('core.ucp_pm_compose_modify_parse_before', compact($vars)));
|
if ($submit) {
| if ($submit) {
|