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 382-388 elsif ( $step && $step == 3 ) { Link Here
382
#Perform data validation on the flag that has been handed to onboarding.pl by the template
361
#Perform data validation on the flag that has been handed to onboarding.pl by the template
383
            my $flag = $input->param('flag');
362
            my $flag = $input->param('flag');
384
            if ( $input->param('newflags') ) {
363
            if ( $input->param('newflags') ) {
385
                my $dbh              = C4::Context->dbh();
386
                my @perms            = $input->multi_param('flag');
364
                my @perms            = $input->multi_param('flag');
387
                my %all_module_perms = ();
365
                my %all_module_perms = ();
388
                my %sub_perms        = ();
366
                my %sub_perms        = ();
Lines 498-504 elsif ( $step && $step == 5 ) { Link Here
498
    );
476
    );
499
477
500
    my $input = CGI->new;
478
    my $input = CGI->new;
501
    my $dbh   = C4::Context->dbh;
502
479
503
    my ( $template, $loggedinuser, $cookie ) =
480
    my ( $template, $loggedinuser, $cookie ) =
504
      C4::InstallAuth::get_template_and_user(
481
      C4::InstallAuth::get_template_and_user(
505
- 

Return to bug 17855