Merge branch 'master' into uploader
Conflicts: assets/min/main.js assets/min/view.js
This commit is contained in:
commit
c482ebdd74
@ -343,7 +343,7 @@ build = {
|
|||||||
["Tags", build.tags(photoJSON.tags, forView)]
|
["Tags", build.tags(photoJSON.tags, forView)]
|
||||||
];
|
];
|
||||||
|
|
||||||
if ((photoJSON.takestamp+photoJSON.make+photoJSON.model+photoJSON.shutter+photoJSON.aperture+photoJSON.focal+photoJSON.iso)!=="null") {
|
if ((photoJSON.takestamp+photoJSON.make+photoJSON.model+photoJSON.shutter+photoJSON.aperture+photoJSON.focal+photoJSON.iso)!="0") {
|
||||||
|
|
||||||
infos = infos.concat([
|
infos = infos.concat([
|
||||||
["", "Camera"],
|
["", "Camera"],
|
||||||
|
@ -47,6 +47,18 @@ var settings = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Creation failed
|
||||||
|
if (data.indexOf("Warning: Creation failed!")!==-1) {
|
||||||
|
|
||||||
|
buttons = [
|
||||||
|
["Retry", function() { setTimeout(settings.createConfig, 400) }],
|
||||||
|
["", function() {}]
|
||||||
|
];
|
||||||
|
modal.show("Creation Failed", "Unable to create the database. Double-check your host, username and password and ensure that the specified user has the rights to modify and add content to the database.", buttons, null, false);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Could not create file
|
// Could not create file
|
||||||
if (data.indexOf("Warning: Could not create file!")!==-1) {
|
if (data.indexOf("Warning: Could not create file!")!==-1) {
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,11 +9,11 @@
|
|||||||
"url": "https://github.com/electerious/Lychee.git"
|
"url": "https://github.com/electerious/Lychee.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp": "^3.6.2",
|
"gulp": "^3.8.7",
|
||||||
"gulp-autoprefixer": "0.0.8",
|
"gulp-autoprefixer": "0.0.8",
|
||||||
"gulp-concat": "^2.2.0",
|
"gulp-concat": "^2.3.4",
|
||||||
"gulp-load-plugins": "^0.5.0",
|
"gulp-load-plugins": "^0.5.3",
|
||||||
"gulp-minify-css": "^0.3.4",
|
"gulp-minify-css": "^0.3.7",
|
||||||
"gulp-uglify": "^0.2.1"
|
"gulp-uglify": "^0.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,13 @@ class Database extends Module {
|
|||||||
$database = new mysqli($host, $user, $password);
|
$database = new mysqli($host, $user, $password);
|
||||||
|
|
||||||
if ($database->connect_errno) return 'Warning: Connection failed!';
|
if ($database->connect_errno) return 'Warning: Connection failed!';
|
||||||
else {
|
|
||||||
|
|
||||||
|
# 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
|
$config = "<?php
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -99,8 +104,6 @@ if(!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static function createDatabase($database, $name = 'lychee') {
|
static function createDatabase($database, $name = 'lychee') {
|
||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user