Commit 55dc46b5 authored by Piers Harding's avatar Piers Harding Committed by Robert Lyon
Browse files

Bug 1393536: activitytypemutlirecip: fix function exists

behatnotneeded

Change-Id: I4fa9481ae0de06ef0255b6d523474fbd17c643b3
parent c8dbcce7
...@@ -83,7 +83,7 @@ class ActivityTypeMultirecipientmessage extends ActivityTypeUsermessage { ...@@ -83,7 +83,7 @@ class ActivityTypeMultirecipientmessage extends ActivityTypeUsermessage {
// some stuff gets overridden by user specific stuff // some stuff gets overridden by user specific stuff
if (empty($user->method)) { if (empty($user->method)) {
$user->method = call_static_method(get_class($this), 'default_notification_method'); $user->method = $this->default_notification_method();
} }
if (empty($user->lang) || $user->lang == 'default') { if (empty($user->lang) || $user->lang == 'default') {
$user->lang = get_config('lang'); $user->lang = get_config('lang');
...@@ -195,6 +195,17 @@ class ActivityTypeMultirecipientmessage extends ActivityTypeUsermessage { ...@@ -195,6 +195,17 @@ class ActivityTypeMultirecipientmessage extends ActivityTypeUsermessage {
return 'usermessage'; return 'usermessage';
} }
/**
* get the default notification_method
*
* @param int $usrid
* @return string
*/
function default_notification_method() {
$method = get_field('activity_type', 'defaultmethod', 'name', $this->get_type());
return $method;
}
/** /**
* get the user-specific notification_method for user $userid * get the user-specific notification_method for user $userid
* *
......
Supports Markdown
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