Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
photos
Commits
1d57a132
Commit
1d57a132
authored
Aug 08, 2014
by
Tobias Reich
Browse files
Fixed "Setup tries to create database lychee_dbcheck #202"
parent
28f8aab3
Changes
1
Show whitespace changes
Inline
Side-by-side
php/modules/Database.php
View file @
1d57a132
...
...
@@ -73,11 +73,17 @@ class Database extends Module {
if
(
$database
->
connect_errno
)
return
'Warning: Connection failed!'
;
# Check if database exists
if
(
!
$database
->
select_db
(
$name
))
{
# Database doesn't exist
# Check if user can create a database
$result
=
$database
->
query
(
'CREATE DATABASE lychee_dbcheck'
);
if
(
!
$result
)
return
'Warning: Creation failed!'
;
else
$database
->
query
(
'DROP DATABASE lychee_dbcheck'
);
}
# Save config.php
$config
=
"<?php
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment