summaryrefslogtreecommitdiff
path: root/modules/file/file.api.php
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-02-01 13:46:20 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-02-01 13:46:20 -0800
commit7bb06635ee0fbb36d5e4b24368e8224976dba852 (patch)
tree0fc7622ac7fcb96a18eb8edae2d09d8e28d6a407 /modules/file/file.api.php
parent52ffc1eae3f2bdd44a508139b483f01098cb945e (diff)
parent40093b2fa7dde4a5f3c6806aad91b9302c232903 (diff)
downloadbrdo-7bb06635ee0fbb36d5e4b24368e8224976dba852.tar.gz
brdo-7bb06635ee0fbb36d5e4b24368e8224976dba852.tar.bz2
Drupal 7.12
Diffstat (limited to 'modules/file/file.api.php')
-rw-r--r--modules/file/file.api.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/file/file.api.php b/modules/file/file.api.php
index 7f20d83f8..72aae40c9 100644
--- a/modules/file/file.api.php
+++ b/modules/file/file.api.php
@@ -12,8 +12,8 @@
* file is referenced, e.g., only users with access to a node should be allowed
* to download files attached to that node.
*
- * @param $field
- * The field to which the file belongs.
+ * @param array $file_item
+ * The array of information about the file to check access for.
* @param $entity_type
* The type of $entity; for example, 'node' or 'user'.
* @param $entity
@@ -26,7 +26,7 @@
*
* @see hook_field_access().
*/
-function hook_file_download_access($field, $entity_type, $entity) {
+function hook_file_download_access($file_item, $entity_type, $entity) {
if ($entity_type == 'node') {
return node_access('view', $entity);
}
@@ -45,8 +45,8 @@ function hook_file_download_access($field, $entity_type, $entity) {
* An array of grants gathered by hook_file_download_access(). The array is
* keyed by the module that defines the entity type's access control; the
* values are Boolean grant responses for each module.
- * @param $field
- * The field to which the file belongs.
+ * @param array $file_item
+ * The array of information about the file to alter access for.
* @param $entity_type
* The type of $entity; for example, 'node' or 'user'.
* @param $entity
@@ -58,7 +58,7 @@ function hook_file_download_access($field, $entity_type, $entity) {
* module's value in addition to other grants or to overwrite the values set
* by other modules.
*/
-function hook_file_download_access_alter(&$grants, $field, $entity_type, $entity) {
+function hook_file_download_access_alter(&$grants, $file_item, $entity_type, $entity) {
// For our example module, we always enforce the rules set by node module.
if (isset($grants['node'])) {
$grants = array('node' => $grants['node']);