Browse Source

Removed importFilename setting

Tobias Reich 10 years ago
parent
commit
49fd3967b6
4 changed files with 4 additions and 15 deletions
  1. 1 7
      docs/md/Settings.md
  2. 1 2
      php/modules/db.php
  3. 0 3
      php/modules/misc.php
  4. 2 3
      php/modules/upload.php

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

+ 1 - 2
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');
 
 		";
 

+ 0 - 3
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;
 

+ 2 - 3
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'])) {