Fixing delete wallpost still has a problem

Bug #1771950 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Invalid
Undecided
Unassigned
17.04
Invalid
Undecided
Unassigned
17.10
Invalid
Undecided
Unassigned
18.04
Invalid
Undecided
Unassigned
18.10
Invalid
Undecided
Unassigned

Bug Description

In Bug 1767220 we fixed up the problem with showing the delete wallpost button

Except we failed to fix one scenario and that was checking if the viewer of the page is an institutional admin of the page owner.

In the original code we sent the $owner id through as an integer, ie intval($owner)

But now we send it as a string

         $item->deletable = PluginBlocktypeWall::can_delete_wallpost($item->from, $owner);

And the check in can_delete_wallpost() is for a User object or integer so fails and throws error

We need to fix up the passing of the id to be integer again

Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → High
milestone: none → 18.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8867

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.