I actually had to change these lines in NfProfile.pm to make it sort
alpha by adding the sort function is a slightly different place:
sub ProfileGroups
@AllProfilesGroups = sort grep { $_ !~ /^\.+/ && -d
"$NfConf::PROFILESTATDIR/$_" &&
sub ProfileList
@AllProfiles = sort grep { -f
"$NfConf::PROFILESTATDIR/$profilegroup/$_/profile.dat" && $_ !~ /^\./ &&
$_ ne 'live' }
And this displays it in alpha order!!!
Many thanks.
-Robin
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter
Haag
Sent: Monday, May 21, 2007 4:36 AM
To: [email protected]
Subject: Re: [Nfsen-discuss] Profile drop dwon menu
ordernfsen-snapshot-20070312
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- --On May 18, 2007 14:15:59 -0400 "Brown, Robin"
<[EMAIL PROTECTED]> wrote:
| How can I change the order of the profile drop down menu in the web
| interface? It appears to be in the order they were created, I'd like
to
| get them alphabetical.
This is currently by order of the directory, where the profiles are
stores.
If you want to make that alpa sorted you need to patch the two functions
in NfProfile.pm:
Make the return array sorted:
At the end of function ProfileGroups:
return sort @AllProfilesGroups;
} # End of ProfileGroups
At the end of ProfileList:
return sort @AllProfiles;
} # End of ProfileList
- Peter
|
| Thanks and regards,
| Robin
|
|
|
|
------------------------------------------------------------------------
-
| This SF.net email is sponsored by DB2 Express
| Download DB2 Express C - the FREE version of DB2 express and take
| control of your XML. No limits. Just data. Click to get it now.
| http://sourceforge.net/powerbar/db2/
| _______________________________________________
| Nfsen-discuss mailing list
| [email protected]
| https://lists.sourceforge.net/lists/listinfo/nfsen-discuss
- --
_______ SWITCH - The Swiss Education and Research Network ______
Peter Haag, Security Engineer, Member of SWITCH CERT
PGP fingerprint: D9 31 D5 83 03 95 68 BA FB 84 CA 94 AB FC 5D D7
SWITCH, Werdstrasse 2, P.O. Box, CH-8021 Zurich, Switzerland
E-mail: [EMAIL PROTECTED] Web: http://www.switch.ch/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iQCVAwUBRlFZ4f5AbZRALNr/AQLAfQQAn3wP2CBlLXw9ghon20uSYplA/FdkDEMt
TIMT5YTAlILCyXK3dryAmuAMXtLCfymCvLy4obiDrSMmghHOvGLK0ptu2yxHPPPc
D6u9yuJE+Sf3Qi9Dw3vqN24ba70llnajYtlclikUVEeUyoKw1b2fpWu4oMZtQxWk
kwdJk/GrTMw=
=8ksg
-----END PGP SIGNATURE-----
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nfsen-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Nfsen-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss