From: http://community.aegirproject.org/discuss/20-rc4-released#comment-2029
jb044:
I noticed there is a new hook in 2.0-rc3:
hook_provision_drupal_create_directories_alter
It doesn't work however because the $mkdir array is passed by value. This however worked for my application (some files in subfolders of files end up with wrong permissions), note the _ref part!
// Allow other commands to add or alter the directories to be created.
drush_command_invoke_all_ref('provision_drupal_create_directories_alter', $mkdir, $url);
drush_command_invoke_all_ref('provision_drupal_chgrp_directories_alter', $chgrp, $url);
This relates to: #1283738: Add new hook provision_drupal_create_directories in _provision_drupal_create_directories
Comment | File | Size | Author |
---|---|---|---|
#7 | provision.code_.2096629-7.patch | 1.41 KB | helmo |
#6 | provision.code_.2096629-6.patch | 987 bytes | helmo |
#2 | provision_2096629.patch | 722 bytes | cinnamon |
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedsince we'll be stuck with this API with all of 2.x, i feel this is critical enough that it should block.
Comment #2
cinnamon CreditAttribution: cinnamon commentedAnd here is the patch against 6.x-2.x.
First, imho there should also be a chgrp hook, but most import: this should be documented in provision.api.php
Comment #3
cweagansLooks good to me.
Comment #4
cweagansEh, whoops. I missed.
Comment #5
anarcat CreditAttribution: anarcat commentedalright, committed.
let's get that .api documentation in place please. also add it to the community.aegirproject.org/upgrading/path page.
Comment #6
helmo CreditAttribution: helmo commentedIt's a new hook in 2.x so documenting in /upgrading/path seems unnecessary.
Here's a patch for provision.api.php
Comment #7
helmo CreditAttribution: helmo commentedHere's an additional patch.
The first two hunks remove comment about a parameter we don't have(anymore?)
The third removes $profile from _provision_drupal_create_directories($url = NULL, $profile = NULL), the function did nothing with the value of $profile and in no place do we call the function with that parameter.
The '_' prefix implies an internal function... would that need a mention on /upgrading/path ?
Comment #8
cweagansRTBC for #6 for sure. That looks great!
+1 for the updates in #7 - we don't actually use that stuff. Technically, I guess that's an API change. I think it's okay, though.
Comment #9
helmo CreditAttribution: helmo commentedCommitted #6
setting status to review #7 by @anarcat
Comment #10
anarcat CreditAttribution: anarcat commentedi think it's fine to fix the API, commit already. :)
Comment #11
helmo CreditAttribution: helmo commentedcommitted