From: Katrin Fischer Date: Wed, 20 Sep 2017 21:28:49 +0000 (+0200) Subject: Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference X-Git-Tag: v17.11.00~308 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=3d1794123e902132671fbc5f9278c05bf5c4eb15;p=koha_ffzg Bug 16401: (follow-up) Avoid changing empty staffClientBaseURL preference Adds a condition to check that the staffClientBaseUrl is not empty before updating it with 'http://'. Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- diff --git a/installer/data/mysql/atomicupdate/bug_16401.perl b/installer/data/mysql/atomicupdate/bug_16401.perl index 946953c46c..3f3492e1ee 100644 --- a/installer/data/mysql/atomicupdate/bug_16401.perl +++ b/installer/data/mysql/atomicupdate/bug_16401.perl @@ -1,6 +1,6 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { - $dbh->do( "UPDATE systempreferences SET value = CONCAT('http://', value) WHERE variable = 'staffClientBaseURL' AND value NOT LIKE 'http%'" ); + $dbh->do( "UPDATE systempreferences SET value = CONCAT('http://', value) WHERE variable = 'staffClientBaseURL' AND value <> '' AND value NOT LIKE 'http%'" ); # Always end with this (adjust the bug info) SetVersion( $DBversion );