From 97ce07a5e348c398cde5e97ef57dbd1c929fc5c4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 23 Oct 2022 09:28:02 +0200 Subject: [PATCH] fix --- conf/config.php | 67 +++++++++++-------------------------------------- scripts/install | 7 +++--- scripts/upgrade | 15 +++++++---- 3 files changed, 27 insertions(+), 62 deletions(-) diff --git a/conf/config.php b/conf/config.php index 2edfefa..dbed7df 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", "Put random text here"); diff --git a/scripts/install b/scripts/install index 6265cb5..4552cc9 100644 --- a/scripts/install +++ b/scripts/install @@ -116,10 +116,10 @@ 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 600 "$final_path/config.php" +chown $app:$app "$final_path/config.php" #chmod 775 "$final_path/tmp/sessions" #================================================= @@ -127,7 +127,6 @@ chown $app:$app "$final_path/db/config.php" #================================================= ynh_secure_remove --file="$final_path/setup.php" -ynh_secure_remove --file="$final_path/db/todolist.db" #================================================= # SETUP SSOWAT diff --git a/scripts/upgrade b/scripts/upgrade index edfffff..6940238 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -94,7 +94,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="config.php" fi chmod 750 "$final_path" @@ -127,12 +127,17 @@ ynh_add_nginx_config #================================================= # RESTORE USER RIGHTS #================================================= +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" + +chmod 600 "$final_path/config.php" +chown $app:$app "$final_path/config.php" 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