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

(-)a/installer/onboarding.pl (-24 lines)
Lines 17-25 Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
#Recommended pragmas
21
use Modern::Perl;
20
use Modern::Perl;
22
use diagnostics;
23
use C4::InstallAuth;
21
use C4::InstallAuth;
24
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
25
use C4::Output;
23
use C4::Output;
Lines 51-75 my ( $template, $loggedinuser, $cookie ) = Link Here
51
    }
49
    }
52
  );
50
  );
53
51
54
#Check database connection
55
my %info;
56
$info{'dbname'} = C4::Context->config("database");
57
$info{'dbms'}   = (
58
      C4::Context->config("db_scheme")
59
    ? C4::Context->config("db_scheme")
60
    : "mysql"
61
);
62
63
$info{'hostname'} = C4::Context->config("hostname");
64
$info{'port'}     = C4::Context->config("port");
65
$info{'user'}     = C4::Context->config("user");
66
$info{'password'} = C4::Context->config("pass");
67
my $dbh = DBI->connect(
68
    "DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}"
69
      . ( $info{port} ? ";port=$info{port}" : "" ),
70
    $info{'user'}, $info{'password'}
71
);
72
73
#Store the value of the template input name='op' in the variable $op so we can check if the user has pressed the button with the name="op" and value="finish" meaning the user has finished the onboarding tool.
52
#Store the value of the template input name='op' in the variable $op so we can check if the user has pressed the button with the name="op" and value="finish" meaning the user has finished the onboarding tool.
74
my $op = $input->param('op') || '';
53
my $op = $input->param('op') || '';
75
$template->param( 'op' => $op );
54
$template->param( 'op' => $op );
Lines 379-385 elsif ( $step && $step == 3 ) { Link Here
379
#Perform data validation on the flag that has been handed to onboarding.pl by the template
358
#Perform data validation on the flag that has been handed to onboarding.pl by the template
380
            my $flag = $input->param('flag');
359
            my $flag = $input->param('flag');
381
            if ( $input->param('newflags') ) {
360
            if ( $input->param('newflags') ) {
382
                my $dbh              = C4::Context->dbh();
383
                my @perms            = $input->multi_param('flag');
361
                my @perms            = $input->multi_param('flag');
384
                my %all_module_perms = ();
362
                my %all_module_perms = ();
385
                my %sub_perms        = ();
363
                my %sub_perms        = ();
Lines 491-497 elsif ( $step && $step == 5 ) { Link Here
491
    );
469
    );
492
470
493
    my $input = CGI->new;
471
    my $input = CGI->new;
494
    my $dbh   = C4::Context->dbh;
495
472
496
    my ( $template, $loggedinuser, $cookie ) =
473
    my ( $template, $loggedinuser, $cookie ) =
497
      C4::InstallAuth::get_template_and_user(
474
      C4::InstallAuth::get_template_and_user(
498
- 

Return to bug 17855