mirror of
https://github.com/YunoHost-Apps/moncycle_ynh.git
synced 2024-09-03 19:46:16 +02:00
Update
This commit is contained in:
parent
4b8e3ed8bf
commit
dbc061f0b8
2 changed files with 40 additions and 26 deletions
|
@ -2,25 +2,23 @@ version = "1.0"
|
|||
[main]
|
||||
name = "Moncycle.app configuration"
|
||||
|
||||
# [main.comptes]
|
||||
# name = "comptes"
|
||||
[main.comptes]
|
||||
name = "comptes"
|
||||
|
||||
# [main.comptes.creation_compte]
|
||||
# ask.en = "Enable account creation"
|
||||
# ask.fr = "Permettre la création de nouveaux comptes"
|
||||
# type = "select"
|
||||
# choices = ["true", "false"]
|
||||
# default = "true"
|
||||
# help = "Don't disable account creation before creating one for yourself !"
|
||||
# bind = "CREATION_COMPTE:__INSTALL_DIR__/config.php"
|
||||
#
|
||||
# [main.comptes.connexion_compte]
|
||||
# ask.en = "Enable account connexion"
|
||||
# ask.fr = "Permettre la connexion aux comptes"
|
||||
# type = "select"
|
||||
# choices = ["true", "false"]
|
||||
# default = "true"
|
||||
# bind = "CONNEXION_COMPTE:__INSTALL_DIR__/config.php"
|
||||
[main.comptes.creation_compte]
|
||||
ask.en = "Enable account creation"
|
||||
ask.fr = "Permettre la création de nouveaux comptes"
|
||||
type = "select"
|
||||
choices = ["true", "false"]
|
||||
default = "true"
|
||||
help = "Don't disable account creation before creating one for yourself !"
|
||||
|
||||
[main.comptes.connexion_compte]
|
||||
ask.en = "Enable account connexion"
|
||||
ask.fr = "Permettre la connexion aux comptes"
|
||||
type = "select"
|
||||
choices = ["true", "false"]
|
||||
default = "true"
|
||||
|
||||
[main.export]
|
||||
name = "export"
|
||||
|
|
|
@ -32,6 +32,22 @@ set__csv_sep(){
|
|||
sed -i "s/define(\"CSV_SEP\",.*);/define(\"CSV_SEP\", \"$csv_sep\");/" "$install_dir/config.php"
|
||||
}
|
||||
|
||||
get__creation_compte(){
|
||||
grep -oPi 'define\("CREATION_COMPTE",[\s"]*\K[^\")]+' "$install_dir/config.php"
|
||||
}
|
||||
|
||||
set__creation_compte(){
|
||||
sed -i "s/define(\"CREATION_COMPTE\",.*);/define(\"CSV_SEP\", \"$creation_compte\");/" "$install_dir/config.php"
|
||||
}
|
||||
|
||||
get__connexion_compte(){
|
||||
grep -oPi 'define\("CONNEXION_COMPTE",[\s"]*\K[^\")]+' "$install_dir/config.php"
|
||||
}
|
||||
|
||||
set__connexion_compte(){
|
||||
sed -i "s/define(\"CONNEXION_COMPTE\",.*);/define(\"CSV_SEP\", \"$connexion_compte\");/" "$install_dir/config.php"
|
||||
}
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Reference in a new issue