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 <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Katrin Fischer 2017-09-20 23:28:49 +02:00 committed by Jonathan Druart
parent 36c3d45426
commit 3d1794123e

View file

@ -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 );