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
b4812741
Commit
b4812741
authored
Nov 06, 2014
by
Aaron Wells
Committed by
Gerrit Code Review
Nov 06, 2014
Browse files
Merge "Sort activities in mailboxes"
parents
05a208f9
abbdcc09
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/multirecipientnotification/inbox.php
View file @
b4812741
...
...
@@ -35,9 +35,7 @@ $installedtypes = get_records_assoc(
'name,admin,plugintype,pluginname'
);
$options
=
array
(
'all'
=>
get_string
(
'alltypes'
,
'activity'
),
);
$options
=
array
();
foreach
(
$installedtypes
as
&
$t
)
{
if
(
!
$t
->
admin
)
{
...
...
@@ -50,6 +48,10 @@ if ($USER->get('admin')) {
$options
[
'adminmessages'
]
=
get_string
(
'typeadminmessages'
,
'activity'
);
}
// sort activitytypes now, when they have been translated
uasort
(
$options
,
'strcmp'
);
// ... and add the element for 'all types' to the beginning
$options
=
array_merge
(
array
(
'all'
=>
get_string
(
'alltypes'
,
'activity'
)),
$options
);
$type
=
param_variable
(
'type'
,
'all'
);
if
(
$type
==
''
)
{
$type
=
'all'
;
...
...
htdocs/artefact/multirecipientnotification/outbox.php
View file @
b4812741
...
...
@@ -34,10 +34,7 @@ $installedtypes = get_records_assoc(
'name,admin,plugintype,pluginname'
);
$options
=
array
(
'all'
=>
get_string
(
'alltypes'
,
'activity'
),
);
$options
=
array
();
foreach
(
$installedtypes
as
&
$t
)
{
// ignore activity type newpost, as each recipients notification appears
// as a single entry for the poster and thus floods his outbox
...
...
@@ -51,6 +48,10 @@ if ($USER->get('admin')) {
$options
[
'adminmessages'
]
=
get_string
(
'typeadminmessages'
,
'activity'
);
}
// sort activitytypes now, when they have been translated
uasort
(
$options
,
'strcmp'
);
// ... and add the element for 'all types' to the beginning
$options
=
array_merge
(
array
(
'all'
=>
get_string
(
'alltypes'
,
'activity'
)),
$options
);
$type
=
param_variable
(
'type'
,
'all'
);
if
(
$type
==
''
)
{
$type
=
'all'
;
...
...
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