Commit e332b0b1 authored by Tobias Reich's avatar Tobias Reich
Browse files

Merge branch 'master' into uploader

parents 271297e3 1d57a132
......@@ -73,10 +73,16 @@ class Database extends Module {
if ($database->connect_errno) return 'Warning: Connection failed!';
# 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');
# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment