Comments

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Needs backport to D7

Thanks! yeah. Probably an @see to the module function and an update to the docs would be appropriate. It should follow the standards in: https://drupal.org/node/1354#callbacks

And this is 8.x also.

c31ck’s picture

Changed the docblock: added the @see to system_sort_modules_by_info_name(), added the callback information.

c31ck’s picture

Status: Active » Needs review
wim leers’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/system/system.module
    @@ -1370,7 +1370,12 @@ function system_sort_modules_by_info_name($a, $b) {
    + * Callback for uasort within
    

    s/uasort/uasort()/

  2. +++ b/core/modules/system/system.module
    @@ -1370,7 +1370,12 @@ function system_sort_modules_by_info_name($a, $b) {
    + * @see system_sort_modules_by_info_name() for sorting modules.
    

    We just refer to functions, without additional information. The extra information can be found at that other function's documentation. So just

    @see function()
    

    is sufficient.

c31ck’s picture

Fixed both remarks.

c31ck’s picture

Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: system-sort-themes-documentation-2248799-5.patch, failed testing.

richard.c.allen2386’s picture

Looking to help finish up this issue tonight at a ladder sprint. I'm confused though, looks like patch 5 is failing but the issue was sent to community review? Am I missing something? Not sure where to pick up the issue.

jhodgdon’s picture

The test failures are not related to this patch. Sometimes the test bot has problems. Ignore them.

Regarding the latest patch, it looks good to me except the first line, which says:

Array sorting callback; sorts themes by their name.

Please take out the "Array sorting callback;" part. It is not necessary, since the rest of the doc block explains that it is a callback.

amitgoyal’s picture

Status: Needs work » Needs review
StatusFileSize
new594 bytes
new379 bytes

@jhodgdon - Please review updated patch which takes out the "Array sorting callback;" part.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, that looks better!

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Thanks again! Committed to 8.x. Needs backport to 7.x now.

amitgoyal’s picture

StatusFileSize
new544 bytes

Thanks @jhodgdon!

Please see patch for D7.

David_Rothstein’s picture

Status: Patch (to be ported) » Needs review
jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work

Thanks! The backport is correct, but I just noticed (doh!) that the function actually sorts themes with the default theme first, and then by name within the other non-default themes. So I think we should probably to back and fix the 8.x documentation and then return to 7.x. Just saying it sorts themes by name is not actually accurate.

amitgoyal’s picture

Status: Needs work » Needs review
StatusFileSize
new513 bytes

Please review the updated patch for 8.x as per #16.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! But the first-line documentation for a function needs to be one line. See:
https://drupal.org/node/1354#drupal

How about:

Sorts themes by their names, with the default theme listed first.

amitgoyal’s picture

Status: Needs work » Needs review
StatusFileSize
new478 bytes
new466 bytes

Sounds much better!

Please review revised patch.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

That works for me (not surprising). :)

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Thanks again! Committed to 8.x.

We now need patch #14 updated with the text change in #19 for D7.

amitgoyal’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new582 bytes
new347 bytes

Thanks @jhodgdon!

Please see revised patch for D7 with the text change in #19.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again all! Committed to 7.x.

  • Commit aeb6f56 on 7.x by jhodgdon:
    Issue #2248799 by amitgoyal, c31ck, Wim Leers: Fix docs for...

Status: Fixed » Closed (fixed)

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