From 50176b8beae50537bf8308cf13ae51ff6c8cff5e Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 1 Feb 2010 01:56:06 +0000 Subject: Put the can_write_to_container() plugin hook in the right place after [3871]. git-svn-id: http://code.elgg.org/elgg/trunk@3875 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 485a45cf1..7d11f7214 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -1470,6 +1470,7 @@ function can_write_to_container($user_guid = 0, $container_guid = 0, $entity_typ if (!$container_guid) { $container_guid = page_owner(); } + if (!$container_guid) { $return = TRUE; } @@ -1490,13 +1491,11 @@ function can_write_to_container($user_guid = 0, $container_guid = 0, $entity_typ $return = TRUE; } } - - // See if anyone else has anything to say - return trigger_plugin_hook('container_permissions_check', $entity_type, - array('container' => $container, 'user' => $user), $return); } - return false; + // See if anyone else has anything to say + return trigger_plugin_hook('container_permissions_check', $entity_type, + array('container' => $container, 'user' => $user), $return); } /** -- cgit v1.2.3