Print Extensions - Sort By User

Hey guys I’m looking to use print extensions to make a list for my users.

Right now Print Extensions sorts the Extensions by number and I’d like to sort them by name. I saw this post: http://www.freepbx.org/support/documentation/module-documentation/print-extensions But, the current version 2.11.0.1 of Print Extensions doesn’t work the same.

After looking a the code I think the rows are sorted using uksort() and uasort() and this bit of code.

function core_top($a, $b) { global $core_heading;
    if ($a == $core_heading) {
            return -1;
    } elseif ($b == $core_heading) {
            return 1;
    } elseif ($a != $b) {
            return $a < $b ? -1 : 1;
    } else {
            return 0;
    }

}

I’m honestly not familiar enough with the workings of FreePBX understand what’s going on in the sort. Plus have never used uk/ua sort.

Thanks for your help in advance.

I am not a PHP programmer but I can usually hack small changes.

I found this, PHP documentation:

http://www.php.net/manual/en/function.uasort.php

I am not a PHP programmer but I can usually hack small changes.

I found this, PHP documentation:

http://www.php.net/manual/en/function.uasort.php

I am not a PHP programmer but I can usually hack small changes.

I found this, PHP documentation:

http://www.php.net/manual/en/function.uasort.php

http://issues.freepbx.org/browse/FREEPBX
Please feel free to open a Feature request. If you find a solution and would like it included automatically you can submit a patch in the same manner if you have a code submission agreement.