From: Banana Date: Mon, 15 Jan 2024 14:55:09 +0000 (+0100) Subject: Updated upgrade files X-Git-Tag: 1.6~7 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=c0e1f70a492109edf251c1bd82e66895e34333e1;p=bibliotheca-php.git Updated upgrade files --- diff --git a/CHANGELOG b/CHANGELOG index cafe2b3..f543a84 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -14,6 +14,7 @@ * Updated: PHP-IMDB-Grabber to https://github.com/FabianBeiner/PHP-IMDB-Grabber/releases/tag/v6.2.1 with some heavy modifications. * Cleanups + * Cleaned upgrade files 1.5 - Sacred Passage 2023-05-01 * Added google books parser. See upgrade file for more infos. diff --git a/documentation/upgrade.txt b/documentation/upgrade.txt index 37c4877..5270c89 100644 --- a/documentation/upgrade.txt +++ b/documentation/upgrade.txt @@ -1,5 +1,15 @@ Each release has its own file in the upgrade folder. -In this file there are the steps needed to make an upgrade. +Basic flow would be to extract the new release and copy over the following files and directories: +``` +webclient/config/ +webclient/lib/ +webclient/view/ +webclient/.htaccess +webclient/api.php +webclient/index.php +``` + +In those files there are the steps needed to make an upgrade. If you upgrade multiple versions make sure to read all the files in the correct order. diff --git a/upgrade/from-version-1.0.txt b/upgrade/from-version-1.0.txt index 3b0c488..eaedc48 100644 --- a/upgrade/from-version-1.0.txt +++ b/upgrade/from-version-1.0.txt @@ -10,12 +10,15 @@ Copy config/config-imdbweb.php.default to config/config-imdbweb.php See too-imdbweb.txt documentation for more information. #4 following files can be removed +``` view/default/system/pagination.html view/default/system/pagination_after.php view/default/system/pagination_before.php +``` #5 DB changes. Run each line against your bibliotheca DB. -# Replace #REPLACEME# with your table prefix. Default is bib +Replace #REPLACEME# with your table prefix. Default is bib +``` UPDATE `#REPLACEME#_menu` SET `rights` = 'rw-rw----' WHERE `#REPLACEME#_menu`.`id` = 10; UPDATE `#REPLACEME#_menu` SET `group` = '2' WHERE `#REPLACEME#_menu`.`id` = 10; INSERT INTO `#REPLACEME#_menu` (`id`, `text`, `action`, `icon`, `owner`, `group`, `rights`, `position`, `category`) VALUES (NULL, 'Profile', 'profile', 'user', '1', '2', 'rw-rw----', '5', 'manage'); @@ -39,6 +42,7 @@ INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'view', 'View', 'selection', 'entrySingleNum', '`view` varchar(32) NULL DEFAULT NULL', '', 'First person,Third person,Top-down', 'First person,Third person,Top-down', NOW(), '0', '1', '1', 'rw-r--r--') INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'sysReq', 'System Requirements', 'text3', 'entryText', '`sysReq` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`sysReq`)', '', NULL, 'string 255', NOW(), '0', '1', '1', 'rw-r--r--'); INSERT INTO `#REPLACEME#_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES (NULL, 'Game infos', 'Game infos', 'gameinfo', '_self', '1', '1', 'rw-r--r--'); +``` # 6 Update your collection settings. There are new options which should be set. diff --git a/upgrade/from-version-1.1.txt b/upgrade/from-version-1.1.txt index 0869785..e3c4f77 100644 --- a/upgrade/from-version-1.1.txt +++ b/upgrade/from-version-1.1.txt @@ -1,23 +1,29 @@ # Copy the following directories and files to your installation folder, overriding the existing ones: +``` webclient/config/ webclient/lib/ webclient/view/ webclient/.htaccess webclient/api.php webclient/index.php +``` # DB changes. Run each line against your bibliotheca DB. -# Replace #REPLACEME# with your table prefix. Default is bib +Replace #REPLACEME# with your table prefix. Default is bib +``` INSERT INTO `#REPLACEME#_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES (NULL, 'Musicbrainz', 'Album infos', 'musicbrainz', '_self', '1', '1', 'rw-r--r--'); INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'artist', 'Artist', 'text', 'entrySingleText', '`artist` varchar(128) NULL DEFAULT NULL', '', NULL, 'string 128', NOW(), NOW(), NULL, '1', '1', 'rw-r--r--'); UPDATE `#REPLACEME#_sys_fields` SET `type` = 'year' WHERE `identifier` = 'year'; UPDATE `#REPLACEME#_sys_fields` SET `createstring` = '`localizedTitle` varchar(128) NULL DEFAULT NULL, ADD FULLTEXT (`localizedTitle`)' WHERE `identifier` = 'localizedTitle'; UPDATE `#REPLACEME#_sys_fields` SET `value` = 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10', `apiinfo` = 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10' WHERE `identifier` = 'os'; UPDATE `#REPLACEME#_sys_fields` SET `value` = 'Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X', `apiinfo` = 'One of Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X' WHERE `identifier` = 'platform'; +``` # if you have the field "localizedTitle" already in use and get an error about it, run the following statement. -# Replace to match the correct collection +Replace #REPLACEME# with your table prefix. Default is bib +``` ALTER TABLE `#REPLACEME#_collection_entry_1` CHANGE `localizedTitle` `localizedTitle` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL; +``` # New tool for grabbing information from Musicbrainz available To use it, read tool-musicbrainz.txt in the documentation folder. diff --git a/upgrade/from-version-1.2.txt b/upgrade/from-version-1.2.txt index 94b4b7c..a14c45e 100644 --- a/upgrade/from-version-1.2.txt +++ b/upgrade/from-version-1.2.txt @@ -1,17 +1,21 @@ # Copy the following directories and files to your installation folder, overriding the existing ones: +``` webclient/config/ webclient/lib/ webclient/view/ webclient/.htaccess webclient/api.php webclient/index.php +``` # DB changes. Run each line against your bibliotheca DB. -# Replace #REPLACEME# with your table prefix. Default is bib +Replace #REPLACEME# with your table prefix. Default is bib +``` INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'artists', 'Artists', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), NULL, '1', '1', 'rw-r--r--'); INSERT INTO `#REPLACEME#_menu` (`id`, `text`, `action`, `icon`, `owner`, `group`, `rights`, `position`, `category`) VALUES (NULL, 'System Information', 'sysinfo', 'info', '1', '1', 'rw-------', '3', 'show'); UPDATE `#REPLACEME#_sys_fields` SET `value` = 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11', `apiinfo` = 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 7,Windows 8,Windows 10,Windows 11' WHERE `bib_sys_fields`.`id` = 17; INSERT INTO `#REPLACEME#_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES (NULL, 'isbn', 'ISBN', 'number', 'entrySingleNum', '`isbn` int(10) NULL, ADD INDEX (`isbn`)', '', NULL, 'int 10', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, NULL, '1', '1', 'rw-r--r--'); +``` # New syntax in config files "define(.." syntax can be replace with "const" syntax in all the config files. diff --git a/upgrade/from-version-1.3.txt b/upgrade/from-version-1.3.txt index e8521d1..744c1e0 100644 --- a/upgrade/from-version-1.3.txt +++ b/upgrade/from-version-1.3.txt @@ -1,18 +1,22 @@ # Copy the following directories and files to your installation folder, overriding the existing ones: +``` webclient/config/ webclient/lib/ webclient/view/ webclient/.htaccess webclient/api.php webclient/index.php +``` # New syntax in config files "define(.." syntax needs to be replace with "const" syntax in all the config files. See the default ones about the changes. # DB changes. Run each line against your bibliotheca DB. -# Replace #REPLACEME# with your table prefix. Default is bib +Replace #REPLACEME# with your table prefix. Default is bib +``` ALTER TABLE `#REPLACEME#_collection` ADD `defaultSortOrder` VARCHAR(4) NOT NULL AFTER `defaultSortField`; ALTER TABLE `#REPLACEME#_menu` ADD `contextaction` VARCHAR(64) NOT NULL AFTER `action`; UPDATE `#REPLACEME#_menu` SET `contextaction` = 'collection' WHERE `#REPLACEME#_menu`.`id` = 4; UPDATE `#REPLACEME#_menu` SET `contextaction` = 'collection' WHERE `#REPLACEME#_menu`.`id` = 6; +``` diff --git a/upgrade/from-version-1.4.txt b/upgrade/from-version-1.4.txt index fff159a..9a41a99 100644 --- a/upgrade/from-version-1.4.txt +++ b/upgrade/from-version-1.4.txt @@ -1,17 +1,23 @@ # Copy the following directories and files to your installation folder matching the correct path. +``` webclient/view/default/tool/tool-googlebooks.html webclient/view/default/tool/tool-googlebooks.php webclient/lib/googlebookparser.class.php webclient/config/config-googlebooks.php.default -> also copy and rename to config-googlebooks.php +``` # DB changes. Run each line against your bibliotheca DB. -# Replace #REPLACEME# with your table prefix. Default is bib +Replace #REPLACEME# with your table prefix. Default is bib +``` INSERT INTO `#REPLACEME#_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES (NULL, 'Google Books', 'Book infos from Google', 'googlebooks', '_self', '1', '1', 'rw-r--r--'); UPDATE `#REPLACEME#_sys_fields` SET `createstring` = '`isbn` varchar(32) NULL, ADD INDEX (`isbn`)', `apiinfo` = 'varchar 32' WHERE `#REPLACEME#_sys_fields`.`identifier` = 'isbn'; UPDATE `#REPLACEME#_sys_fields` SET `type` = 'text', `searchtype` = 'entrySingleText' WHERE `#REPLACEME#_sys_fields`.`identifier` = 'isbn'; +``` # if you use the field ISBN already run this and change the collection id +``` ALTER TABLE `#REPLACEME#_collection_entry_#CHANGE_ID#` CHANGE `isbn` `isbn` VARCHAR(32) NULL DEFAULT NULL; +``` # New Theme: 98. Theme based on https://jdan.github.io/98.css/