Includes small fixes and enhancements.
This commit is contained in:
Tobias Reich 2013-10-20 13:08:39 +02:00
parent 603d2d5f8d
commit 59a735afdd
3 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,7 @@ var lychee = {
init: function() {
this.version = "1.3.1";
this.version = "1.3.2";
this.api_path = "php/api.php";
this.update_path = "http://lychee.electerious.com/version/index.php";
this.updateURL = "https://github.com/electerious/Lychee";

View File

@ -66,7 +66,7 @@ function createTables($database) {
`aperture` varchar(10) NOT NULL,
`make` varchar(20) NOT NULL,
`model` varchar(50) NOT NULL,
`shutter` varchar(10) NOT NULL,
`shutter` varchar(20) NOT NULL,
`focal` varchar(10) NOT NULL,
`takedate` varchar(10) NOT NULL,
`taketime` varchar(8) NOT NULL,
@ -117,7 +117,7 @@ function upload($files, $albumID) {
$data = $data[0];
// Import if not uploaded via web
if (!is_uploaded_file($tmp_name)) {
if (!is_uploaded_file($file)) {
if (copy($tmp_name, "../uploads/big/" . md5($id) . ".$data")) {
unlink($tmp_name);
$import_name = $tmp_name;
@ -147,8 +147,8 @@ function upload($files, $albumID) {
if (isset($info['focal'])){$focal=$info['focal'];} else {$focal="";}
if (isset($info['takeDate'])){$takeDate=$info['takeDate'];} else {$takeDate="";}
if (isset($info['takeTime'])){$takeTime=$info['takeTime'];} else {$takeTime="";}
$query = "INSERT INTO lychee_photos (id, title, url, type, width, height, size, sysdate, systime, iso, aperture, make, model, shutter, focal, takedate, taketime, thumbUrl, album, public, star, import_name)
VALUES ('$id', '$title', '" . md5($id) . ".$data', '$type', '$width', '$height', '$size', '$sysdate', '$systime', '$iso', '$aperture', '$make', '$model', '$shutter', '$focal', '$takeDate', '$takeTime', '" . md5($id) . ".$data', '$albumID', '$public', '$star', '$import_name');";
$query = "INSERT INTO lychee_photos (id, title, description, url, type, width, height, size, sysdate, systime, iso, aperture, make, model, shutter, focal, takedate, taketime, thumbUrl, album, public, star, import_name)
VALUES ('$id', '$title', '" . md5($id) . ".$data', '', '$type', '$width', '$height', '$size', '$sysdate', '$systime', '$iso', '$aperture', '$make', '$model', '$shutter', '$focal', '$takeDate', '$takeTime', '" . md5($id) . ".$data', '$albumID', '$public', '$star', '$import_name');";
$result = $database->query($query);
}