<?php
$db_update['data'][4]['library_labels'] = "UPDATE `library_labels` SET `text` = 'Neuer Ordner' WHERE `language` = 'de' AND `label` = 'LABEL_NEW_FOLDER';";

$db_update['indizies'][5]['files_levels'] = "ALTER TABLE `files_levels` ADD UNIQUE(`language`, `url`);";
$db_update['indizies'][5]['images_levels'] = "ALTER TABLE `images_levels` ADD UNIQUE(`language`, `url`);";



$db_update['data'][11]['backend_modules'] = "UPDATE `backend_modules` SET `id` = '91', `sortorder` = '91' WHERE `title` = 'library' ";


$db_update['data'][12]['images'] = "
ALTER TABLE `images` ADD `title` VARCHAR(255) NULL DEFAULT NULL AFTER `filesize`, ADD `alt` VARCHAR(255) NULL DEFAULT NULL AFTER `title`, 
ADD `photographer` VARCHAR(255) NULL DEFAULT NULL AFTER `alt`;";

$db_update['data'][13]['library_labels'] = "
INSERT IGNORE INTO `library_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_ALT', 'Alt'),
('1', 'de', 'LABEL_PHOTOGRAPHER', 'Fotograf');";

$db_update['data'][14]['library_options'] = "UPDATE `library_options` SET `value` = '1' WHERE `title` = 'c_modules';";

$db_update['data'][15]['library_options'] = "ALTER TABLE `library_options` ADD UNIQUE(`title`);";

$db_update['data'][16]['images'] = "
ALTER TABLE `images` ADD `c_lightbox_watermark` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `datetime`, 
ADD `c_thumbnails_watermark` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `c_lightbox_watermark`;";


$db_update['data'][18]['library_options'] = "INSERT IGNORE INTO `library_options` (`c_public`, `title`, `value`) VALUES ('1', 'c_webp', '1');";

$db_update['data'][18]['library_labels'] = "
INSERT IGNORE INTO `library_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_OPTIONS_C_WEBP', 'WebP (Beta)');";


$db_update['data']['0.1.27']['library_options'] = "
INSERT IGNORE INTO`library_options` (`c_public`, `title`, `value`) VALUES
('1', 'c_period_images', '0'),
('1', 'c_period_files', '0');";

$db_update['data']['0.1.27']['library_labels'] = "
INSERT IGNORE INTO `library_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_OPTIONS_C_PERIOD_IMAGES', 'Zeitraumfilter Bilder'), 
('1', 'de', 'LABEL_OPTIONS_C_PERIOD_FILES', 'Zeitraumfilter Dateien');";


$db_update['data']['0.1.28']['images'] = "
ALTER TABLE `images` ADD `link` VARCHAR(255) NULL DEFAULT NULL AFTER `copyright`, ADD `linktext` TEXT NULL DEFAULT NULL AFTER `link`;";

$db_update['data']['0.1.37']['files_levels'] = "ALTER TABLE `files_levels` DROP `sortorder`;";
$db_update['data']['0.1.37']['images_levels'] = "ALTER TABLE `images_levels` DROP `sortorder`;";


$db_update['data']['0.1.40']['library_labels'] = "
INSERT IGNORE INTO `library_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_ROOT', 'Hauptverzeichnis');";

$db_update['data']['0.1.42']['files_levels'] = "ALTER TABLE `files_levels` ADD `c_delete_folder_content` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `c_thumbnails`;";
$db_update['data']['0.1.42']['images_levels'] = "ALTER TABLE `images_levels` ADD `c_delete_folder_content` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `c_thumbnails`;";

$db_update['data']['0.1.42']['library_options'] = "
INSERT IGNORE INTO `library_options` (`c_public`, `title`, `value`) VALUES
('1', 'c_delete_folder_content', '0');";

$db_update['data']['0.1.42']['library_labels'] = "
INSERT IGNORE INTO `library_labels` (`c_active`, `language`, `label`, `text`) VALUES 
('1', 'de', 'LABEL_OPTIONS_C_DELETE_FOLDER_CONTENT', 'Ordnerinhalt löschen'),
('1', 'de', 'LABEL_DELETE_FOLDER_CONTENT', 'Ordnerinhalt löschen');";

