diff --git a/scripts/upgrade b/scripts/upgrade index efbbf81..f41c2d1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,7 +60,6 @@ if ynh_version_le "2.0.5" ; then ynh_save_args path_url is_public prefix db_name final_path db_user ynh_install_app_dependencies $pkg_dependencies - # Move the upload dir to final_path if needed # The upload dir can't be symlinked in home (not supported by LS) upload_path=/home/yunohost.app/$app/upload @@ -75,6 +74,10 @@ if ynh_version_le "2.0.5" ; then ynh_configure migrations/2.0.5.sql ./2.0.5.sql mysql -u $app -p$db_pwd $db_name < ./2.0.5.sql fi +if ynh_version_le "2.62.2-2" ; then + # Move old templates in backup dir + mv $final_path/upload/templates /home/yunohost.backup/$app-old-templates +fi #================================================= # STANDARD UPGRADE STEPS @@ -130,3 +133,13 @@ ynh_exec_as "$app" php console.php update #================================================= ynh_system_reload nginx + +#================================================= +# Send message to the admin +#================================================= + +if ynh_version_le "2.62.2-2" ; then + message="LimeSurvey has been upgraded from version to version 3, note this new version change completely the survey themes system. If you have added or created manually some templates they won't be available in your LimeSurvey, a copy of their source code has been done in /home/yunohost.backup/$app-old-templates/. See https://manual.limesurvey.org/New_Template_System_in_LS3.x" + ynh_warn "$message" + ynh_send_readme_to_admin "$message" "$admin" +fi