1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/prettynoemiecms_ynh.git synced 2024-09-03 20:06:36 +02:00

Merge pull request #5 from YunoHost-Apps/testing

Testing
This commit is contained in:
Kayou 2019-06-03 20:49:39 +02:00 committed by GitHub
commit 77c289a23e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 17 deletions

View file

@ -14,7 +14,14 @@ location __PATH__/ {
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
client_max_body_size 50M; client_max_body_size 50M;
location __PATH__/yunohost {
try_files $uri $uri/ index.php; try_files $uri $uri/ index.php;
}
location __PATH__/ {
try_files $uri $uri/ @prettynoemiecms;
}
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock;
@ -27,21 +34,10 @@ location __PATH__/ {
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;
} }
location ~ ^__PATH__/(.*)$ {
if ($request_filename !~ "-l"){
set $rule_1 1$rule_1;
}
if (!-f $request_filename){
set $rule_1 2$rule_1;
}
if (!-d $request_filename){
set $rule_1 3$rule_1;
}
if ($rule_1 = "321"){
rewrite __PATH__/(.*) __PATH__/index.php?$1 last;
}
}
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }
location @prettynoemiecms {
rewrite /(.*)$ __PATH__/index.php?/$1 last;
}

View file

@ -6,7 +6,7 @@
"en": "CMS offers its users an ergonomic solution, simple and elegant to build in no time responsive windows sites with modern design.", "en": "CMS offers its users an ergonomic solution, simple and elegant to build in no time responsive windows sites with modern design.",
"fr": "CMS offrant à ses utilisateurs une solution ergonomique, simple et élégante pour construire en un rien de temps des sites vitrines responsives au design moderne." "fr": "CMS offrant à ses utilisateurs une solution ergonomique, simple et élégante pour construire en un rien de temps des sites vitrines responsives au design moderne."
}, },
"version": "2019.05.23~ynh1", "version": "2019.05.23~ynh2",
"url": "https://framagit.org/framasoft/PrettyNoemieCMS", "url": "https://framagit.org/framasoft/PrettyNoemieCMS",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"maintainer": { "maintainer": {

View file

@ -146,6 +146,9 @@ ynh_app_setting_delete --app=$app --key=skipped_uris
# Calculate and store the config file checksum into the app settings # Calculate and store the config file checksum into the app settings
ynh_store_file_checksum --file="$final_path/sites/$domain/config.json" ynh_store_file_checksum --file="$final_path/sites/$domain/config.json"
# Fix a bug where images can't be uploaded
ynh_replace_string --match_string="isMediaPathModified = true" --replace_string="" --target_file="$final_path/app/config/config.ini"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -158,6 +161,8 @@ if [ $is_public -eq 1 ]
then then
# unprotected_uris allows SSO credentials to be passed anyway. # unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
# protect the admin panel
ynh_app_setting_set --app=$app --key=protected_uris --value="/admin"
fi fi
#================================================= #=================================================

View file

@ -130,6 +130,9 @@ ynh_backup_if_checksum_is_different --file="$final_path/sites/$domain/config.jso
# Recalculate and store the checksum of the file for the next upgrade. # Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum --file="$final_path/sites/$domain/config.json" ynh_store_file_checksum --file="$final_path/sites/$domain/config.json"
# Fix a bug where images can't be uploaded
ynh_replace_string --match_string="isMediaPathModified = true" --replace_string="" --target_file="$final_path/app/config/config.ini"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================
@ -149,6 +152,8 @@ if [ $is_public -eq 1 ]
then then
# unprotected_uris allows SSO credentials to be passed anyway # unprotected_uris allows SSO credentials to be passed anyway
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
# protect the admin panel
ynh_app_setting_set --app=$app --key=protected_uris --value="/admin"
fi fi
#================================================= #=================================================