Commit e20e5280 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add link text to feedback notifications


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent b1d14164
......@@ -638,6 +638,10 @@ function make_public_submit(Pieform $form, $values) {
'section' => 'artefact.comment',
'args' => array(hsc($arg)),
),
'urltext' => (object) array(
'key' => 'Comment',
'section' => 'artefact.comment',
),
),
'users' => array($userid),
'url' => $url,
......@@ -700,6 +704,9 @@ function delete_comment_submit(Pieform $form, $values) {
'section' => 'artefact.comment',
'args' => array($title, html2text($comment->get('description'))),
),
'urltext' => (object) array(
'key' => $artefact ? 'artefact' : 'view',
),
),
'users' => array($comment->get('author')),
'url' => $url,
......@@ -914,6 +921,9 @@ class ActivityTypeArtefactCommentFeedback extends ActivityTypePlugin {
'section' => 'artefact.comment',
'args' => array($title),
),
'urltext' => (object) array(
'key' => empty($onartefact) ? 'view' : 'artefact',
),
);
if ($deletedby) {
......
......@@ -350,14 +350,14 @@ abstract class ActivityType {
}
public function get_string_for_user($user, $string) {
if (empty($string)) {
if (empty($string) || empty($this->strings->{$string}->key)) {
return;
}
$args = array_merge(
array(
$user->lang,
$this->strings->{$string}->key,
$this->strings->{$string}->section,
empty($this->strings->{$string}->section) ? 'mahara' : $this->strings->{$string}->section,
),
empty($this->strings->{$string}->args) ? array() : $this->strings->{$string}->args
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment