Skip to content
GitLab
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
ec8193bb
Commit
ec8193bb
authored
Mar 26, 2015
by
Son Nguyen
Committed by
Gerrit Code Review
Mar 26, 2015
Browse files
Merge "Allowing admin users see all activity filter types in inbox/outbox"
parents
0aa571a2
1e39fa77
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/multirecipientnotification/inbox.php
View file @
ec8193bb
...
...
@@ -36,9 +36,15 @@ $installedtypes = get_records_assoc(
);
$options
=
array
();
// check if user is an admin in at least one group and if so they can see group admin filter options
$groupadmin
=
false
;
$grouproles
=
$USER
->
get
(
'grouproles'
);
if
(
array_search
(
'admin'
,
$grouproles
)
!==
false
)
{
$groupadmin
=
true
;
}
foreach
(
$installedtypes
as
&
$t
)
{
if
(
!
$t
->
admin
)
{
foreach
(
$installedtypes
as
$t
)
{
if
(
!
$t
->
admin
||
$USER
->
get
(
'admin'
)
||
(
$groupadmin
&&
$t
->
pluginname
==
'forum'
)
)
{
$section
=
$t
->
pluginname
?
"
{
$t
->
plugintype
}
.
{
$t
->
pluginname
}
"
:
'activity'
;
$options
[
$t
->
name
]
=
get_string
(
'type'
.
$t
->
name
,
$section
);
}
...
...
htdocs/artefact/multirecipientnotification/outbox.php
View file @
ec8193bb
...
...
@@ -35,10 +35,10 @@ $installedtypes = get_records_assoc(
);
$options
=
array
();
foreach
(
$installedtypes
as
&
$t
)
{
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
if
((
!
$t
->
admin
)
&&
(
'newpost'
!==
$t
->
name
))
{
if
((
!
$t
->
admin
||
$USER
->
get
(
'admin'
)
)
&&
(
'newpost'
!==
$t
->
name
))
{
$section
=
$t
->
pluginname
?
"
{
$t
->
plugintype
}
.
{
$t
->
pluginname
}
"
:
'activity'
;
$options
[
$t
->
name
]
=
get_string
(
'type'
.
$t
->
name
,
$section
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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