The documentation about the variables used in update_calculate_project_update_status is quite confusing as uses the same description for two different variables:
https://api.drupal.org/api/drupal/modules!update!update.compare.inc/func...

$project: An array containing information about a specific project.

$project_data: An array containing information about a specific project.

Currently, is hard to understand what is required in each variable if you don't read the code of the function.
Setting priority to minor, as is a quite obscure function, that no one will hardly use.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Issue tags: +Novice

It looks to me as though at some point, the function was changed so that $project is not used. The argument was removed in Drupal 8, but in Drupal 7 we would not have wanted to break function calls, so probably it was not removed there.

So I think what we should probably do is this:

a) Change $project argument to $unused

b) Document it as @param $unused with description "Input is not being used, but remains in function for API compatibility reasons" or something that reads better but gets this point across.

Seems like a good novice task?

er.pushpinderrana’s picture

Status: Active » Needs review
FileSize
1.13 KB

Please review attached patch.

David Hernández’s picture

Status: Needs review » Reviewed & tested by the community

This seems correct to me. Changing it to RTBC.

  • jhodgdon committed 8d1e516 on 7.x
    Issue #2340675 by er.pushpinderrana, David Hernández: Clarify first,...
jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed to 7.x. (After applying the patch, I double-checked and the new "$unused" variable is definitely not being used anywhere in that function.)

Status: Fixed » Closed (fixed)

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