From 2d882cd3c6b1728c12fb22475ebb698e60df5a0c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 5 Sep 2022 03:00:46 +0200 Subject: [PATCH 1/4] Create app-array_key_exists.patch --- sources/patches/app-array_key_exists.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sources/patches/app-array_key_exists.patch diff --git a/sources/patches/app-array_key_exists.patch b/sources/patches/app-array_key_exists.patch new file mode 100644 index 0000000..c69b85b --- /dev/null +++ b/sources/patches/app-array_key_exists.patch @@ -0,0 +1,11 @@ +--- a/vendor/twig/twig/lib/Twig/Template.php 2022-09-05 02:54:39.800617851 +0200 ++++ a/vendor/twig/twig/lib/Twig/Template.php 2022-09-05 03:54:48.000000000 +0200 +@@ -387,7 +387,7 @@ + + // object property + if (Twig_TemplateInterface::METHOD_CALL !== $type) { +- if (isset($object->$item) || array_key_exists((string) $item, $object)) { ++ if (isset($object->$item)) { + if ($isDefinedTest) { + return true; + } From fcaa277cb7bd68ea4264f3b6410cc50bcda5b147 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 5 Sep 2022 03:06:57 +0200 Subject: [PATCH 2/4] Apply example_ynh --- check_process | 3 --- conf/nginx.conf | 2 +- doc/.DS_Store | Bin 6148 -> 0 bytes doc/screenshots/.DS_Store | Bin 6148 -> 0 bytes scripts/install | 18 ++++++++++-------- scripts/remove | 2 +- scripts/restore | 22 +++++++++++----------- scripts/upgrade | 29 ++++++++++++++++++----------- 8 files changed, 41 insertions(+), 35 deletions(-) delete mode 100644 doc/.DS_Store delete mode 100644 doc/screenshots/.DS_Store diff --git a/check_process b/check_process index c3b3e73..1636a1e 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - path="/path" - admin="john" is_public=1 - password="1Strong-Password" ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/conf/nginx.conf b/conf/nginx.conf index 255752b..d86f108 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,4 @@ -location / { +location __PATH__/ { # Path to source alias __FINALPATH__/web/; diff --git a/doc/.DS_Store b/doc/.DS_Store deleted file mode 100644 index c90376b56b73b627c519d1a34c5d8c9abb7004dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c^3>-s>NNG}1?l15Mt0;UyegFv&DbPhqfch%Fi%(bFB<-Yt6!=#P*lfL7ulP#UTPH8)y|&RG>0a|qcjG!J4AG8> j(T=(Cc6=8_S=W5c^IkY62A%n!6ZJFTy2zx!wH5dQ#>Eyj diff --git a/doc/screenshots/.DS_Store b/doc/screenshots/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0&1 - chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -91,6 +81,23 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + +#================================================= +# SPECIFIC UPGRADE +#================================================= +# INSTALL LYCHEE WITH COMPOSER +#================================================= +ynh_script_progression --message="Installing $app with Composer..." --weight=5 + +ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1 + #================================================= # UPDATE A CONFIG FILE #================================================= From adc6229115815887c0097be281788dd2b6c82259 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 5 Sep 2022 01:07:02 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 19 +++++++++---------- README_fr.md | 27 +++++++++++++++------------ 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index dca2df6..281148e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Quizzes for YunoHost -[![Integration level](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![Working status](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg) [![Install Quizzes with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=quizzes) *[Lire ce readme en français.](./README_fr.md)* @@ -20,11 +20,9 @@ Multiple choice quiz platform with results analysis interface **Shipped version:** 1.3.0~ynh1 - ## Screenshots -![](./doc/screenshots/.DS_Store) -![](./doc/screenshots/score_par_theme.png) +![Screenshot of Quizzes](./doc/screenshots/score_par_theme.png) ## Disclaimers / important information @@ -36,20 +34,21 @@ test ``` ## Documentation and resources -* Official app website: https://github.com/hipay/quizzes/ -* Upstream app code repository: https://github.com/hipay/quizzes/ -* YunoHost documentation for this app: https://yunohost.org/app_quizzes -* Report a bug: https://github.com/YunoHost-Apps/quizzes_ynh/issues +* Official app website: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug or sudo yunohost app upgrade quizzes -u https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 7905c21..d13a82a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Quizzes pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/quizzes.svg)](https://dash.yunohost.org/appci/app/quizzes) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/quizzes.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/quizzes.maintain.svg) [![Installer Quizzes avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=quizzes) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Quizzes 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.* @@ -13,14 +17,12 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Plate-forme de quizzes à choix multiples (QCM) avec interface d'analyse des résultats -**Version incluse :** 1.3.0~ynh1 - +**Version incluse :** 1.3.0~ynh1 ## Captures d'écran -![](./doc/screenshots/.DS_Store) -![](./doc/screenshots/score_par_theme.png) +![Capture d'écran de Quizzes](./doc/screenshots/score_par_theme.png) ## Avertissements / informations importantes @@ -32,20 +34,21 @@ test ``` ## Documentations et ressources -* Site officiel de l'app : https://github.com/hipay/quizzes/ -* Dépôt de code officiel de l'app : https://github.com/hipay/quizzes/ -* Documentation YunoHost pour cette app : https://yunohost.org/app_quizzes -* Signaler un bug : https://github.com/YunoHost-Apps/quizzes_ynh/issues +* Site officiel de l'app : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug ou sudo yunohost app upgrade quizzes -u https://github.com/YunoHost-Apps/quizzes_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 2f84edd47addd8c61c69e93c5e9568b2df2f4c8d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 5 Sep 2022 03:18:17 +0200 Subject: [PATCH 4/4] Fix patch --- scripts/install | 4 ++++ scripts/upgrade | 4 ++++ sources/{patches => }/app-array_key_exists.patch | 0 sources/extra_files/app/.gitignore | 2 -- sources/patches/.gitignore | 2 -- 5 files changed, 8 insertions(+), 4 deletions(-) rename sources/{patches => }/app-array_key_exists.patch (100%) delete mode 100644 sources/extra_files/app/.gitignore delete mode 100644 sources/patches/.gitignore diff --git a/scripts/install b/scripts/install index a6acc30..8d560f6 100755 --- a/scripts/install +++ b/scripts/install @@ -101,6 +101,10 @@ ynh_script_progression --message="Installing $app with Composer..." --weight=5 ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1 +pushd $final_path + patch --strip=1 < $YNH_APP_BASEDIR/sources/app-array_key_exists.patch +popd + #================================================= # ADD A CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ee723c3..21d255e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,6 +98,10 @@ ynh_script_progression --message="Installing $app with Composer..." --weight=5 ynh_install_composer --install_args="--ignore-platform-reqs" 2>&1 +pushd $final_path + patch --strip=1 < $YNH_APP_BASEDIR/sources/app-array_key_exists.patch +popd + #================================================= # UPDATE A CONFIG FILE #================================================= diff --git a/sources/patches/app-array_key_exists.patch b/sources/app-array_key_exists.patch similarity index 100% rename from sources/patches/app-array_key_exists.patch rename to sources/app-array_key_exists.patch diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op]