aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-04 15:47:36 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-04 15:47:36 +0000
commitcb2e0c121bfcfa0058fb27faa4367e383615c5b1 (patch)
tree936c5052e3a4a3a0d1599b2518e416effc7ad086
parentda78f2cf03d4586845cc31c86e026661a5ae0fa1 (diff)
downloadelgg-cb2e0c121bfcfa0058fb27faa4367e383615c5b1.tar.gz
elgg-cb2e0c121bfcfa0058fb27faa4367e383615c5b1.tar.bz2
Fixed the container_guid override.
git-svn-id: https://code.elgg.org/elgg/trunk@1684 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/entities.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 6110b0db7..ff89a3142 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1096,7 +1096,7 @@
* @param int $user_guid The user guid, or 0 for $_SESSION['user']->getGUID()
* @param int $container_guid The container, or 0 for the current page owner.
*/
- function can_write_to_container($user_guid = 0, $container_guid = 0)
+ function can_write_to_container($user_guid = 0, $container_guid = 0, $entity_type = 'all')
{
global $CONFIG;
@@ -1122,7 +1122,7 @@
if (!$container->isMember($user)) return false;
// See if anyone else has anything to say
- return trigger_plugin_hook('container_permissions_check',$entity->type,array('container' => $container, 'user' => $user), false);
+ return trigger_plugin_hook('container_permissions_check',$entity_type,array('container' => $container, 'user' => $user), false);
}
@@ -1153,7 +1153,7 @@
$site_guid = (int) $site_guid;
if ($container_guid == 0) $container_guid = $owner_guid;
- if (!can_write_to_container($owner_guid, $container_guid)) return false;
+ if (!can_write_to_container($owner_guid, $container_guid, $type)) return false;
if ($type=="") throw new InvalidParameterException(elgg_echo('InvalidParameterException:EntityTypeNotSet'));