Commit 7749c561 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Robert Lyon
Browse files

Bug 1767220: fixed can_delete_wallpost parameter

When changing the code to create a anonymous function
the parameter for the can_delete_wallpost function
was wrongly left as the name of a variable inside a string
instead of the actual variable

behatnotneeded

Change-Id: I53d6f2154cce910efa655d8d244b3c56d9f9b990
(cherry picked from commit 7f45661d)
parent 486d9d91
......@@ -288,11 +288,11 @@ EOF;
$params = array($instance->get('id'));
if ($records = get_records_sql_array($sql, $params, $nolimit ? '' : 0, $nolimit ? '' : 10)) {
return array_map(function($item) {
return array_map(function($item) use ($owner) {
$item->displayname = display_name($item);
$item->text = clean_html($item->text);
$item->profileurl = profile_url($item);
$item->deletable = PluginBlocktypeWall::can_delete_wallpost($item->from, ' . intval($owner) .');
$item->deletable = PluginBlocktypeWall::can_delete_wallpost($item->from, $owner);
return $item;
}, $records);
}
......
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