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
96e247ce
Commit
96e247ce
authored
Apr 11, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sent PMs to show recipient
parent
45d161db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
qa-app-format.php
qa-include/qa-app-format.php
+15
-6
qa-lang-main.php
qa-include/qa-lang-main.php
+1
-0
qa-page-messages.php
qa-include/qa-page-messages.php
+11
-7
No files found.
qa-include/qa-app-format.php
View file @
96e247ce
...
...
@@ -645,12 +645,21 @@
// Who wrote it, and their avatar
if
(
@
$options
[
'whoview'
])
$fields
[
'who'
]
=
qa_lang_html_sub_split
(
'main/by_x'
,
qa_get_one_user_html
(
$message
[
'fromhandle'
],
false
));
if
(
@
$options
[
'avatarsize'
]
>
0
)
$fields
[
'avatar'
]
=
qa_get_user_avatar_html
(
@
$message
[
'fromflags'
],
@
$message
[
'fromemail'
],
@
$message
[
'fromhandle'
],
@
$message
[
'fromavatarblobid'
],
@
$message
[
'fromavatarwidth'
],
@
$message
[
'fromavatarheight'
],
$options
[
'avatarsize'
]);
if
(
@
$options
[
'towhomview'
])
{
// for sent private messages page (i.e. show who message was sent to)
$fields
[
'who'
]
=
qa_lang_html_sub_split
(
'main/to_x'
,
qa_get_one_user_html
(
$message
[
'tohandle'
],
false
));
$fields
[
'avatar'
]
=
qa_get_user_avatar_html
(
@
$message
[
'toflags'
],
@
$message
[
'toemail'
],
@
$message
[
'tohandle'
],
@
$message
[
'toavatarblobid'
],
@
$message
[
'toavatarwidth'
],
@
$message
[
'toavatarheight'
],
$options
[
'avatarsize'
]);
}
else
{
// for everything else (questions, answers, activity, wall messages)
if
(
@
$options
[
'whoview'
])
$fields
[
'who'
]
=
qa_lang_html_sub_split
(
'main/by_x'
,
qa_get_one_user_html
(
$message
[
'fromhandle'
],
false
));
if
(
@
$options
[
'avatarsize'
]
>
0
)
{
$fields
[
'avatar'
]
=
qa_get_user_avatar_html
(
@
$message
[
'fromflags'
],
@
$message
[
'fromemail'
],
@
$message
[
'fromhandle'
],
@
$message
[
'fromavatarblobid'
],
@
$message
[
'fromavatarwidth'
],
@
$message
[
'fromavatarheight'
],
$options
[
'avatarsize'
]);
}
}
// That's it!
...
...
qa-include/qa-lang-main.php
View file @
96e247ce
...
...
@@ -171,6 +171,7 @@
'suggest_category_qs'
=>
'To see more, click for all the ^1questions in this category^2.'
,
'suggest_qs_tags'
=>
'To see more, click for the ^1full list of questions^2 or ^3popular tags^4.'
,
'suggest_qs'
=>
'To see more, click for the ^1full list of questions^2.'
,
'to_x'
=>
'to ^'
,
'unanswered_qs_in_x'
=>
'Questions without answers in ^'
,
'unanswered_qs_title'
=>
'Recent questions without answers'
,
'unselected_qs_in_x'
=>
'Questions without a selected answer in ^'
,
...
...
qa-include/qa-page-messages.php
View file @
96e247ce
...
...
@@ -39,7 +39,7 @@
// Check which box we're showing (inbox/sent), we're not using Q2A's single-sign on integration and that we're logged in
$showInbox
=
qa_request_part
(
1
)
!==
'sent'
;
$show
ing
Inbox
=
qa_request_part
(
1
)
!==
'sent'
;
if
(
QA_FINAL_EXTERNAL_USERS
)
qa_fatal_error
(
'User accounts are handled by external code'
);
...
...
@@ -56,7 +56,7 @@
// Find the user profile and questions and answers for this handle
$pmSpec
=
$showInbox
$pmSpec
=
$show
ing
Inbox
?
qa_db_messages_inbox_selectspec
(
'private'
,
$loginUserId
,
true
)
:
qa_db_messages_outbox_selectspec
(
'private'
,
$loginUserId
,
true
);
...
...
@@ -66,29 +66,33 @@
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
$showInbox
?
qa_lang_html
(
'misc/pm_inbox_title'
)
:
qa_lang_html
(
'misc/pm_outbox_title'
);
$qa_content
[
'title'
]
=
$show
ing
Inbox
?
qa_lang_html
(
'misc/pm_inbox_title'
)
:
qa_lang_html
(
'misc/pm_outbox_title'
);
$qa_content
[
'message_list'
]
=
array
(
'tags'
=>
'id="privatemessages"'
,
'messages'
=>
array
(),
);
$options
=
qa_message_html_defaults
();
$htmlDefaults
=
qa_message_html_defaults
();
if
(
!
$showingInbox
)
{
$htmlDefaults
[
'towhomview'
]
=
true
;
}
foreach
(
$userMessages
as
$message
)
{
$qa_content
[
'message_list'
][
'messages'
][]
=
qa_message_html_fields
(
$message
,
$
option
s
);
$qa_content
[
'message_list'
][
'messages'
][]
=
qa_message_html_fields
(
$message
,
$
htmlDefault
s
);
}
$qa_content
[
'navigation'
][
'sub'
]
=
array
(
'inbox'
=>
array
(
'label'
=>
qa_lang_html
(
'misc/inbox'
),
'url'
=>
qa_path_html
(
'messages'
),
'selected'
=>
$showInbox
,
'selected'
=>
$show
ing
Inbox
,
),
'outbox'
=>
array
(
'label'
=>
qa_lang_html
(
'misc/outbox'
),
'url'
=>
qa_path_html
(
'messages/sent'
),
'selected'
=>
!
$showInbox
,
'selected'
=>
!
$show
ing
Inbox
,
)
);
...
...
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