aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php46
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php4
-rw-r--r--phpBB/includes/ucp/ucp_resend.php2
4 files changed, 36 insertions, 18 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 66f98a70c5..9a33405725 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -39,8 +39,7 @@ function compose_pm($id, $mode, $action)
$preview = (isset($_POST['preview']));
$save = (isset($_POST['save']));
$load = (isset($_POST['load']));
- $cancel = (isset($_POST['cancel']));
- $confirm = (isset($_POST['confirm']));
+ $cancel = (isset($_POST['cancel']) && !isset($_POST['save']));
$delete = (isset($_POST['delete']));
$remove_u = (isset($_REQUEST['remove_u']));
@@ -362,24 +361,41 @@ function compose_pm($id, $mode, $action)
if ($subject && $message)
{
- $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'user_id' => $user->data['user_id'],
- 'topic_id' => 0,
- 'forum_id' => 0,
- 'save_time' => $current_time,
- 'draft_subject' => $subject,
- 'draft_message' => $message));
- $db->sql_query($sql);
+ if (confirm_box(true))
+ {
+ $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => $user->data['user_id'],
+ 'topic_id' => 0,
+ 'forum_id' => 0,
+ 'save_time' => $current_time,
+ 'draft_subject' => $subject,
+ 'draft_message' => $message));
+ $db->sql_query($sql);
- meta_refresh(3, "ucp.$phpEx$SID&i=pm&mode=$mode");
+ meta_refresh(3, "ucp.$phpEx$SID&i=pm&mode=$mode");
- $message = $user->lang['DRAFT_SAVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=pm&amp;mode=$mode\">", '</a>');
+ $message = $user->lang['DRAFT_SAVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=pm&amp;mode=$mode\">", '</a>');
- trigger_error($message);
+ trigger_error($message);
+ }
+ else
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'mode' => $mode,
+ 'action' => $action,
+ 'save' => true,
+ 'subject' => $subject,
+ 'message' => $message,
+ 'u' => $to_user_id,
+ 'g' => $to_group_id,
+ 'p' => $msg_id)
+ );
+
+ confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
+ }
}
- unset($subject);
- unset($message);
+ unset($subject, $message);
}
// Load Draft
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index b46aff5eba..4e644dffaa 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -376,7 +376,7 @@ function get_user_informations($user_id, $user_row)
if (!$user_id)
{
- return;
+ return array();
}
if (empty($user_row))
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 28757cf3ca..3305ef8729 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -183,12 +183,12 @@ class ucp_register
{
if ($new_password != $password_confirm)
{
- $error[] = 'NEW_PASSWORD_ERROR';
+ $error[] = $user->lang['NEW_PASSWORD_ERROR'];
}
if ($email != $email_confirm)
{
- $error[] = 'NEW_EMAIL_ERROR';
+ $error[] = $user->lang['NEW_EMAIL_ERROR'];
}
}
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
index 6809e84892..96278fd35a 100644
--- a/phpBB/includes/ucp/ucp_resend.php
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -51,6 +51,7 @@ class ucp_resend
{
$email_template = 'coppa_welcome_inactive';
}*/
+/*
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
$email_template = 'admin_welcome_inactive';
@@ -59,6 +60,7 @@ class ucp_resend
{
$email_template = 'user_welcome_inactive';
}
+*/
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);