diff --git a/docs/Settings.md b/docs/Settings.md index 6bcd95f..c762708 100644 --- a/docs/Settings.md +++ b/docs/Settings.md @@ -52,12 +52,6 @@ This key is required to use the Dropbox import feature from your server. Lychee If `1`, Lychee will use Imagick when available. Disable [Imagick](http://www.imagemagick.org) if you have problems or if you are using an outdated version. Lychee will use [GD](http://php.net/manual/en/book.image.php) when Imagick is disabled or not available. -#### Medium - - medium = [0|1] - -If `1`, Lychee will create a second, smaller version of your photo. This feature requires [Imagick](http://www.imagemagick.org) on your server and an activated `imagick` option the the settings table. - #### Skip Duplicates on Upload skipDuplicates = [0|1] diff --git a/php/Modules/Photo.php b/php/Modules/Photo.php index 5ecf2b3..a39202c 100755 --- a/php/Modules/Photo.php +++ b/php/Modules/Photo.php @@ -380,7 +380,7 @@ final class Photo { /** * Creates a smaller version of a photo when its size is bigger than a preset size. - * Photo must be big enough, medium must be activated and Imagick must be installed and activated. + * Photo must be big enough and Imagick must be installed and activated. * @return boolean Returns true when successful. */ private function createMedium($url, $filename, $width, $height) { @@ -413,11 +413,9 @@ final class Photo { } // Is photo big enough? - // Is medium activated? // Is Imagick installed and activated? if (($error===false)&& ($width>$newWidth||$height>$newHeight)&& - (Settings::get()['medium']==='1')&& (extension_loaded('imagick')&&Settings::get()['imagick']==='1')) { $newUrl = LYCHEE_UPLOADS_MEDIUM . $filename; diff --git a/php/Modules/Session.php b/php/Modules/Session.php index 7b6d105..0b846ad 100755 --- a/php/Modules/Session.php +++ b/php/Modules/Session.php @@ -50,7 +50,6 @@ final class Session { unset($return['config']['login']); unset($return['config']['location']); unset($return['config']['imagick']); - unset($return['config']['medium']); unset($return['config']['plugins']); } diff --git a/php/database/settings_content.sql b/php/database/settings_content.sql index 4074590..18067ff 100644 --- a/php/database/settings_content.sql +++ b/php/database/settings_content.sql @@ -9,7 +9,6 @@ VALUES ('checkForUpdates','1'), ('sortingPhotos','ORDER BY id DESC'), ('sortingAlbums','ORDER BY id DESC'), - ('medium','1'), ('imagick','1'), ('dropboxKey',''), ('identifier',''), diff --git a/php/database/update_020700.php b/php/database/update_020700.php index d59ea7f..eed5fd7 100644 --- a/php/database/update_020700.php +++ b/php/database/update_020700.php @@ -31,19 +31,6 @@ if (is_dir(LYCHEE_UPLOADS_MEDIUM)===false) { } -// Add medium to settings -$query = Database::prepare($connection, "SELECT `key` FROM `?` WHERE `key` = 'medium' LIMIT 1", array(LYCHEE_TABLE_SETTINGS)); -$result = Database::execute($connection, $query, 'update_020700', __LINE__); - -if ($result->num_rows===0) { - - $query = Database::prepare($connection, "INSERT INTO `?` (`key`, `value`) VALUES ('medium', '1')", array(LYCHEE_TABLE_SETTINGS)); - $result = Database::execute($connection, $query, 'update_020700', __LINE__); - - if ($result===false) return false; - -} - // Set version if (Database::setVersion($connection, '020700')===false) return false;