API page: http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...

Describe the problem you have found:

No function body on hook_file_insert() doc... Needs one!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michaellenahan’s picture

Assigned: Unassigned » michaellenahan

i'm at drupalcon london doc sprint. working on this with kay_v.

michaellenahan’s picture

Hello from DrupalCon in sunny South London.
We're at the doc sprint and have added an example.
Thanks to: bes and kay_v

Bès’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, adding_hook_file_insert_example-1260162-2.patch, failed testing.

jhodgdon’s picture

Seems to have too many parens in this line:

+  if (empty($validate))) {

Also, this bit at the end of the patch needs to be removed:

diff --git a/scripts/drupal.sh b/scripts/drupal.sh
old mode 100755
new mode 100644
diff --git a/scripts/password-hash.sh b/scripts/password-hash.sh
old mode 100755
new mode 100644
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
old mode 100755
new mode 100644
Bès’s picture

Status: Needs work » Needs review
FileSize
906 bytes

new patch with the fix

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks for the follow-up! Should go into d7/d8 I think.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.