]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Put the can_write_to_container() plugin hook in the right place after [3871].
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 1 Feb 2010 01:56:06 +0000 (01:56 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 1 Feb 2010 01:56:06 +0000 (01:56 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3875 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/entities.php

index 485a45cf1f8ed82c097ca0bac5ee822414ac5013..7d11f7214d6d46b78bf75af9e99361437757d900 100644 (file)
@@ -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);
 }
 
 /**