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

Files: 
CommentFileSizeAuthor
#7 forum-range-1716036-7.patch849 byteslarowlan
PASSED: [[SimpleTest]]: [MySQL] 40,047 pass(es).
[ View ]
#3 forum-1716036-3.patch870 bytesxjm
PASSED: [[SimpleTest]]: [MySQL] 39,892 pass(es).
[ View ]
#1 use-range-for-options-1716036-1.patch843 byteslarowlan
PASSED: [[SimpleTest]]: [MySQL] 39,837 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new843 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,837 pass(es).
[ View ]

Status:Needs review» Reviewed & tested by the community

Reviewed and tested, pretty straight forward.

StatusFileSize
new870 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,892 pass(es).
[ View ]

Looks 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

#3: forum-1716036-3.patch queued for re-testing.

Status:Reviewed & tested by the community» Fixed

Much better, thanks!

Version:8.x-dev» 7.x-dev
Status:Fixed» Patch (to be ported)
Issue tags:+needs backport to D7

This is also backportable (the 7.x code is the same).

Status:Patch (to be ported)» Needs review
StatusFileSize
new849 bytes
PASSED: [[SimpleTest]]: [MySQL] 40,047 pass(es).
[ View ]

#7: forum-range-1716036-7.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

I 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.

Status:Reviewed & tested by the community» Fixed

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