mirror of
https://github.com/YunoHost-Apps/moncycle_ynh.git
synced 2024-09-03 19:46:16 +02:00
Test config panel with getter setter
This commit is contained in:
parent
cfa3e8c4e9
commit
4b8e3ed8bf
2 changed files with 11 additions and 8 deletions
|
@ -26,9 +26,8 @@ name = "Moncycle.app configuration"
|
|||
name = "export"
|
||||
|
||||
[main.export.csv_sep]
|
||||
#ask.en = "Separator for data export in csv format"
|
||||
#ask.fr = "Séparateur pour l'export des données au format csv"
|
||||
bind = ":__INSTALL_DIR__/config.php"
|
||||
ask.en = "Separator for data export in csv format"
|
||||
ask.fr = "Séparateur pour l'export des données au format csv"
|
||||
type = "string"
|
||||
#default = ";"
|
||||
default = ";"
|
||||
|
|
@ -24,10 +24,14 @@ ynh_abort_if_errors
|
|||
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
|
||||
## import needed settings
|
||||
#creation_compte=$(ynh_app_setting_get --app="$app" --key=creation_compte)
|
||||
#connexion_compte=$(ynh_app_setting_get --app="$app" --key=connexion_compte)
|
||||
#csv_sep=$(ynh_app_setting_get --app="$app" --key=csv_sep)
|
||||
get__csv_sep(){
|
||||
grep -oPi 'define\("CSV_SEP",[\s"]*\K[^\")]+' "$install_dir/config.php"
|
||||
}
|
||||
|
||||
set__csv_sep(){
|
||||
sed -i "s/define(\"CSV_SEP\",.*);/define(\"CSV_SEP\", \"$csv_sep\");/" "$install_dir/config.php"
|
||||
}
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue