1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Merge pull request #206 from YunoHost-Apps/testing

Improve extension activation commands and upgrade to 1.6.3
This commit is contained in:
tituspijean 2023-01-28 09:03:40 +01:00 committed by GitHub
commit dc336fabeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 17 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Flarum for YunoHost # 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) [![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)* *[Lire ce readme en français.](./README_fr.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. 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 **Demo:** https://discuss.flarum.org/d/21101-demos-come-to-flarum

View file

@ -5,25 +5,25 @@ It shall NOT be edited by hand.
# Flarum pour YunoHost # 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 dinté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) [![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)* *[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer Flarum rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet dinstaller 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.* Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
## Vue d'ensemble ## Vue densemble
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é. 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 **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 ## Avertissements / informations importantes
@ -76,9 +76,9 @@ Rechargez PHP-FPM avec `sudo service php*php_version*-fpm reload`.
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : <https://flarum.org> * Site officiel de lapp : <https://flarum.org>
* Documentation officielle de l'admin : <https://docs.flarum.org> * Documentation officielle de ladmin : <https://docs.flarum.org>
* Dépôt de code officiel de l'app : <https://github.com/flarum/framework> * Dépôt de code officiel de lapp : <https://github.com/flarum/framework>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_flarum> * Documentation YunoHost pour cette app : <https://yunohost.org/app_flarum>
* Signaler un bug : <https://github.com/YunoHost-Apps/flarum_ynh/issues> * Signaler un bug : <https://github.com/YunoHost-Apps/flarum_ynh/issues>
@ -94,4 +94,4 @@ ou
sudo yunohost app upgrade flarum -u https://github.com/YunoHost-Apps/flarum_ynh/tree/testing --debug sudo yunohost app upgrade flarum -u https://github.com/YunoHost-Apps/flarum_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps> **Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>

View file

@ -7,7 +7,7 @@
"fr": "Forum de nouvelle génération, simplement", "fr": "Forum de nouvelle génération, simplement",
"de": "Forum der nächsten Generation leicht gemacht" "de": "Forum der nächsten Generation leicht gemacht"
}, },
"version": "1.6.2~ynh1", "version": "1.6.3~ynh1",
"url": "http://flarum.org/", "url": "http://flarum.org/",
"upstream": { "upstream": {
"license": "MIT", "license": "MIT",

View file

@ -43,9 +43,10 @@ activate_flarum_extension() {
sql_command="SELECT \`value\` FROM settings WHERE \`key\` = 'extensions_enabled'" sql_command="SELECT \`value\` FROM settings WHERE \`key\` = 'extensions_enabled'"
old_extensions_enabled=$(ynh_mysql_execute_as_root "$sql_command" $database | tail -1) old_extensions_enabled=$(ynh_mysql_execute_as_root "$sql_command" $database | tail -1)
# Append the extension name at the end of the list # Use jq to test presence of the extension in the list of enabled extensions
addition=",\"${short_extension}\"]" # if not, then add it.
new_extensions_enabled=${old_extensions_enabled::-1}$addition new_extensions_enabled=$(jq -jrc --arg short_extension $short_extension '. + [ $short_extension ] | unique' <<< $old_extensions_enabled)
# Update activated extensions list # Update activated extensions list
sql_command="UPDATE \`settings\` SET \`value\`='$new_extensions_enabled' WHERE \`key\`='extensions_enabled';" sql_command="UPDATE \`settings\` SET \`value\`='$new_extensions_enabled' WHERE \`key\`='extensions_enabled';"
ynh_mysql_execute_as_root "$sql_command" $database ynh_mysql_execute_as_root "$sql_command" $database