Bug 20439: Sort SMS providers in alphabetical order by DB field
To test: 1/ Add 'Email' to the 'SMSSendDriver' system preference. 2/ Make sure 'EnhancedMessagingPreferencesOPAC' and 'EnhancedMessagingPreferences' are turned on. 3/ Add some SMS providers (/cgi-bin/koha/admin/sms_providers.pl) with different names. 4/ Notice on memberentry.pl and opac-messaging.pl the SMS providers sort by when they were added, not alphabetically. 5/ Apply patch and restart services. 6/ Look at memberentry.pl and opac-messaging.pl and notice that they SMS providers now sort alphabetically. Signed-off-by: George Williams <george@nekls.org Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
73d2066837
commit
fd49601079
|
|
@ -68,7 +68,7 @@ if ( $borrowernumber and not $patron ) {
|
|||
}
|
||||
|
||||
if ( C4::Context->preference('SMSSendDriver') eq 'Email' ) {
|
||||
my @providers = Koha::SMS::Providers->search->as_list;
|
||||
my @providers = Koha::SMS::Providers->search( {}, { order_by => 'name' } )->as_list;
|
||||
$template->param( sms_providers => \@providers );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,10 @@ $template->param(
|
|||
TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") );
|
||||
|
||||
if ( C4::Context->preference("SMSSendDriver") eq 'Email' ) {
|
||||
my $providers = Koha::SMS::Providers->search;
|
||||
$template->param( sms_providers => $providers, sms_provider_id => $patron->sms_provider_id );
|
||||
my @providers = Koha::SMS::Providers->search( {}, { order_by => 'name' } )->as_list;
|
||||
$template->param(
|
||||
sms_providers => \@providers,
|
||||
sms_provider_id => $patron->sms_provider_id );
|
||||
}
|
||||
|
||||
my $new_session_id = $query->cookie('CGISESSID');
|
||||
|
|
|
|||
Loading…
Reference in New Issue