Lines 44-53
$info{'dbms'} =
Link Here
|
44 |
( C4::Context->config("db_scheme") |
44 |
( C4::Context->config("db_scheme") |
45 |
? C4::Context->config("db_scheme") |
45 |
? C4::Context->config("db_scheme") |
46 |
: "mysql" ); |
46 |
: "mysql" ); |
47 |
$info{'hostname'} = C4::Context->config("hostname"); |
47 |
$info{'hostname'} = C4::Context->config("hostname"); |
48 |
$info{'port'} = C4::Context->config("port"); |
48 |
$info{'webserver'} = C4::Context->config("webserver"); |
49 |
$info{'user'} = C4::Context->config("user"); |
49 |
$info{'port'} = C4::Context->config("port"); |
50 |
$info{'password'} = C4::Context->config("pass"); |
50 |
$info{'user'} = C4::Context->config("user"); |
|
|
51 |
$info{'password'} = C4::Context->config("pass"); |
51 |
my $dbh = DBI->connect( |
52 |
my $dbh = DBI->connect( |
52 |
"DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}" |
53 |
"DBI:$info{dbms}:dbname=$info{dbname};host=$info{hostname}" |
53 |
. ( $info{port} ? ";port=$info{port}" : "" ), |
54 |
. ( $info{port} ? ";port=$info{port}" : "" ), |
Lines 113-119
elsif ( $step && $step == 2 ) {
Link Here
|
113 |
#Check if user have all necessary grants on this database. |
114 |
#Check if user have all necessary grants on this database. |
114 |
my $rq = |
115 |
my $rq = |
115 |
$dbh->prepare( |
116 |
$dbh->prepare( |
116 |
"SHOW GRANTS FOR \'$info{user}\'\@'$info{hostname}'"); |
117 |
"SHOW GRANTS FOR \'$info{user}\'\@'$info{webserver}'"); |
117 |
$rq->execute; |
118 |
$rq->execute; |
118 |
my $grantaccess; |
119 |
my $grantaccess; |
119 |
while ( my ($line) = $rq->fetchrow ) { |
120 |
while ( my ($line) = $rq->fetchrow ) { |
120 |
- |
|
|