Bug 29056: Remove the demo functionality leftovers

Remove forgotten code of the old legacy demo functionality that was
removed from elsewhere except systempreferences, this code not only
serves no purpose but also is causing some troubles for our customers.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Petro Vashchuk 2021-09-20 12:36:02 +03:00 committed by Kyle Hall
parent 1803e69b2f
commit ed99f0fa02
1 changed files with 7 additions and 11 deletions

View File

@ -64,10 +64,8 @@ Used to set a single system preference.
sub set_preference {
my ( $preference ) = @_;
unless ( C4::Context->config('demo') ) {
my $value = join( ',', $query->param( 'value' ) );
C4::Context->set_preference( $preference, $value );
}
my $value = join( ',', $query->param( 'value' ) );
C4::Context->set_preference( $preference, $value );
C4::Service->return_success( $response );
}
@ -95,16 +93,14 @@ pref_virtualshelves=0
=cut
sub set_preferences {
unless ( C4::Context->config( 'demo' ) ) {
foreach my $param ( $query->param() ) {
my ( $pref ) = ( $param =~ /pref_(.*)/ );
foreach my $param ( $query->param() ) {
my ( $pref ) = ( $param =~ /pref_(.*)/ );
next if ( !defined( $pref ) );
next if ( !defined( $pref ) );
my $value = join( ',', $query->multi_param( $param ) );
my $value = join( ',', $query->multi_param( $param ) );
C4::Context->set_preference( $pref, $value );
}
C4::Context->set_preference( $pref, $value );
}
C4::Service->return_success( $response );