Bug 4944: Do not rely on the values from cache during the update DB process
[koha-equinox.git] / installer / data / mysql / atomicupdate / bug_4944_OpacNoItemTypeImages.perl
1 $DBversion = 'XXX'; # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3
4     $dbh->do( q|
5         INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
6             SELECT 'OpacNoItemTypeImages', value, NULL, 'If ON, disables itemtype images in the OPAC','YesNo'
7             FROM (SELECT value FROM systempreferences WHERE variable="NoItemTypeImages") tmp
8     | );
9     $dbh->do( "UPDATE systempreferences SET explanation = 'If ON, disables itemtype images in the staff interface'
10         WHERE variable = 'noItemTypeImages' ");
11
12     # Always end with this (adjust the bug info)
13     NewVersion( $DBversion, 4944, "Add new system preference OpacNoItemTypeImages");
14 }