Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
c7a3cb8a
Commit
c7a3cb8a
authored
Jan 13, 2015
by
Doris Tam
Browse files
Sort notifications by read/unread (bug 547696) - read has been changed to ASC
Change-Id: If7e77e237db1262522fd6dace684cf4c2b60f291
parent
bc592eb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/multirecipientnotification/lib/activityextend.php
View file @
c7a3cb8a
...
...
@@ -46,7 +46,7 @@ function activitylistin($type='all', $limit=10, $offset=0) {
$msgidquery
=
"
(
SELECT a.id, a.ctime, 'notification_internal_activity' AS msgtable, subject
SELECT a.id,
a.read,
a.ctime, 'notification_internal_activity' AS msgtable, subject
FROM
{
notification_internal_activity
}
AS a
INNER JOIN
{
activity_type
}
AS at ON a.type = at.id
WHERE a."
.
$notificationtargetcolumn
.
" = ?
...
...
@@ -54,7 +54,7 @@ function activitylistin($type='all', $limit=10, $offset=0) {
)
UNION
(
SELECT a.id, a.ctime, 'artefact_multirecipient_notification' AS msgtable, subject
SELECT a.id,
CAST(b.read AS int),
a.ctime, 'artefact_multirecipient_notification' AS msgtable, subject
FROM
{
artefact_multirecipient_notification
}
AS a
INNER JOIN
{
artefact_multirecipient_userrelation
}
AS b
ON a.id = b.notification
...
...
@@ -69,7 +69,7 @@ function activitylistin($type='all', $limit=10, $offset=0) {
$result
->
count
=
count_records_sql
(
$countquery
,
array
(
$userid
,
$userid
));
$msgidquery
.
=
"
ORDER BY ctime DESC, subject ASC"
;
ORDER BY
read ASC,
ctime DESC, subject ASC"
;
$result
->
msgidrecords
=
get_records_sql_array
(
$msgidquery
,
array
(
$userid
,
$userid
),
$offset
,
$limit
);
if
(
!
is_array
(
$result
->
msgidrecords
))
{
...
...
Write
Preview
Supports
Markdown
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