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.