From 1f6d96ea2c551538f15973f25a7bcc154109c9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:37:54 +0100 Subject: [PATCH] 1.7.2 (#38) * 1.7.0 * Auto-update README * Update install * fix * Update install * Update mytinytodo.sql * Fix * Update install * Update restore * Update upgrade * Fix * 1.7.1 * Auto-update README * Fix * Fix * 1.7.2 * Update upgrade * Auto-update README * Update upgrade * Update upgrade Co-authored-by: yunohost-bot --- README.md | 3 +- README_fr.md | 3 +- conf/app.src | 6 +- conf/config.php | 67 ++---- conf/sql/mytinytodo.sql | 214 ++++++++++++++++-- ...ig_panel.toml => config_panel.toml.example | 4 +- manifest.json | 41 +--- scripts/_common.sh | 2 +- scripts/backup | 1 - scripts/install | 21 +- scripts/restore | 4 +- scripts/upgrade | 33 +-- 12 files changed, 223 insertions(+), 176 deletions(-) rename config_panel.toml => config_panel.toml.example (81%) diff --git a/README.md b/README.md index adcca8d..8586f5b 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.6.10~ynh2 - +**Shipped version:** 1.7.2~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 73eb49b..f40f982 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,8 +31,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour - tyle for mobiles devices -**Version incluse :** 1.6.10~ynh2 - +**Version incluse :** 1.7.2~ynh1 **Démo :** https://www.mytinytodo.net/demo/ diff --git a/conf/app.src b/conf/app.src index deb1e2a..3a7844a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.10/mytinytodo-v1.6.10.zip -SOURCE_SUM=70c7c623718b2735f5422379098a3457888b231990a4f447232490021d43a1e4 +SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.2/mytinytodo-v1.7.2.tar.gz +SOURCE_SUM=a48b4aae8e3d6a4ce9f8e81a97068d2b398243d0cccaa6dbc819e66101c25ca6 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip +SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_EXTRACT=true diff --git a/conf/config.php b/conf/config.php index 2edfefa..60ba8c5 100755 --- a/conf/config.php +++ b/conf/config.php @@ -1,63 +1,24 @@ y-m-d (default), 2 => m/d/y, 3 => d.m.y -$config['duedateformat'] = 1; - -# First day of week: 0-Sunday, 1-Monday, 2-Tuesday, .. 6-Saturday -$config['firstdayofweek'] = 1; - -# select session handling mechanism: files or default (php default) -$config['session'] = 'files'; - -# Date/time formats -$config['clock'] = 24; -$config['dateformat'] = 'j M Y'; -$config['dateformatshort'] = 'j M'; - -# Show task date in list -$config['showdate'] = 0; - -# Autodetect mobile devices and switch theme -$config['detectmobile'] = 1; - -?> +define("MTT_SALT", "__SALT__"); diff --git a/conf/sql/mytinytodo.sql b/conf/sql/mytinytodo.sql index a13fc37..c48049d 100644 --- a/conf/sql/mytinytodo.sql +++ b/conf/sql/mytinytodo.sql @@ -1,13 +1,14 @@ -- phpMyAdmin SQL Dump --- version 4.6.6 +-- version 5.1.3 -- https://www.phpmyadmin.net/ -- --- Client : localhost --- Généré le : Mar 21 Mars 2017 à 06:57 --- Version du serveur : 10.0.30-MariaDB-0+deb8u1 --- Version de PHP : 5.6.30-0+deb8u1 +-- Hôte : localhost +-- Généré le : dim. 23 oct. 2022 à 09:54 +-- Version du serveur : 10.5.15-MariaDB-0+deb11u1 +-- Version de PHP : 7.4.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; SET time_zone = "+00:00"; @@ -17,11 +18,37 @@ SET time_zone = "+00:00"; /*!40101 SET NAMES utf8mb4 */; -- --- Base de données : `mytinytodo` +-- Base de données : `mytinytodo` -- -- -------------------------------------------------------- +-- +-- Structure de la table `lists` +-- + +CREATE TABLE `lists` ( + `id` int(10) UNSIGNED NOT NULL, + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `ow` int(11) NOT NULL DEFAULT 0, + `name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `sorting` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `published` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `taskview` int(10) UNSIGNED NOT NULL DEFAULT 0, + `extra` text COLLATE utf8mb4_unicode_ci DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Déchargement des données de la table `lists` +-- + +INSERT INTO `lists` (`id`, `uuid`, `ow`, `name`, `d_created`, `d_edited`, `sorting`, `published`, `taskview`, `extra`) VALUES +(1, 'efb9dc53-2b93-46e7-9b26-bee35291b52e', 0, 'Todo', 1666511484, 0, 0, 0, 1, NULL); + +-- -------------------------------------------------------- + -- -- Structure de la table `mtt_lists` -- @@ -29,17 +56,17 @@ SET time_zone = "+00:00"; CREATE TABLE `mtt_lists` ( `id` int(10) UNSIGNED NOT NULL, `uuid` char(36) NOT NULL DEFAULT '', - `ow` int(11) NOT NULL DEFAULT '0', + `ow` int(11) NOT NULL DEFAULT 0, `name` varchar(50) NOT NULL DEFAULT '', - `d_created` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_edited` int(10) UNSIGNED NOT NULL DEFAULT '0', - `sorting` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', - `published` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', - `taskview` int(10) UNSIGNED NOT NULL DEFAULT '0' + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `sorting` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `published` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `taskview` int(10) UNSIGNED NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --- Contenu de la table `mtt_lists` +-- Déchargement des données de la table `mtt_lists` -- INSERT INTO `mtt_lists` (`id`, `uuid`, `ow`, `name`, `d_created`, `d_edited`, `sorting`, `published`, `taskview`) VALUES @@ -77,24 +104,108 @@ CREATE TABLE `mtt_tags` ( CREATE TABLE `mtt_todolist` ( `id` int(10) UNSIGNED NOT NULL, `uuid` char(36) NOT NULL DEFAULT '', - `list_id` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_created` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_completed` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_edited` int(10) UNSIGNED NOT NULL DEFAULT '0', - `compl` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', + `list_id` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_completed` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `compl` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, `title` varchar(250) NOT NULL, - `note` text, - `prio` tinyint(4) NOT NULL DEFAULT '0', - `ow` int(11) NOT NULL DEFAULT '0', + `note` text DEFAULT NULL, + `prio` tinyint(4) NOT NULL DEFAULT 0, + `ow` int(11) NOT NULL DEFAULT 0, `tags` varchar(600) NOT NULL DEFAULT '', `tags_ids` varchar(250) NOT NULL DEFAULT '', `duedate` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- -------------------------------------------------------- + -- --- Index pour les tables exportées +-- Structure de la table `sessions` -- +CREATE TABLE `sessions` ( + `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `data` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `last_access` int(10) UNSIGNED NOT NULL DEFAULT 0, + `expires` int(10) UNSIGNED NOT NULL DEFAULT 0 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `settings` +-- + +CREATE TABLE `settings` ( + `param_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `param_value` text COLLATE utf8mb4_unicode_ci DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Déchargement des données de la table `settings` +-- + +INSERT INTO `settings` (`param_key`, `param_value`) VALUES +('config.json', '{\n \"url\": \"\",\n \"mtt_url\": \"\",\n \"title\": \"\",\n \"lang\": \"en\",\n \"password\": \"\",\n \"smartsyntax\": 1,\n \"timezone\": \"UTC\",\n \"autotag\": 1,\n \"duedateformat\": 1,\n \"firstdayofweek\": 1,\n \"clock\": 24,\n \"dateformat\": \"j M Y\",\n \"dateformat2\": \"n\\/j\\/y\",\n \"dateformatshort\": \"j M\",\n \"showdate\": 0,\n \"showtime\": 0,\n \"markup\": \"markdown\",\n \"appearance\": \"system\",\n \"extensions\": []\n}'); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `tag2task` +-- + +CREATE TABLE `tag2task` ( + `tag_id` int(10) UNSIGNED NOT NULL, + `task_id` int(10) UNSIGNED NOT NULL, + `list_id` int(10) UNSIGNED NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `tags` +-- + +CREATE TABLE `tags` ( + `id` int(10) UNSIGNED NOT NULL, + `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `todolist` +-- + +CREATE TABLE `todolist` ( + `id` int(10) UNSIGNED NOT NULL, + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `list_id` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_completed` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `compl` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `title` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, + `note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `prio` tinyint(4) NOT NULL DEFAULT 0, + `ow` int(11) NOT NULL DEFAULT 0, + `tags` varchar(600) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `tags_ids` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `duedate` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Index pour les tables déchargées +-- + +-- +-- Index pour la table `lists` +-- +ALTER TABLE `lists` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `uuid` (`uuid`); + -- -- Index pour la table `mtt_lists` -- @@ -126,24 +237,81 @@ ALTER TABLE `mtt_todolist` ADD KEY `list_id` (`list_id`); -- --- AUTO_INCREMENT pour les tables exportées +-- Index pour la table `sessions` -- +ALTER TABLE `sessions` + ADD UNIQUE KEY `id` (`id`); + +-- +-- Index pour la table `settings` +-- +ALTER TABLE `settings` + ADD UNIQUE KEY `param_key` (`param_key`); + +-- +-- Index pour la table `tag2task` +-- +ALTER TABLE `tag2task` + ADD KEY `tag_id` (`tag_id`), + ADD KEY `task_id` (`task_id`), + ADD KEY `list_id` (`list_id`); + +-- +-- Index pour la table `tags` +-- +ALTER TABLE `tags` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `name` (`name`); + +-- +-- Index pour la table `todolist` +-- +ALTER TABLE `todolist` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `uuid` (`uuid`), + ADD KEY `list_id` (`list_id`); + +-- +-- AUTO_INCREMENT pour les tables déchargées +-- + +-- +-- AUTO_INCREMENT pour la table `lists` +-- +ALTER TABLE `lists` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT pour la table `mtt_lists` -- ALTER TABLE `mtt_lists` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + -- -- AUTO_INCREMENT pour la table `mtt_tags` -- ALTER TABLE `mtt_tags` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + -- -- AUTO_INCREMENT pour la table `mtt_todolist` -- ALTER TABLE `mtt_todolist` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT pour la table `tags` +-- +ALTER TABLE `tags` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT pour la table `todolist` +-- +ALTER TABLE `todolist` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; +COMMIT; + /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/config_panel.toml b/config_panel.toml.example similarity index 81% rename from config_panel.toml rename to config_panel.toml.example index 8b968bd..c2c6ecd 100644 --- a/config_panel.toml +++ b/config_panel.toml.example @@ -10,10 +10,10 @@ name = "myTinyTodo configuration" ask = "Set title" type = "string" help = "Specify a title for your todolist." - bind = "title:__FINALPATH__/db/config.php" + bind = "title:__FINALPATH__/config.php" [main.config.set_password] ask = "Set password" type = "password" help = "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist." - bind = "password:__FINALPATH__/db/config.php" + bind = "password:__FINALPATH__/config.php" diff --git a/manifest.json b/manifest.json index d821a54..dee4fc8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.6.10~ynh2", + "version": "1.7.2~ynh1", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", @@ -42,24 +42,6 @@ "example": "/mytinytodo", "default": "/mytinytodo" }, - { - "name": "title", - "type": "string", - "ask": { - "en": "Choose a title for your todo list", - "fr": "Choisissez le titre pour votre liste de tâches" - }, - "default": "myTinyTodo" - }, - { - "name": "set_password", - "type": "password", - "optional": true, - "ask": { - "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist", - "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche." - } - }, { "name": "is_public", "type": "boolean", @@ -68,27 +50,6 @@ "fr": "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true - }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": [ - "ar", - "de", - "en", - "fr", - "it", - "nl", - "pt-pt", - "ru", - "uk", - "zh-cn" - ], - "default": "fr" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index 2271984..cc18e69 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="8.0" -pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" +pkg_dependencies="php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-pdo" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 28f03b5..aa4f7b3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -26,7 +26,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/install b/scripts/install index 7924dda..8015fcf 100644 --- a/scripts/install +++ b/scripts/install @@ -23,15 +23,10 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE -timezone="$(cat /etc/timezone)" -phpversion=$YNH_PHP_VERSION -title=$YNH_APP_ARG_TITLE +salt=$(ynh_string_random --length=16) app=$YNH_APP_INSTANCE_NAME -set_password="$YNH_APP_ARG_SET_PASSWORD" - #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -50,9 +45,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=language --value=$language -ynh_app_setting_set --app=$app --key=set_password --value="$set_password" -ynh_app_setting_set --app=$app --key=title --value=$title #================================================= # INSTALL DEPENDENCIES @@ -71,7 +63,7 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name -# Charge les commandes sql communes à tous les scripts. +# Charge les commandes SQL communes à tous les scripts. ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql #================================================= @@ -102,6 +94,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION @@ -116,18 +109,16 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php" +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" -chmod 600 "$final_path/db/config.php" -chown $app:$app "$final_path/db/config.php" -chmod 775 "$final_path/tmp/sessions" +chmod 640 "$final_path/config.php" +chown $app:$app "$final_path/config.php" #================================================= # REMOVE UNWANTED FILES #================================================= ynh_secure_remove --file="$final_path/setup.php" -ynh_secure_remove --file="$final_path/db/todolist.db" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index a9f38ea..5e77fd1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -58,8 +58,8 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -chmod 775 $final_path/db/config.php -chmod 775 $final_path/tmp/sessions +#chmod 775 $final_path/config.php +#chmod 775 $final_path/tmp/sessions #================================================= # REINSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index edfffff..aef7238 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,16 +18,11 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -language=$(ynh_app_setting_get --app=$app --key=language) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -timezone="$(cat /etc/timezone)" - -set_password=$(ynh_app_setting_get --app=$app --key=set_password) -title=$(ynh_app_setting_get --app=$app --key=title) #================================================= # CHECK VERSION @@ -54,22 +49,6 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -if [ -z "$set_password" ]; then - set_password="" - ynh_app_setting_set --app=$app --key=set_password --value=$set_password -fi - -if [ -z "$title" ]; then - title="MytinyTodo" - ynh_app_setting_set --app=$app --key=title --value=$title -fi - -# If fpm_footprint doesn't exist, create it -if [ -z "$timezone" ]; then - timezone="$(cat /etc/timezone)" - ynh_app_setting_set --app=$app --key=timezone --value=$timezone -fi - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -94,7 +73,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=2 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="db/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="db config.php" fi chmod 750 "$final_path" @@ -124,16 +103,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# RESTORE USER RIGHTS -#================================================= - -ynh_secure_remove --file="$final_path/setup.php" -ynh_secure_remove --file="$final_path/db/todolist.db" - -chmod 600 $final_path/db/config.php -chmod 755 $final_path/tmp/sessions - #================================================= # RELOAD NGINX #=================================================