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
d47313aa
Commit
d47313aa
authored
Oct 20, 2014
by
Robert Lyon
Committed by
Gerrit Code Review
Oct 20, 2014
Browse files
Merge "Fix the notification about having access to a collection."
parents
423de7cd
cee346ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lang/en.utf8/activity.php
View file @
d47313aa
...
...
@@ -70,8 +70,11 @@ $string['newviewmessage'] = '%s has created a new page "%s"';
$string
[
'newcontactusfrom'
]
=
'New contact us from'
;
$string
[
'newcontactus'
]
=
'New contact us'
;
$string
[
'newcollectionaccessmessage'
]
=
'You have been added to the access list for the collection "%s" by %s'
;
$string
[
'newviewaccessmessage'
]
=
'You have been added to the access list for the page "%s" by %s'
;
$string
[
'newcollectionaccessmessagenoowner'
]
=
'You have been added to the access list for the collection "%s"'
;
$string
[
'newviewaccessmessagenoowner'
]
=
'You have been added to the access list for the page "%s"'
;
$string
[
'newcollectionaccesssubject'
]
=
'New access to collection "%s"'
;
$string
[
'newviewaccesssubject1'
]
=
'New access to page "%s"'
;
$string
[
'viewmodified'
]
=
'has changed their page'
;
...
...
htdocs/lib/activity.php
View file @
d47313aa
...
...
@@ -1277,6 +1277,7 @@ class ActivityTypeViewAccess extends ActivityType {
private
$title
,
$ownername
;
private
$incollection
=
false
;
/**
* @param array $data Parameters:
* - view (int)
...
...
@@ -1295,21 +1296,30 @@ class ActivityTypeViewAccess extends ActivityType {
activity_get_viewaccess_users
(
$this
->
view
),
$this
->
oldusers
);
$this
->
title
=
$viewinfo
->
get
(
'title'
);
if
(
$viewinfo
->
get_collection
())
{
$this
->
incollection
=
true
;
$this
->
title
=
$viewinfo
->
get_collection
()
->
get
(
'name'
);
$this
->
add_urltext
(
array
(
'key'
=>
'Collection'
,
'section'
=>
'collection'
));
}
else
{
$this
->
title
=
$viewinfo
->
get
(
'title'
);
$this
->
add_urltext
(
array
(
'key'
=>
'View'
,
'section'
=>
'view'
));
}
$this
->
ownername
=
$viewinfo
->
formatted_owner
();
$this
->
add_urltext
(
array
(
'key'
=>
'View'
,
'section'
=>
'view'
));
}
public
function
get_subject
(
$user
)
{
return
get_string
(
'newviewaccesssubject1'
,
'activity'
,
$this
->
title
);
return
$this
->
incollection
?
get_string
(
'newcollectionaccesssubject'
,
'activity'
,
$this
->
title
)
:
get_string
(
'newviewaccesssubject1'
,
'activity'
,
$this
->
title
);
}
public
function
get_message
(
$user
)
{
$newaccessmessagestr
=
$this
->
incollection
?
'newcollectionaccessmessage'
:
'newviewaccessmessage'
;
$newaccessmessagenoownerstr
=
$this
->
incollection
?
'newcollectionaccessmessagenoowner'
:
'newviewaccessmessagenoowner'
;
if
(
$this
->
ownername
)
{
return
get_string_from_language
(
$user
->
lang
,
'newvi
ewaccessmessage
'
,
'activity'
,
return
get_string_from_language
(
$user
->
lang
,
$n
ewaccessmessage
str
,
'activity'
,
$this
->
title
,
$this
->
ownername
);
}
return
get_string_from_language
(
$user
->
lang
,
'newvi
ewaccessmessagenoowner
'
,
'activity'
,
$this
->
title
);
return
get_string_from_language
(
$user
->
lang
,
$n
ewaccessmessagenoowner
str
,
'activity'
,
$this
->
title
);
}
public
function
get_required_parameters
()
{
...
...
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