mirror of
https://github.com/YunoHost-Apps/mytinytodo_ynh.git
synced 2024-09-03 19:46:01 +02:00
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 <yunohost@yunohost.org>
This commit is contained in:
parent
49339f8dee
commit
1f6d96ea2c
12 changed files with 223 additions and 176 deletions
|
@ -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/
|
||||
|
||||
|
|
|
@ -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/
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,63 +1,24 @@
|
|||
<?php
|
||||
|
||||
# Configuration goes here
|
||||
$config = array();
|
||||
/*
|
||||
Uncomment the line with MTT_DB_TYPE if you make clean install only.
|
||||
Leave it commented (with # at start) if you are upgrading from version before 1.7.
|
||||
Select the database type: sqlite or mysql.
|
||||
*/
|
||||
|
||||
# Set a title for MyTinyTodo
|
||||
$config['title'] = '__TITLE__';
|
||||
define("MTT_DB_TYPE", "mysql");
|
||||
|
||||
# Database type: sqlite or mysql
|
||||
$config['db'] = 'mysql';
|
||||
define("MTT_DB_HOST", "localhost");
|
||||
|
||||
# Specify these settings if you selected above to use Mysql
|
||||
$config['mysql.host'] = "localhost";
|
||||
$config['mysql.db'] = "__DB_NAME__";
|
||||
$config['mysql.user'] = "__DB_USER__";
|
||||
$config['mysql.password'] = "__DB_PWD__";
|
||||
define("MTT_DB_NAME", "__DB_NAME__");
|
||||
|
||||
# Tables prefix
|
||||
$config['prefix'] = "mtt_";
|
||||
define("MTT_DB_USER", "__DB_USER__");
|
||||
|
||||
# These two parameters are used when mytinytodo index.php called not from installation directory
|
||||
# 'url' - URL where index.php is called from (ex.: http://site.com/todo.php)
|
||||
# 'mtt_url' - directory URL where mytinytodo is installed (with trailing slash) (ex.: http://site.com/lib/mytinytodo/)
|
||||
$config['url'] = '';
|
||||
$config['mtt_url'] = '';
|
||||
define("MTT_DB_PASSWORD", "__DB_PWD__");
|
||||
|
||||
# Language pack
|
||||
$config['lang'] = "__LANGUAGE__";
|
||||
define("MTT_DB_PREFIX", "");
|
||||
|
||||
# Specify password here to protect your tasks from modification,
|
||||
# or leave empty that everyone could read/write todolist
|
||||
$config['password'] = "__SET_PASSWORD__";
|
||||
// set mysqli if needed
|
||||
define("MTT_DB_DRIVER", "mysqli");
|
||||
|
||||
# To disable smart syntax uncomment the line below
|
||||
#$config['smartsyntax'] = 0;
|
||||
|
||||
# Default Time zone
|
||||
$config['timezone'] = '__TIMEZONE__';
|
||||
|
||||
# To disable auto adding selected tag comment out the line below or set value to 0
|
||||
$config['autotag'] = 1;
|
||||
|
||||
# duedate calendar format: 1 => 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__");
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
||||
|
@ -22,6 +23,32 @@ SET time_zone = "+00:00";
|
|||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- 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 */;
|
||||
|
|
|
@ -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"
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue