diff --git a/README.md b/README.md index cfc9213..f8768f2 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 Forum software that is easy to use, powerful, and highly customisable -**Shipped version:** 3.3.4~ynh1 +**Shipped version:** 3.3.4~ynh2 **Demo:** https://www.phpbb.com/demo/ diff --git a/README_fr.md b/README_fr.md index d80c121..0fc9806 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Forum facile à utiliser, puissant et hautement personnalisable -**Version incluse :** 3.3.4~ynh1 +**Version incluse :** 3.3.4~ynh2 **Démo :** https://www.phpbb.com/demo/ diff --git a/check_process b/check_process index 8c4f6f9..67b94f7 100644 --- a/check_process +++ b/check_process @@ -3,6 +3,7 @@ domain="domain.tld" path="/path" admin="john" + language="fr" is_public=1 password="super_password" ; Checks diff --git a/conf/config.php.default b/conf/config.php.default deleted file mode 100644 index b87413e..0000000 --- a/conf/config.php.default +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/conf/install-config.yml.default b/conf/install-config.yml.default index 5359d66..98f6865 100644 --- a/conf/install-config.yml.default +++ b/conf/install-config.yml.default @@ -5,7 +5,7 @@ installer: email: __EMAIL__ board: - lang: en + lang: __LANGUAGE__ name: My Board description: My amazing new phpBB board @@ -30,9 +30,9 @@ installer: server: cookie_secure: true server_protocol: https:// - force_server_vars: false + force_server_vars: true server_name: __DOMAIN__ - server_port: 80 + server_port: 443 script_path: __PATH_URL__ extensions: ['phpbb/viglink'] \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 556b622..449c8be 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,12 +9,13 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } - index index.php; + # phpBB uses index.htm + index index.php index.html index.htm; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file #client_max_body_size 50M; - try_files $uri $uri/ index.php; + try_files $uri $uri/ @rewriteapp; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; @@ -26,6 +27,18 @@ location __PATH__/ { fastcgi_param SCRIPT_FILENAME $request_filename; } + # Deny access to internal phpbb files. + location ~ __PATH__/(config\.php|common\.php|cache|files|images/avatars/upload|includes|(? /dev/null) - then - recipients="$recipients $mail" - fi - fi - done - echo "$recipients" - } - recipients=$(find_mails "$recipients") - - local mail_subject="☁️🆈🅽🅷☁️: \`$app\` has important message for you" - - local mail_message="This is an automated message from your beloved YunoHost server. -Specific information for the application $app. -$app_message ---- -Automatic diagnosis data from YunoHost -$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')" - - # Define binary to use for mail command - if [ -e /usr/bin/bsd-mailx ] - then - local mail_bin=/usr/bin/bsd-mailx - else - local mail_bin=/usr/bin/mail.mailutils - fi - - # Send the email to the recipients - echo "$mail_message" | $mail_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients" -} diff --git a/scripts/install b/scripts/install index 1460670..2608e64 100644 --- a/scripts/install +++ b/scripts/install @@ -25,6 +25,7 @@ admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC password=$YNH_APP_ARG_PASSWORD email=$(ynh_user_get_info --username=$admin --key=mail) +language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME @@ -47,6 +48,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin +ynh_app_setting_set --app=$app --key=language --value=$language #================================================= # STANDARD MODIFICATIONS @@ -95,6 +97,7 @@ chown -R $app:www-data "$final_path" #================================================= tmpdir="$(mktemp -d)" + # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$tmpdir" --source_id=fr cp -a "$tmpdir/language/fr" "$final_path/language/fr" @@ -169,17 +172,6 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload -#================================================= -# SEND A README FOR THE ADMIN -#================================================= -ynh_script_progression --message="Sending a readme for the admin..." - -message="phpBB was successfully installed :) - -If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/phpbb_ynh/issues" - -ynh_send_readme_to_admin "$message" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 4bc02a1..d42f8ce 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,6 +22,7 @@ admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +language=$(ynh_app_setting_get --app=$app --key=language) #================================================= # CHECK VERSION