diff --git a/docs/md/Settings.md b/docs/md/Settings.md index 3b7adb4..adc4c58 100644 --- a/docs/md/Settings.md +++ b/docs/md/Settings.md @@ -38,10 +38,4 @@ If `1`, Lychee will check if you are using the latest version. The notice will b sorting = ORDER BY [row] [ASC|DESC] -A typical part of a MySQL statement. This string will be appended to mostly every MySQL query. - -#### Import Filename - - importFilename = [0|1] - -If `1`, Lychee will import the filename of the upload file. \ No newline at end of file +A typical part of a MySQL statement. This string will be appended to mostly every MySQL query. \ No newline at end of file diff --git a/php/modules/db.php b/php/modules/db.php index fb80b7a..7680fc9 100755 --- a/php/modules/db.php +++ b/php/modules/db.php @@ -101,8 +101,7 @@ function dbCreateTables($database) { ('password',''), ('thumbQuality','90'), ('checkForUpdates','1'), - ('sorting','ORDER BY id DESC'), - ('importFilename','1'); + ('sorting','ORDER BY id DESC'); "; diff --git a/php/modules/misc.php b/php/modules/misc.php index 41768d7..0678fce 100755 --- a/php/modules/misc.php +++ b/php/modules/misc.php @@ -93,9 +93,6 @@ function update() { if($database->query("SELECT `description` FROM `lychee_photos` LIMIT 1;")) $database->query("ALTER TABLE `lychee_photos` CHANGE `description` `description` VARCHAR( 1000 ) NULL DEFAULT ''"); if(!$database->query("SELECT `tags` FROM `lychee_photos` LIMIT 1;")) $database->query("ALTER TABLE `lychee_photos` ADD `tags` VARCHAR( 1000 ) NULL DEFAULT ''"); $database->query("UPDATE `lychee_photos` SET url = replace(url, 'uploads/big/', ''), thumbUrl = replace(thumbUrl, 'uploads/thumb/', '')"); - - $result = $database->query("SELECT `value` FROM `lychee_settings` WHERE `key` = 'importFilename' LIMIT 1;"); - if ($result->fetch_object()!==true) $database->query("INSERT INTO `lychee_settings` (`key`, `value`) VALUES ('importFilename', '1')"); return true; diff --git a/php/modules/upload.php b/php/modules/upload.php index 7ca5462..3cda662 100755 --- a/php/modules/upload.php +++ b/php/modules/upload.php @@ -61,9 +61,8 @@ function upload($files, $albumID) { $info = getInfo($photo_name); // Use title of file if IPTC title missing - if ($info['title']===''&& - $settings['importFilename']==='1') - $info['title'] = mysqli_real_escape_string($database, substr(basename($file['name'], ".$extension"), 0, 30)); + if ($info['title']==='') + $info['title'] = mysqli_real_escape_string($database, substr(basename($file['name'], ".$extension"), 0, 30)); // Set orientation based on EXIF data if ($file['type']==='image/jpeg'&&isset($info['orientation'])&&isset($info['width'])&&isset($info['height'])) {