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.
Problem/Motivation
Forum module uses
drupal_map_assoc(range(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20));
to setup options for block configuration. This patch changes it to use range() function instead which makes the code more readable.
Proposed resolution
See patch
Remaining tasks
Review the patch
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#7 | forum-range-1716036-7.patch | 849 bytes | larowlan |
#3 | forum-1716036-3.patch | 870 bytes | xjm |
#1 | use-range-for-options-1716036-1.patch | 843 bytes | larowlan |
Comments
Comment #1
larowlanComment #2
Deciphered CreditAttribution: Deciphered commentedReviewed and tested, pretty straight forward.
Comment #3
xjmLooks like a good cleanup. Attached reformats the array per our array formatting standards, since it is over 80 chars: http://drupal.org/coding-standards#array
Comment #4
xjm#3: forum-1716036-3.patch queued for re-testing.
Comment #5
catchMuch better, thanks!
Comment #6
xjmThis is also backportable (the 7.x code is the same).
Comment #7
larowlanComment #8
dcam CreditAttribution: dcam commented#7: forum-range-1716036-7.patch queued for re-testing.
Comment #9
dcam CreditAttribution: dcam commentedI reviewed #7. It's the same change that was applied to D8. I tested the functionality in the forum block and it doesn't change after applying. Setting this as RTBC.
Comment #10
David_Rothstein CreditAttribution: David_Rothstein commentedCommitted to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/e1b5a52