Removed importFilename setting

This commit is contained in:
Tobias Reich 2014-02-14 19:08:07 +01:00
parent a06bc1786a
commit 49fd3967b6
4 changed files with 4 additions and 15 deletions

View File

@ -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.
A typical part of a MySQL statement. This string will be appended to mostly every MySQL query.

View File

@ -101,8 +101,7 @@ function dbCreateTables($database) {
('password',''),
('thumbQuality','90'),
('checkForUpdates','1'),
('sorting','ORDER BY id DESC'),
('importFilename','1');
('sorting','ORDER BY id DESC');
";

View File

@ -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;

View File

@ -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'])) {