1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yeswiki_ynh.git synced 2024-09-03 18:05:56 +02:00

fix(install) : better if conditions and labels

This commit is contained in:
mrflos 2024-05-17 17:07:14 +02:00 committed by Florian Schmitt
parent 571bef1166
commit 76f54a939b
2 changed files with 8 additions and 8 deletions

View file

@ -51,15 +51,15 @@ default = "fr"
ask.en = "Choose the wiki model"
ask.fr = "Choisissez le modèle de wiki"
type = "select"
choices = ["default", "CLIC"]
default = "default"
choices = ["YesWiki", "CLIC"]
default = "YesWiki"
[install.authprovider]
ask.en = "Choose the authentification type"
ask.fr = "Choisissez le système d'authentification"
type = "select"
choices = ["LDAP Yunohost", "YesWiki"]
default = "LDAP Yunohost"
choices = ["Yunohost LDAP", "YesWiki"]
default = "Yunohost LDAP"
[install.admin]
type = "user"

View file

@ -51,7 +51,7 @@ admin_temp_pass=$(ynh_string_random 20)
wiki_name_escaped=$(echo "$wiki_name" | sed 's/ /%20/g')
if [$wikimodel = "CLIC"]; then
if [ $wikimodel = "CLIC" ]; then
# replace default yeswiki model with CLIC model
mv $install_dir/setup/sql/default-content.sql $install_dir/setup/sql/default-content.sql.original
cp ../conf/CLIC/default-content.sql $install_dir/setup/sql/default-content.sql
@ -63,7 +63,7 @@ ynh_local_curl "/?PagePrincipale&installAction=install" "config[default_language
"admin_name=$admin" "admin_password=$admin_temp_pass" "admin_password_conf=$admin_temp_pass" \
"admin_email=$admin%40$domain" "submit=Continue"
if [$wikimodel = "CLIC"]; then
if [ $wikimodel = "CLIC" ]; then
# restore original yeswiki model
mv -f $install_dir/setup/sql/default-content.sql.original $install_dir/setup/sql/default-content.sql
fi
@ -72,7 +72,7 @@ fi
# (kind of strange, should be doable using the previous curl?)
ynh_replace_string --match_string="'allow_raw_html' => false," --replace_string="'allow_raw_html' => true," --target_file="$install_dir/wakka.config.php"
if [$authprovider = "Yunohost LDAP"]; then
if [ $authprovider = "Yunohost LDAP" ]; then
#=================================================
# DOWNLOAD AND CONFIGURE LDAP PLUGIN
#=================================================
@ -88,7 +88,7 @@ if [$authprovider = "Yunohost LDAP"]; then
ynh_replace_string --match_string=");" --replace_string=" 'ldap_base' => 'ou=users,dc=yunohost,dc=org'\n);" --target_file="$install_dir/wakka.config.php"
fi
if [$wikimodel = "CLIC"]; then
if [ $wikimodel = "CLIC" ]; then
#=================================================
# DOWNLOAD AND CONFIGURE FERME PLUGIN
#=================================================