Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The function view_unpublished_list_permissions() has not much value outside the scope of view_unpublished_permission(), so it would be better to factor it in.
The function name is also misleading, a developer that is looking for the full list of permissions that is provided by the module should call view_unpublished_permission(), not view_unpublished_list_permissions() since this does not even return the full list of permissions: 'view any published content' is missing from this list.
The function is also not documented.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1494630-1-view_unpublished-refactor_list_permissions.patch | 1.29 KB | pfrenssen |
Comments
Comment #1
pfrenssenComment #2
entendu CreditAttribution: entendu commentedAgreed, and I also prefer $array[] syntax to +=. Committed.