Sort button alphabetically

  1. 13 years ago

    Hi,

    Since the update to Fop2.23, I cannot sort FOP2's buttons alphabetically.
    After the update, I've modified /usr/src/fop2/server/autoconfig-buttons-freepbx.sh, like I did with FOP2.21 :
    Replace the "ORDER" statement in mysql queries : [code]ORDER BY type, label[/code] instead of [code]ORDER BY type, (exten+0)[/code]

    When I execute autoconfig-buttons-freepbx.sh, buttons are sorted alphabetically in the console, but they are not in FOP2.
    I tried restarting fop2_server, but this didn't help.

    Do you have a clue ?

    Thanks,

  2. admin

    30 Sep 2011 Administrator

    If you are executing that script from the fop2 configuration, it will display in the order you see on screen when executing it.. so it will just work. In the other hand, if you changed the fop2.cfg to not use autoconfiguration, then you will have to edit your manually configured button file to set the order that you want.

    Also, if you just restarted the server while having the page loaded in the browser, you will need to refresh the browser too, as the reconnection will probably preserve the previous button order.

  3. I'm not sure to understand your reply.

    My fop2.cfg was not modified. This is the original fop2.cfp after installtion fop2.23.
    As I said, when I'm execute autoconfig-buttons-freepbx.sh on SSH, the STDOUT shows buttons sorted alphabetically.
    When I go in FOP2 (web), my buttons are sorted by extension, not by label.

    This is not a browser cache issue, because I clear my cache, I tried with another browser, and I tried on another PC, the result is the same.

    I'm aware that this seems to be impossible, because fop2 use autoconfig-buttons-freepbx.cfg in order to load the buttons list, but the result is not the same in the console and in fop2....

    By the way, you're takling about an "autoconfiguration" setting in fop2. I don't see such parameter. What parameter is this ?

    Thanks,

  4. I've found the issue...

    I was modifying the script in /usr/src (as i mentionned in my first post) instead of /usr/local

    Problem solved.
    Thanks.

or Sign Up to reply!