From 82e6e95c516e7fe138a067e6446b476c04656ab3 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 21 Dec 2022 16:55:53 +0100 Subject: [PATCH 1/5] Improve extension activation commands --- scripts/_common.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 67824e4..f62abc4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -43,9 +43,10 @@ activate_flarum_extension() { sql_command="SELECT \`value\` FROM settings WHERE \`key\` = 'extensions_enabled'" old_extensions_enabled=$(ynh_mysql_execute_as_root "$sql_command" $database | tail -1) - # Append the extension name at the end of the list - addition=",\"${short_extension}\"]" - new_extensions_enabled=${old_extensions_enabled::-1}$addition + # Use jq to test presence of the extension in the list of enabled extensions + # if not, then add it. + new_extensions_enabled=$(jq -jrc --arg short_extension 'if (any(index("$short_extension")) | not) then . |= + $short_extension else . end' <<< $old_extensions_enabled) + # Update activated extensions list sql_command="UPDATE \`settings\` SET \`value\`='$new_extensions_enabled' WHERE \`key\`='extensions_enabled';" ynh_mysql_execute_as_root "$sql_command" $database From a440d2121cd86e1648ae36276d43171e58ca94ca Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 8 Jan 2023 17:05:51 +0100 Subject: [PATCH 2/5] Fix activate_flarum_extension helper --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index f62abc4..52d2e57 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -45,7 +45,7 @@ activate_flarum_extension() { # Use jq to test presence of the extension in the list of enabled extensions # if not, then add it. - new_extensions_enabled=$(jq -jrc --arg short_extension 'if (any(index("$short_extension")) | not) then . |= + $short_extension else . end' <<< $old_extensions_enabled) + new_extensions_enabled=$(jq -jrc --arg short_extension $short_extension '. + [ $short_extension ] | unique' <<< $old_extensions_enabled) # Update activated extensions list sql_command="UPDATE \`settings\` SET \`value\`='$new_extensions_enabled' WHERE \`key\`='extensions_enabled';" From 4a4dda9a1799280b31c2565877725014f61fc4ff Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 11 Jan 2023 06:23:25 +0000 Subject: [PATCH 3/5] Upgrade to v1.6.3 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a51d9ae..420bfc2 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Forum de nouvelle génération, simplement", "de": "Forum der nächsten Generation leicht gemacht" }, - "version": "1.6.2~ynh1", + "version": "1.6.3~ynh1", "url": "http://flarum.org/", "upstream": { "license": "MIT", From e89ea043c58ff389d8d5669a680c616c047be212 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 11 Jan 2023 06:23:30 +0000 Subject: [PATCH 4/5] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a9b4e50..0c79d03 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Flarum is a simple discussion platform for your website. It's fast and easy to use, with all the features you need to run a successful community. -**Shipped version:** 1.6.2~ynh1 +**Shipped version:** 1.6.3~ynh1 **Demo:** https://discuss.flarum.org/d/21101-demos-come-to-flarum diff --git a/README_fr.md b/README_fr.md index 8fdb0f4..b00a879 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Flarum est une plate-forme de discussion simple pour votre site Web. C'est rapide et facile à utiliser, avec toutes les fonctionnalités dont vous avez besoin pour gérer une communauté. -**Version incluse :** 1.6.2~ynh1 +**Version incluse :** 1.6.3~ynh1 **Démo :** https://discuss.flarum.org/d/21101-demos-come-to-flarum From 0dbb23f3821744bc8ea17d78ef48776fe1a6a7c5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 26 Jan 2023 20:10:20 +0000 Subject: [PATCH 5/5] Auto-update README --- README.md | 2 +- README_fr.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0c79d03..bb208ec 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Flarum for YunoHost -[![Integration level](https://dash.yunohost.org/integration/flarum.svg)](https://dash.yunohost.org/appci/app/flarum) ![Working status](https://ci-apps.yunohost.org/ci/badges/flarum.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/flarum.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/flarum.svg)](https://dash.yunohost.org/appci/app/flarum) ![Working status](https://ci-apps.yunohost.org/ci/badges/flarum.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/flarum.maintain.svg) [![Install Flarum with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flarum) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index b00a879..96f44b6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Flarum pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/flarum.svg)](https://dash.yunohost.org/appci/app/flarum) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/flarum.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/flarum.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/flarum.svg)](https://dash.yunohost.org/appci/app/flarum) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/flarum.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/flarum.maintain.svg) [![Installer Flarum avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=flarum) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Flarum rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Flarum rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Flarum est une plate-forme de discussion simple pour votre site Web. C'est rapide et facile à utiliser, avec toutes les fonctionnalités dont vous avez besoin pour gérer une communauté. @@ -21,9 +21,9 @@ Flarum est une plate-forme de discussion simple pour votre site Web. C'est rapid **Démo :** https://discuss.flarum.org/d/21101-demos-come-to-flarum -## Captures d'écran +## Captures d’écran -![Capture d'écran de Flarum](./doc/screenshots/beta16.jpg) +![Capture d’écran de Flarum](./doc/screenshots/beta16.jpg) ## Avertissements / informations importantes @@ -76,9 +76,9 @@ Rechargez PHP-FPM avec `sudo service php*php_version*-fpm reload`. ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -94,4 +94,4 @@ ou sudo yunohost app upgrade flarum -u https://github.com/YunoHost-Apps/flarum_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file