mirror of
https://github.com/YunoHost-Apps/moncycle_ynh.git
synced 2024-09-03 19:46:16 +02:00
commit
44286c9acc
10 changed files with 55 additions and 34 deletions
|
@ -35,7 +35,7 @@ Make it easy to monitor menstrual cycles and apply natural methods. Billings. Sy
|
|||
- automatic sending of cycles by email
|
||||
- no data sales/no advertising
|
||||
|
||||
**Shipped version:** 7.0~ynh6
|
||||
**Shipped version:** 9.0~ynh2
|
||||
|
||||
**Demo:** https://tableau.moncycle.app/connexion.php?email1=demo@moncycle.app&mdp=demo
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Rendre facile le suivi des cycles menstruels et l’application des méthodes na
|
|||
- pas de vente de données/pas de publicité
|
||||
|
||||
|
||||
**Version incluse :** 7.0~ynh6
|
||||
**Version incluse :** 9.0~ynh2
|
||||
|
||||
**Démo :** https://tableau.moncycle.app/connexion.php?email1=demo@moncycle.app&mdp=demo
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
** https://github.com/jean-io/moncycle.app
|
||||
*/
|
||||
|
||||
define("APP_URL", "__DOMAIN__/__PATH__");
|
||||
define("APP_URL", "__DOMAIN____PATH__");
|
||||
|
||||
define("DB_HOST", "localhost");
|
||||
define("DB_ID", "__DB_USER__");
|
||||
|
|
15
conf/migrate_7.0.6.sql
Normal file
15
conf/migrate_7.0.6.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
ALTER TABLE `compte`
|
||||
ADD `totp_etat` smallint(5) unsigned DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `compte`
|
||||
ADD `totp_secret` varchar(255) DEFAULT NULL;
|
||||
|
||||
CREATE TABLE `cle_valeur` (
|
||||
`cle` varchar(255) NOT NULL,
|
||||
`valeur` bigint(20) unsigned DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
||||
|
||||
INSERT INTO `cle_valeur` (`cle`, `valeur`) VALUES
|
||||
('pub_visite_mensuel', 0),
|
||||
('pub_visite_hebdo', 0),
|
||||
('pub_visite_jour', 0);
|
|
@ -26,12 +26,10 @@ location __PATH__/ {
|
|||
}
|
||||
|
||||
# Default indexes and catch-all
|
||||
rewrite ^/(export|inscription|compte)$ /$1.php;
|
||||
rewrite ^/(connexion)$ /$1.html;
|
||||
rewrite ^/api/(deconnexion)$ /api/$1.php;
|
||||
rewrite ^/img/(captcha)$ /img/$1.php;
|
||||
index index.html index.php;
|
||||
try_files $uri $uri.php $uri/index.php $uri/ $1?$args $1.php?$args;
|
||||
rewrite ^/(connexion|compte)$ /$1.html;
|
||||
rewrite ^/api/([a-zA-Z0-9_]+)(\?.*)?$ /api/$1.php$2;
|
||||
index index.php index.html;
|
||||
try_files $uri $uri/ $uri.php?$args;
|
||||
|
||||
# Execute and serve PHP files
|
||||
location ~ [^/]\.php(/|$) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
* After installing, you can create your own user using the form
|
||||
* Once done, you can (if you want) set the account creation to false in `__INSTALL_DIR__/config.php`
|
||||
* If you want to use the app in PWA mode, be sure to be connected to your account first
|
||||
* After upgrading from 7.0 to 9.0, you may experience issues if you don't clean your browser cache
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "Moncycle"
|
|||
description.en = "Menstrual cycle follow-up for natural family planning"
|
||||
description.fr = "Suivi de cycle pour les méthodes naturelles de régulation de naissance"
|
||||
|
||||
version = "7.0~ynh6"
|
||||
version = "9.0~ynh2"
|
||||
|
||||
maintainers = ["Raoul de Limezy"]
|
||||
|
||||
|
@ -29,17 +29,13 @@ ram.runtime = "50M"
|
|||
[install.domain]
|
||||
type = "domain"
|
||||
|
||||
[install.path]
|
||||
type = "path"
|
||||
default = "/moncycle"
|
||||
|
||||
[install.init_main_permission]
|
||||
type = "group"
|
||||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://github.com/jean-io/moncycle.app/archive/4ee55999138825fd2f309fa27a69bafe6f5a0c36.zip"
|
||||
sha256 = "94c3010d12f9650ea87aecde046ef0ba4102308b566de94868adc76c69c22ccf"
|
||||
url = "https://github.com/jean-io/moncycle.app/archive/cda74b19c2b392886aed48f0ae3a6c6d9b2869a3.zip"
|
||||
sha256 = "e7b4a6b3350d80106245cd27a529e53ed477764ee59686d8a6f599faec9997e6"
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
|
@ -49,7 +45,7 @@ ram.runtime = "50M"
|
|||
main.url = "/"
|
||||
|
||||
[resources.apt]
|
||||
packages = "mariadb-server, php8.2-gd, php8.2-mysql, php8.2-mbstring"
|
||||
packages = "mariadb-server, php8.2-gd, php8.2-mysql, php8.2-xml, php8.2-mbstring"
|
||||
|
||||
[resources.database]
|
||||
type = "mysql"
|
||||
|
|
|
@ -43,6 +43,7 @@ popd
|
|||
# worckaround while https://github.com/chartjs/Chart.js/issues/11478 is not fixed
|
||||
ynh_exec_warn_less mkdir "$install_dir/vendor/chartjs"
|
||||
ynh_exec_warn_less curl -o "$install_dir/vendor/chartjs"/chart.js https://cdn.jsdelivr.net/npm/chart.js
|
||||
ynh_exec_warn_less curl -o "$install_dir/vendor/chartjs"/chart.umd.js.map https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.js.map
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -44,12 +44,22 @@ pushd "$install_dir"
|
|||
ynh_script_progression --message="Checking if a database migration is needed"
|
||||
if ynh_compare_current_package_version --comparison le --version 7.0~ynh5
|
||||
then
|
||||
ynh_script_progression --message="Database migration required, migrating"
|
||||
ynh_add_config --template="../conf/migrate_7.0.5.sql" --destination="$install_dir/migrate.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate.sql
|
||||
ynh_script_progression --message="7.0.5 to 8.0 database migration required, migrating"
|
||||
ynh_add_config --template="../conf/migrate_7.0.5.sql" --destination="$install_dir/migrate_7.0.5.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_7.0.5.sql
|
||||
ynh_add_config --template="../conf/migrate_7.0.6.sql" --destination="$install_dir/migrate_7.0.6.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_7.0.6.sql
|
||||
else
|
||||
ynh_script_progression --message="Database migration not required"
|
||||
if ynh_compare_current_package_version --comparison le --version 7.0~ynh6
|
||||
then
|
||||
ynh_script_progression --message="7.0.6 to 8.0 database migration required, migrating"
|
||||
ynh_add_config --template="../conf/migrate_7.0.6.sql" --destination="$install_dir/migrate_7.0.6.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_7.0.6.sql
|
||||
else
|
||||
ynh_script_progression --message="7.0.6 to 8.0 database migration not required since package > 7.0.6"
|
||||
fi
|
||||
fi
|
||||
ynh_script_progression --message="You shouldn't see this"
|
||||
|
||||
popd
|
||||
|
||||
|
@ -64,7 +74,8 @@ popd
|
|||
|
||||
# worckaround while https://github.com/chartjs/Chart.js/issues/11478 is not fixed
|
||||
ynh_exec_warn_less mkdir "$install_dir/vendor/chartjs"
|
||||
ynh_exec_warn_less curl -o "$install_dir/vendor/chartjs"/chart.js https://cdn.jsdelivr.net/npm/chart.js
|
||||
ynh_exec_warn_less curl -o "$install_dir/vendor/chartjs"/chart.js https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.js
|
||||
ynh_exec_warn_less curl -o "$install_dir/vendor/chartjs"/chart.umd.js.map https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.js.map
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
diff --git a/www_data/lib/mail.php b/www_data/lib/mail.php
|
||||
index f153e3c..e56f1fd 100644
|
||||
index 363aeb7..343e33b 100644
|
||||
--- a/www_data/lib/mail.php
|
||||
+++ b/www_data/lib/mail.php
|
||||
@@ -15,10 +15,10 @@ function mail_init(){
|
||||
|
||||
$mail->isSMTP();
|
||||
$mail->Host = SMTP_HOST;
|
||||
- $mail->SMTPAuth = true;
|
||||
$mail->Username = SMTP_MAIL;
|
||||
$mail->Password = SMTP_PASSWORD;
|
||||
- $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
||||
+ $mail->SMTPAutoTLS = false;
|
||||
+ $mail->SMTPSecure = false;
|
||||
$mail->Port = SMTP_PORT;
|
||||
$mail->CharSet = 'UTF-8';
|
||||
|
||||
$mail->isSMTP();
|
||||
$mail->Host = SMTP_HOST;
|
||||
- $mail->SMTPAuth = true;
|
||||
$mail->Username = SMTP_MAIL;
|
||||
$mail->Password = SMTP_PASSWORD;
|
||||
- $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
|
||||
+ $mail->SMTPAutoTLS = false;
|
||||
+ $mail->SMTPSecure = false;
|
||||
$mail->Port = SMTP_PORT;
|
||||
$mail->CharSet = 'UTF-8';
|
||||
|
|
Loading…
Add table
Reference in a new issue