diff --git a/ALL_README.md b/ALL_README.md
index 4ed64dd..e3c80d2 100644
--- a/ALL_README.md
+++ b/ALL_README.md
@@ -6,4 +6,5 @@
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
+- [Прочитать README на русский](README_ru.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)
diff --git a/README.md b/README.md
index 06b28d9..92c2163 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ It shall NOT be edited by hand.
Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
-**Shipped version:** 1.3.11~ynh1
+**Shipped version:** 1.3.11~ynh3
**Demo:**
diff --git a/README_es.md b/README_es.md
index 2435c80..ba60e61 100644
--- a/README_es.md
+++ b/README_es.md
@@ -19,7 +19,7 @@ No se debe editar a mano.
Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
-**Versión actual:** 1.3.11~ynh1
+**Versión actual:** 1.3.11~ynh3
**Demo:**
diff --git a/README_eu.md b/README_eu.md
index a5dcdf4..ed328f2 100644
--- a/README_eu.md
+++ b/README_eu.md
@@ -19,7 +19,7 @@ EZ editatu eskuz.
Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
-**Paketatutako bertsioa:** 1.3.11~ynh1
+**Paketatutako bertsioa:** 1.3.11~ynh3
**Demoa:**
diff --git a/README_fr.md b/README_fr.md
index 8206a58..7e997d9 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
Paheko (mot de la langue Māori qui signifie « coopérer », illustrant le but du logiciel : améliorer ensemble le quotidien de la gestion d'une association) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents.
-**Version incluse :** 1.3.11~ynh1
+**Version incluse :** 1.3.11~ynh3
**Démo :**
diff --git a/README_gl.md b/README_gl.md
index d250ac7..db71438 100644
--- a/README_gl.md
+++ b/README_gl.md
@@ -19,7 +19,7 @@ NON debe editarse manualmente.
Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
-**Versión proporcionada:** 1.3.11~ynh1
+**Versión proporcionada:** 1.3.11~ynh3
**Demo:**
diff --git a/README_id.md b/README_id.md
index 0230bb3..a179dee 100644
--- a/README_id.md
+++ b/README_id.md
@@ -19,7 +19,7 @@ Ini TIDAK boleh diedit dengan tangan.
Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
-**Versi terkirim:** 1.3.11~ynh1
+**Versi terkirim:** 1.3.11~ynh3
**Demo:**
diff --git a/README_ru.md b/README_ru.md
new file mode 100644
index 0000000..fb0f713
--- /dev/null
+++ b/README_ru.md
@@ -0,0 +1,50 @@
+
+
+# Paheko для YunoHost
+
+[](https://ci-apps.yunohost.org/ci/apps/paheko/)  
+
+[](https://install-app.yunohost.org/?app=paheko)
+
+*[Прочтите этот README на других языках.](./ALL_README.md)*
+
+> *Этот пакет позволяет Вам установить Paheko быстро и просто на YunoHost-сервер.*
+> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
+
+## Обзор
+
+Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
+
+
+**Поставляемая версия:** 1.3.11~ynh3
+
+**Демо-версия:**
+
+## Снимки экрана
+
+
+
+## Документация и ресурсы
+
+- Официальный веб-сайт приложения:
+- Официальная документация администратора:
+- Репозиторий кода главной ветки приложения:
+- Магазин YunoHost:
+- Сообщите об ошибке:
+
+## Информация для разработчиков
+
+Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/paheko_ynh/tree/testing).
+
+Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug
+или
+sudo yunohost app upgrade paheko -u https://github.com/YunoHost-Apps/paheko_ynh/tree/testing --debug
+```
+
+**Больше информации о пакетировании приложений:**
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
index b9f8caa..522e8b1 100644
--- a/README_zh_Hans.md
+++ b/README_zh_Hans.md
@@ -19,7 +19,7 @@
Paheko (a word from the Māori language meaning "to cooperate", illustrating the purpose of the software: to improve together the daily management of an association) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members.
-**分发版本:** 1.3.11~ynh1
+**分发版本:** 1.3.11~ynh3
**演示:**
diff --git a/conf/config.local.php b/conf/config.local.php
index 44f9db0..fb91b3c 100644
--- a/conf/config.local.php
+++ b/conf/config.local.php
@@ -500,7 +500,6 @@ const USE_CRON = true;
//const DISABLE_EMAIL = false;
-
/**
* Hôte du serveur SMTP, mettre à null (défaut) pour utiliser la fonction
* mail() de PHP
@@ -508,7 +507,7 @@ const USE_CRON = true;
* Défaut : null
*/
-//const SMTP_HOST = '__DOMAIN__';
+const SMTP_HOST = '__SMTP_HOST__';
/**
* Port du serveur SMTP
@@ -519,7 +518,7 @@ const USE_CRON = true;
* Défaut : 587
*/
-//const SMTP_PORT = 25;
+const SMTP_PORT = __SMTP_PORT__;
/**
* Login utilisateur pour le server SMTP
@@ -529,7 +528,7 @@ const USE_CRON = true;
* Défaut : null
*/
-//const SMTP_USER = '__APP__';
+const SMTP_USER = '__SMTP_USER__';
/**
* Mot de passe pour le serveur SMTP
@@ -539,7 +538,7 @@ const USE_CRON = true;
* Défaut : null
*/
-//const SMTP_PASSWORD = '__MAIL_PWD__';
+const SMTP_PASSWORD = '__SMTP_PASSWORD__';
/**
* Sécurité du serveur SMTP
@@ -552,7 +551,7 @@ const USE_CRON = true;
* Défaut : STARTTLS
*/
-//const SMTP_SECURITY = 'STARTTLS';
+const SMTP_SECURITY = '__SMTP_SECURITY__';
/**
* Nom du serveur utilisé dans le HELO SMTP
@@ -584,8 +583,7 @@ const USE_CRON = true;
* Défaut : null
*/
-//const MAIL_RETURN_PATH = '__APP__@__DOMAIN__';
-
+const MAIL_RETURN_PATH = '__MAIL_RETURN_PATH__';
/**
* Adresse e-mail expéditrice des messages (Sender)
@@ -602,7 +600,7 @@ const USE_CRON = true;
* Défaut : null
*/
-//const MAIL_SENDER = '__APP__@__DOMAIN__';
+const MAIL_SENDER = '__MAIL_SENDER__';
/**
* Mot de passe pour l'accès à l'API permettant de gérer les mails d'erreur
diff --git a/conf/config.local.user.php b/conf/config.local.user.php
index 890c7aa..877d546 100644
--- a/conf/config.local.user.php
+++ b/conf/config.local.user.php
@@ -11,106 +11,4 @@
// Nécessaire pour situer les constantes dans le bon namespace
namespace Paheko;
-/**
- * Hôte du serveur SMTP, mettre à false (défaut) pour utiliser la fonction
- * mail() de PHP
- *
- * Défaut : null
- */
-
-const SMTP_HOST = '__DOMAIN__';
-
-/**
- * Port du serveur SMTP
- *
- * 25 = port standard pour connexion non chiffrée (465 pour Gmail)
- * 587 = port standard pour connexion SSL
- *
- * Défaut : 587
- */
-
-const SMTP_PORT = 25;
-
-/**
- * Login utilisateur pour le server SMTP
- *
- * mettre à null pour utiliser un serveur local ou anonyme
- *
- * Défaut : null
- */
-
-const SMTP_USER = '__APP__';
-
-/**
- * Mot de passe pour le serveur SMTP
- *
- * mettre à null pour utiliser un serveur local ou anonyme
- *
- * Défaut : null
- */
-
-const SMTP_PASSWORD = '__MAIL_PWD__';
-
-/**
- * Sécurité du serveur SMTP
- *
- * NONE = pas de chiffrement
- * SSL = connexion SSL native
- * TLS = connexion TLS native (le plus sécurisé)
- * STARTTLS = utilisation de STARTTLS (moyennement sécurisé)
- *
- * Défaut : STARTTLS
- */
-
-const SMTP_SECURITY = 'STARTTLS';
-
-/**
- * Nom du serveur utilisé dans le HELO SMTP
- *
- * Si NULL, alors le nom renseigné comme SERVER_NAME (premier nom du virtual host Apache)
- * sera utilisé.
- *
- * Defaut : NULL
- *
- * @var null|string
- */
-
-const SMTP_HELO_HOSTNAME = '__DOMAIN__';
-
-/**
- * Adresse e-mail destinée à recevoir les erreurs de mail
- * (adresses invalides etc.) — Return-Path / MAIL FROM
- *
- * Si laissé NULL, alors l'adresse e-mail de l'association sera utilisée.
- * En cas d'hébergement de plusieurs associations, il est conseillé
- * d'utiliser une adresse par association.
- *
- * Voir la documentation de configuration sur des exemples de scripts
- * permettant de traiter les mails reçus à cette adresse.
- *
- * Si renseigné, cette adresse sera utilisée également comme "MAIL FROM"
- * lors de la session avec le serveur SMTP.
- *
- * Défaut : null
- */
-
-const MAIL_RETURN_PATH = '__APP__@__DOMAIN__';
-
-
-/**
- * Adresse e-mail expéditrice des messages (Sender)
- *
- * Si vous envoyez des mails pour plusieurs associations, il est souhaitable
- * de forcer l'adresse d'expéditeur des messages pour passer les règles SPF et DKIM.
- *
- * Dans ce cas l'adresse de l'association sera indiquée en "Reply-To", et
- * l'adresse contenue dans MAIL_SENDER sera dans le From.
- *
- * Si laissé NULL, c'est l'adresse de l'association indiquée dans la configuration
- * qui sera utilisée.
- *
- * Défaut : null
- */
-
-const MAIL_SENDER = '__APP__@__DOMAIN__';
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 67152b6..a122466 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -19,7 +19,6 @@ location __PATH__/ {
fastcgi_index index.php;
include fastcgi_params;
- fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
diff --git a/config_panel.toml b/config_panel.toml
new file mode 100644
index 0000000..eb31a08
--- /dev/null
+++ b/config_panel.toml
@@ -0,0 +1,62 @@
+version = "1.0"
+
+################################################################################
+#### ABOUT PANELS
+################################################################################
+
+[main]
+
+name.fr = "Configuration SMTP"
+
+ ############################################################################
+ #### ABOUT SECTIONS
+ ############################################################################
+
+ [main.smtp]
+
+ name = ""
+
+ ## (optional) This help properties is a short help displayed on the same line
+
+ optional = false
+
+ [main.smtp.smtp_host]
+ ask.fr = "Serveur SMTP"
+ type = "string"
+ bind = "SMTP_HOST:__INSTALL_DIR__/config.local.php"
+
+ [main.smtp.smtp_port]
+ ask.fr = "Port"
+ min = 25
+ type = "number"
+ bind = "SMTP_PORT:__INSTALL_DIR__/config.local.php"
+
+ [main.smtp.smtp_user]
+ ask.fr = "Nom d'utilisateur"
+ type = "string"
+ bind = "SMTP_USER:__INSTALL_DIR__/config.local.php"
+
+ [main.smtp.smtp_password]
+ ask.fr = "Mot de passe"
+ type = "password"
+ bind = "SMTP_PASSWORD:__INSTALL_DIR__/config.local.php"
+
+ [main.smtp.smtp_security]
+ ask.fr = "Sécurité de la connexion"
+ type = "select"
+ choices.NONE = "NONE, pas de chiffrement"
+ choices.SSL = "SSL, connexion SSL native"
+ choices.TLS = "TLS, connexion TLS native (le plus sécurisé)"
+ choices.STARTTLS = "STARTTLS, utilisation de STARTTLS (moyennement sécurisé)"
+ bind = "SMTP_SECURITY:__INSTALL_DIR__/config.local.php"
+
+ [main.smtp.mail_sender]
+ ask.fr = "Adresse e-mail expéditrice des messages"
+ type = "string"
+ bind = "MAIL_SENDER:__INSTALL_DIR__/config.local.php"
+
+ [main.smtp.mail_return_path]
+ ask.fr = "Adresse e-mail expéditrice des messages"
+ type = "string"
+ bind = "MAIL_RETURN_PATH:__INSTALL_DIR__/config.local.php"
+
diff --git a/doc/ynh_local_curl-install-paheko b/doc/ynh_local_curl-install-paheko
new file mode 100644
index 0000000..b6b70e2
--- /dev/null
+++ b/doc/ynh_local_curl-install-paheko
@@ -0,0 +1 @@
+ynh_local_curl https://paheko.rodinux.fr/admin/install.php --args="country=FR&name=toto&user_name=bob&user_email=bob@example.org&password=bopbidibopbopbop&password_confirmed=bopbidibopbopbop"
\ No newline at end of file
diff --git a/manifest.toml b/manifest.toml
index 109c668..73ed574 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Paheko"
description.en = "Association management software"
description.fr = "Logiciel de gestion d'association"
-version = "1.3.11~ynh1"
+version = "1.3.11~ynh3"
maintainers = ["rodinux"]
@@ -35,10 +35,9 @@ ram.runtime = "50M"
default = "visitors"
[resources]
- [resources.sources.main]
- url = "https://fossil.kd2.org/paheko/uv/paheko-1.3.11.tar.gz"
- sha256 = "88624f5efdc7dc7ce779c29827d25e8a9a8ffa21793c1a8320c3705d5ac1fc31"
-
+ [resources.sources.main]
+ url = "https://fossil.kd2.org/paheko/uv/paheko-1.3.11.tar.gz"
+ sha256 = "88624f5efdc7dc7ce779c29827d25e8a9a8ffa21793c1a8320c3705d5ac1fc31"
[resources.system_user]
allow_email = true
@@ -54,6 +53,11 @@ ram.runtime = "50M"
api.show_tile = false
api.protected = true
api.auth_header = true
+ webdav.url = "/dav/documents/*"
+ webdav.allowed = ["visitors", "all_users"]
+ webdav.show_tile = false
+ webdav.protected = true
+ webdav.auth_header = false
[resources.apt]
packages = "sqlite3, php8.2-sqlite3, php8.2-gd, php8.2-intl, php8.2-cli, php8.2-gnupg, php8.2-mbstring, php8.2-zip"
diff --git a/scripts/install b/scripts/install
index 6820f82..a2d42f6 100644
--- a/scripts/install
+++ b/scripts/install
@@ -12,6 +12,21 @@ source /usr/share/yunohost/helpers
secret_key=$(ynh_string_random --length=50)
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
+smtp_host=$domain
+smtp_port=25
+smtp_user=$app
+smtp_password=$mail_pwd
+smtp_security=STARTTLS
+mail_return_path=$app@$domain
+mail_sender=$app@$domain
+ynh_app_setting_set --app=$app --key=smtp_host --value=$smtp_host
+ynh_app_setting_set --app=$app --key=smtp_port --value=$smtp_port
+ynh_app_setting_set --app=$app --key=smtp_user --value=$smtp_user
+ynh_app_setting_set --app=$app --key=smtp_password --value=$smtp_password
+ynh_app_setting_set --app=$app --key=smtp_security --value=$smtp_security
+ynh_app_setting_set --app=$app --key=mail_return_path --value=$mail_return_path
+ynh_app_setting_set --app=$app --key=mail_sender --value=$mail_sender
+
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@@ -51,6 +66,24 @@ ynh_add_config --template="config.local.php" --destination="$install_dir/config.
chmod 440 "$install_dir/config.local.php"
chown $app:$app "$install_dir/config.local.php"
+#=================================================
+# SETUP APPLICATION
+#=================================================
+
+### Waiting for new script which will be integrated in version 1.3.12 see https://fossil.kd2.org/paheko/wiki?name=Ligne+de+commande
+
+# Post-Installation
+# ynh_script_progression --message="Finalizing installation..." --weight=1
+
+# country=$country
+# name_association=$name_association
+# user_name=$user_name
+# user_email=$user_email
+# password=$password
+# password_confirmed=$password_confirmed
+
+# ynh_exec_as $app paheko init --country $country --orgname $name_association --name=${user_name} --email=${$user_email} --password ${password}
+
#=================================================
# END OF SCRIPT
#=================================================
diff --git a/scripts/restore b/scripts/restore
index c778d29..0dbf15d 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -27,6 +27,9 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
+#chmod -R o-rwx "$data_dir"
+chown -R $app:www-data "$data_dir"
+
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
diff --git a/scripts/upgrade b/scripts/upgrade
index 7535325..c40a6c3 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -29,6 +29,36 @@ if [ -z "${secret_key:-}" ]; then
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
fi
+if [ -z "${smtp_host:-}" ]; then
+ user_conf="$data_dir/data/config.local.user.php"
+ if [ -f $user_conf ]; then
+ smtp_host=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_HOST)
+ smtp_port=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_PORT)
+ smtp_user=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_USER)
+ smtp_password=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_PASSWORD)
+ smtp_security=$(ynh_read_var_in_file --file=$user_conf --key=SMTP_SECURITY)
+ mail_return_path=$(ynh_read_var_in_file --file=$user_conf --key=MAIL_RETURN_PATH)
+ mail_sender=$(ynh_read_var_in_file --file=$user_conf --key=MAIL_SENDER)
+ ynh_replace_string --match_string="const SMTP_" --replace_string="//const SMTP_" --target_file=$user_conf
+ ynh_replace_string --match_string="const MAIL_" --replace_string="//const MAIL_" --target_file=$user_conf
+ else
+ smtp_host=$domain
+ smtp_port=25
+ smtp_user=$app
+ smtp_password=$mail_pwd
+ smtp_security=STARTTLS
+ mail_return_path=$app@$domain
+ mail_sender=$app@$domain
+ fi
+ ynh_app_setting_set --app=$app --key=smtp_host --value=$smtp_host
+ ynh_app_setting_set --app=$app --key=smtp_port --value=$smtp_port
+ ynh_app_setting_set --app=$app --key=smtp_user --value=$smtp_user
+ ynh_app_setting_set --app=$app --key=smtp_password --value=$smtp_password
+ ynh_app_setting_set --app=$app --key=smtp_security --value=$smtp_security
+ ynh_app_setting_set --app=$app --key=mail_return_path --value=$mail_return_path
+ ynh_app_setting_set --app=$app --key=mail_sender --value=$mail_sender
+fi
+
#=================================================
# KEEP CONFIGS IF NEEDED
#=================================================
@@ -143,7 +173,6 @@ else
chown $app:www-data "$data_dir/data/local_addresses"
fi
-
if [ -f "$install_dir/data/association.sqlite" ]; then
ynh_script_progression --message="Moving db files..." --weight=5
mv $install_dir/data/association.* $data_dir/data/