New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #37: Add ability to exclude certain files from the Packager #38
Conversation
$release_node->type = 'module_release'; | ||
} | ||
else { | ||
$errors['project_type_invalid'] = t('Project releases are only supported on module projects.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like in this example, the $errors
variable would not be returned anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, That was a copy/paste from the api example just above it. Pushed a more appropriate example
* @return NULL | ||
* No return value. | ||
*/ | ||
function hook_project_github_create_package_alter($project_name, array $files) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function hook_project_github_create_package_alter($project_name, array $files) { | |
function hook_project_github_create_package_alter(array &$files, $project_name) { |
I think $files has to be passed by reference in order for this to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, and actually most alter hooks have the array that is altered as the first parameter. e.g. hook_form_alter() passes $form, $form_state, and $form_id. This is similar where the $form_id is passed last even though it is the identifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in new commit.
Fixes #37