Skip to content

Commit

Permalink
Merge pull request #4 from OlivierInlibro/master
Browse files Browse the repository at this point in the history
Fix path directory when koha is in "dev" or "prod" mode
  • Loading branch information
philblou authored Oct 17, 2024
2 parents b7a28d0 + 6fedd93 commit 6a099c3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Koha/Plugin/MessagingPreferenceWizard.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ use Data::Dumper;
use File::Spec;
use Koha::DateUtils qw ( dt_from_string );

our $VERSION = 1.5;
our $VERSION = 1.6;

our $metadata = {
name => 'Enhanced messaging preferences wizard',
author => 'Bouzid Fergani, Alexandre Noël',
author => 'Bouzid Fergani, Alexandre Noël, Olivier Vezina',
description => 'Setup or reset the enhanced messaging preferences to default values',
date_authored => '2016-07-13',
date_updated => '2024-07-22',
date_updated => '2024-10-17',
minimum_version => '22.05.00',
maximum_version => undef,
version => $VERSION,
Expand Down Expand Up @@ -96,7 +96,10 @@ sub tool {
q|SELECT DISTINCT bo.borrowernumber, bo.categorycode FROM borrowers bo
LEFT JOIN borrower_message_preferences mp USING (borrowernumber)
WHERE 1|;
my $script_path = '../misc/maintenance/borrowers-force-messaging-defaults.pl';
my $script_path = '/usr/share/koha/bin/maintenance/borrowers-force-messaging-defaults.pl';
if(C4::Context->config("dev_install")){
$script_path = '../misc/maintenance/borrowers-force-messaging-defaults.pl';
}
my $command = "perl $script_path --doit";
if ( $since ) {
$command .= " --since $since";
Expand Down

0 comments on commit 6a099c3

Please sign in to comment.