View | Details | Raw Unified | Return to bug 12031
Collapse All | Expand All

(-)a/Makefile.PL (-1 / +3 lines)
Lines 1259-1265 sub get_target_directories { Link Here
1259
        $dirmap{'PAZPAR2_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'pazpar2');
1259
        $dirmap{'PAZPAR2_CONF_DIR'} = File::Spec->catdir(@basedir, $package, 'etc', 'pazpar2');
1260
        $dirmap{'MISC_DIR'} = File::Spec->catdir(@basedir, $package, 'misc');
1260
        $dirmap{'MISC_DIR'} = File::Spec->catdir(@basedir, $package, 'misc');
1261
        $dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
1261
        $dirmap{'SCRIPT_DIR'} = File::Spec->catdir(@basedir, $package, 'bin');
1262
        $dirmap{'SCRIPT_NONDEV_DIR'} = $dirmap{'SCRIPT_DIR'};
1262
        #For dev install, point NONDEV_DIR to misc in current dir (not base)
1263
        #Used by supportdir in koha-conf.xml (BZ 12031)
1264
        $dirmap{'SCRIPT_NONDEV_DIR'} = File::Spec->catdir($curdir, 'misc');
1263
        $skipdirs{'SCRIPT_NONDEV_DIR'} = 1;
1265
        $skipdirs{'SCRIPT_NONDEV_DIR'} = 1;
1264
        $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
1266
        $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man');
1265
        $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
1267
        $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc');
(-)a/etc/koha-conf.xml (-5 / +3 lines)
Lines 106-116 __PAZPAR2_TOGGLE_XML_POST__ Link Here
106
      tool -->
106
      tool -->
107
 <backup_db_via_tools>0</backup_db_via_tools>
107
 <backup_db_via_tools>0</backup_db_via_tools>
108
 <backup_conf_via_tools>0</backup_conf_via_tools>
108
 <backup_conf_via_tools>0</backup_conf_via_tools>
109
 <!-- Uncomment the following line if you are not using packages and need to schedule reports through the web interface
109
 <!-- Uncomment the following line if you are not using packages and need to schedule reports through the web interface. supportdir should contain cronjobs/runreport.pl -->
110
 Example:
110
 <!--
111
 My runreports.pl is in /home/user/koha-src/koha/misc/cronjobs
111
 <supportdir>__SCRIPT_NONDEV_DIR__</supportdir>
112
 my <supportdir> would be as follows:
113
 <supportdir>/home/user/koha-src/koha/misc</supportdir>
114
 -->
112
 -->
115
 <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url>
113
 <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url>
116
 <install_log>__MISC_DIR__/koha-install-log</install_log>
114
 <install_log>__MISC_DIR__/koha-install-log</install_log>
(-)a/rewrite-config.PL (+1 lines)
Lines 115-120 $prefix = $ENV{'INSTALL_BASE'} || "/usr"; Link Here
115
  '__PAZPAR2_CONF_DIR__' => "$prefix/etc/koha/pazpar2",
115
  '__PAZPAR2_CONF_DIR__' => "$prefix/etc/koha/pazpar2",
116
  '__MISC_DIR__' => "$prefix/misc",
116
  '__MISC_DIR__' => "$prefix/misc",
117
  '__SCRIPT_DIR__' => "$prefix/bin",
117
  '__SCRIPT_DIR__' => "$prefix/bin",
118
  '__SCRIPT_NONDEV_DIR__' => "$prefix/bin",
118
  '__MAN_DIR__' => "$prefix/man",
119
  '__MAN_DIR__' => "$prefix/man",
119
  '__DOC_DIR__' => "$prefix/doc",
120
  '__DOC_DIR__' => "$prefix/doc",
120
  '__ZEBRA_LOCK_DIR__' => "$prefix/var/lock/zebradb",
121
  '__ZEBRA_LOCK_DIR__' => "$prefix/var/lock/zebradb",
(-)a/tools/scheduler.pl (-14 / +16 lines)
Lines 40-46 if ( C4::Context->config('supportdir') ) { Link Here
40
     $base = C4::Context->config('supportdir');
40
     $base = C4::Context->config('supportdir');
41
}
41
}
42
else {
42
else {
43
     $base        = "/usr/share/koha/bin";
43
     $base = "/usr/share/koha/bin";
44
}
44
}
45
45
46
my $CONFIG_NAME = $ENV{'KOHA_CONF'};
46
my $CONFIG_NAME = $ENV{'KOHA_CONF'};
Lines 68-91 if ( $mode eq 'job_add' ) { Link Here
68
    my $startdate = join('', (split /-/, $c4date->output("iso")));
68
    my $startdate = join('', (split /-/, $c4date->output("iso")));
69
69
70
    my $starttime = $input->param('starttime');
70
    my $starttime = $input->param('starttime');
71
    my $recurring = $input->param('recurring');
72
    $starttime =~ s/\://g;
71
    $starttime =~ s/\://g;
73
    my $start  = $startdate . $starttime;
72
    my $start  = $startdate . $starttime;
74
    my $report = $input->param('report');
73
    my $report = $input->param('report');
75
    my $format = $input->param('format');
74
    my $format = $input->param('format');
76
    my $email  = $input->param('email');
75
    my $email  = $input->param('email');
77
    my $command =
76
    my $command =
78
        "export KOHA_CONF=\"$CONFIG_NAME\"; " . $base
77
        "export KOHA_CONF=\"$CONFIG_NAME\"; " .
79
      . "/cronjobs/runreport.pl $report --format=$format --to=$email";
78
        "$base/cronjobs/runreport.pl $report --format=$format --to=$email";
80
79
81
    if ($recurring) {
80
#FIXME commit ea899bc55933cd74e4665d70b1c48cab82cd1257 added recurring parameter (it is not in template) and call to add_cron_job (undefined)
82
        my $frequency = $input->param('frequency');
81
#    my $recurring = $input->param('recurring');
83
        add_cron_job( $start, $command );
82
#    if ($recurring) {
84
    }
83
#        my $frequency = $input->param('frequency');
85
    else {
84
#        add_cron_job( $start, $command );
86
        unless ( add_at_job( $start, $command ) ) {
85
#    }
87
            $template->param( job_add_failed => 1 );
86
#    else {
88
        }
87
#        #here was the the unless ( add_at_job
88
#    }
89
90
    unless ( add_at_job( $start, $command ) ) {
91
        $template->param( job_add_failed => 1 );
89
    }
92
    }
90
}
93
}
91
94
92
- 

Return to bug 12031