Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
91720d1e
Commit
91720d1e
authored
Jul 17, 2015
by
pupi1985
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let user know why they can't send a private message to another user
parent
e9de47fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
qa-lang-profile.php
qa-include/lang/qa-lang-profile.php
+1
-0
message.php
qa-include/pages/message.php
+10
-1
No files found.
qa-include/lang/qa-lang-profile.php
View file @
91720d1e
...
@@ -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_private_messages'
=>
'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...'
,
...
...
qa-include/pages/message.php
View file @
91720d1e
...
@@ -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_private_messages'
,
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment