Commit aa9452a8 authored by Robert Lyon's avatar Robert Lyon Committed by Aaron Wells
Browse files

The accepting friend notification contains full url (Bug #1440908)

And this ends up breaking the 'more' link in the inbox.

Normally we don't expect the url to contain the full path so we need
strip it off as it's added back in via the template.

Change-Id: Ibf22f361aaf7697e9903a2374f15d4fb031d01ef
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent 69a6592d
......@@ -189,6 +189,7 @@ function activitylistin_html($type='all', $limit=10, $offset=0) {
$record->message = format_notification_whitespace($record->message);
// used to identify notification as internal for json-calls
$record->table = 'notification_internal_activity';
$record->url = preg_replace('|^' . get_config('wwwroot') . '|', '', $record->url); // Remove the wwwroot form url as it will ba added again in template
$records[] = $record;
// messages from plugin
......@@ -2137,7 +2137,7 @@ function acceptfriend_submit(Pieform $form, $values) {
// notification info
$n = new StdClass;
$n->url = profile_url($USER);
$n->url = profile_url($USER, false);
$n->users = array($user->id);
$lang = get_user_language($user->id);
$displayname = display_name($USER, $user);
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