Commit d3a376bf by Scott

Merge branch 'pr/272' into 1.8

parents dbe6904d fd3533f1
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
'set_bonus_button' => 'Update bonus', 'set_bonus_button' => 'Update bonus',
'title' => 'Title:', 'title' => 'Title:',
'user_x' => 'User ^', 'user_x' => 'User ^',
'user_x_disabled_pms' => 'User ^ has disabled private messages.',
'voted_on' => 'Voted on:', 'voted_on' => 'Voted on:',
'wall_for_x' => 'Wall for ^', 'wall_for_x' => 'Wall for ^',
'wall_view_more' => 'View more wall posts...', 'wall_view_more' => 'View more wall posts...',
......
...@@ -68,9 +68,18 @@ ...@@ -68,9 +68,18 @@
// Check the user exists and work out what can and can't be set (if not using single sign-on) // Check the user exists and work out what can and can't be set (if not using single sign-on)
if ( !qa_opt('allow_private_messages') || !is_array($toaccount) || ($toaccount['flags'] & QA_USER_FLAGS_NO_MESSAGES) ) if (!qa_opt('allow_private_messages') || !is_array($toaccount))
return include QA_INCLUDE_DIR.'qa-page-not-found.php'; return include QA_INCLUDE_DIR.'qa-page-not-found.php';
// Check the target user has enabled private messages and inform the current user in case they haven't
if ($toaccount['flags'] & QA_USER_FLAGS_NO_MESSAGES) {
$qa_content['error'] = qa_lang_html_sub(
'profile/user_x_disabled_pms',
sprintf('<a href="%s">%s</a>', qa_path_html('user/' . $handle), qa_html($handle))
);
return $qa_content;
}
// Check that we have permission and haven't reached the limit, but don't quit just yet // Check that we have permission and haven't reached the limit, but don't quit just yet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment