From 9cb00366281d1c9f85e4c7a0462802fd246ef0f5 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Wed, 3 Nov 2010 04:42:50 +0000 Subject: Fixes #2050: Added subtype parameter to can_write_to_container functions and hooks git-svn-id: http://code.elgg.org/elgg/trunk@7221 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggEntity.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engine/classes/ElggEntity.php') diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index ef38bee6b..66aca035e 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -651,14 +651,16 @@ abstract class ElggEntity extends ElggData implements } /** - * Can a user write to this entity's container. + * Can a user write to this entity * * @param int $user_guid The user. - * + * @param string $type The type of entity we're looking to write + * @param string $subtype The subtype of the entity we're looking to write + * * @return bool */ - public function canWriteToContainer($user_guid = 0) { - return can_write_to_container($user_guid, $this->getGUID()); + public function canWriteToContainer($user_guid = 0, $type = 'all', $subtype = 'all') { + return can_write_to_container($user_guid, $this->guid, $type, $subtype); } /** -- cgit v1.2.3