From b5f807a0a0e8a886921dad977b8198cc165c567e Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Mon, 20 Sep 2021 12:36:02 +0300 Subject: [PATCH] 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 --- svc/config/systempreferences | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/svc/config/systempreferences b/svc/config/systempreferences index c54e7499c45..acaf3e485f9 100755 --- a/svc/config/systempreferences +++ b/svc/config/systempreferences @@ -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 ); -- 2.20.1