Skip to content

Commit

Permalink
Merge pull request #8143 from jeabakker/thewire-delete-handling
Browse files Browse the repository at this point in the history
chore(thewire): improved error handling when removing a wire post
  • Loading branch information
jdalsem committed Apr 10, 2015
2 parents 028c960 + b28b39a commit d4cabe1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/thewire/actions/delete.php
Expand Up @@ -9,7 +9,7 @@

// Make sure we actually have permission to edit
$thewire = get_entity($guid);
if ($thewire->getSubtype() == "thewire" && $thewire->canEdit()) {
if (elgg_instanceof($thewire, 'object', 'thewire') && $thewire->canEdit()) {

// unset reply metadata on children
$children = elgg_get_entities_from_relationship(array(
Expand Down Expand Up @@ -37,3 +37,5 @@

forward("thewire/owner/" . $owner->username);
}

forward(REFERER);

0 comments on commit d4cabe1

Please sign in to comment.