# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
-$VERSION = "3.23.00.057";
+$VERSION = "3.23.00.058";
sub version {
return $VERSION;
+++ /dev/null
-my $dbh = C4::Context->dbh;
-my ( $count_imageurl ) = $dbh->selectrow_array(q|
- SELECT COUNT(*)
- FROM authorised_values
- WHERE imageurl IS NOT NULL
- AND imageurl <> ""
-|);
-unless ( $count_imageurl ) {
- if ( C4::Context->preference('AuthorisedValueImages')
- or C4::Context->preference('StaffAuthorisedValueImages') ) {
- $dbh->do(q|
- UPDATE systempreferences
- SET value=0
- WHERE variable="AuthorisedValueImages"
- or variable="StaffAuthorisedValueImages"
- |);
- warn "The system preferences AuthorisedValueImages and StaffAuthorisedValueImages have been turned off\n";
- warn "authorised_values.imageurl is not populated, that means you are not using this feature\n"
- }
-} else {
- warn "At least one authorised value has an icon defined (imageurl)\n";
- warn "The system preference AuthorisedValueImages or StaffAuthorisedValueImages could be turned off if you are not aware of this feature\n";
-}
SetVersion($DBversion);
}
+$DBversion = "3.23.00.058";
+if ( CheckVersion($DBversion) ) {
+
+ my ($count_imageurl) = $dbh->selectrow_array(q|
+ SELECT COUNT(*)
+ FROM authorised_values
+ WHERE imageurl IS NOT NULL
+ AND imageurl <> ""
+ |);
+
+ unless ($count_imageurl) {
+ if ( C4::Context->preference('AuthorisedValueImages')
+ or C4::Context->preference('StaffAuthorisedValueImages') )
+ {
+ $dbh->do(q|
+ UPDATE systempreferences
+ SET value = 0
+ WHERE variable = "AuthorisedValueImages"
+ or variable = "StaffAuthorisedValueImages"
+ |);
+ warn "The system preferences AuthorisedValueImages and StaffAuthorisedValueImages have been turned off\n";
+ warn "authorised_values.imageurl is not populated, that means you are not using this feature\n";
+ }
+ }
+ else {
+ warn "At least one authorised value has an icon defined (imageurl)\n";
+ warn "The system preference AuthorisedValueImages or StaffAuthorisedValueImages could be turned off if you are not aware of this feature\n";
+ }
+
+ print "Upgrade to $DBversion done (Bug 15531 - Add support for standing orders)\n";
+ SetVersion($DBversion);
+}
+
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068