From a7ba8031cd5d0230de6cf2756870db7b4332c319 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 10 Mar 2021 18:00:41 +0100 Subject: [PATCH 1/2] revert auto upgrade to major version --- scripts/install | 2 -- scripts/upgrade | 9 --------- 2 files changed, 11 deletions(-) diff --git a/scripts/install b/scripts/install index 22569b0..25d0cc9 100644 --- a/scripts/install +++ b/scripts/install @@ -215,8 +215,6 @@ ynh_script_progression --message="Activating plugins..." --weight=4 $wpcli_alias plugin activate simple-ldap-login $plugin_network # Do not activate http-authentication, this plugin is sometimes unstable $wpcli_alias plugin activate companion-auto-update $plugin_network -# Enable the auto update of major versions -ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< "UPDATE wp_auto_updates SET onoroff='on' WHERE wp_auto_updates.name='major';" $wpcli_alias plugin activate wp-fail2ban-redux $plugin_network #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 004059f..455c57e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -247,15 +247,6 @@ $wpcli_alias plugin activate simple-ldap-login $plugin_network update_plugin companion-auto-update $wpcli_alias plugin activate companion-auto-update $plugin_network -if ynh_compare_current_package_version --comparison lt --version 5.6~ynh2 -then - # Get the database table prefix - db_prefix=$(grep '^$table_prefix' "$final_path/wp-config.php" | sed "s/.*'\(.*\)'.*/\1/" ) - # Enable the auto update of major versions - db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) - ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name <<< "UPDATE ${db_prefix}auto_updates SET onoroff='on' WHERE ${db_prefix}auto_updates.name='major';" -fi - update_plugin wp-fail2ban-redux $wpcli_alias plugin activate wp-fail2ban-redux $plugin_network From 5f7f58779455e216ca17be59969258b7fdd6ca0b Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 10 Mar 2021 18:01:50 +0100 Subject: [PATCH 2/2] Add a message to manually trigger major updates --- scripts/install | 5 ++++- scripts/upgrade | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 25d0cc9..49766d8 100644 --- a/scripts/install +++ b/scripts/install @@ -283,7 +283,10 @@ ynh_secure_remove --file=$final_path/wp-cli.phar # Get main domain and buid the url of the admin panel of the app. admin_panel="https://$(grep portal_domain /etc/ssowat/conf.json | cut -d'"' -f4)/yunohost/admin/#/apps/$app" -echo "You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. +echo "Please manually trigger updates to major versions in the WordPress admin area. +You can also activate the automatic update in the Companion Auto Update plugin settings. + +You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__. If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/wordpress_ynh__URL_TAG3__." > mail_to_send diff --git a/scripts/upgrade b/scripts/upgrade index 455c57e..4941018 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -338,7 +338,10 @@ else fi ynh_app_changelog --format=$format -echo "You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. +echo "Please manually trigger updates to major versions in the WordPress admin area. +You can also activate the automatic update in the Companion Auto Update plugin settings. + +You can configure this app easily by using the experimental __URL_TAG1__config-panel feature__URL_TAG2__$admin_panel/config-panel__URL_TAG3__. You can also find some specific actions for this app by using the experimental __URL_TAG1__action feature__URL_TAG2__$admin_panel/actions__URL_TAG3__. If you're facing an issue or want to improve this app, please open a new issue in this __URL_TAG1__project__URL_TAG2__https://github.com/YunoHost-Apps/wordpress_ynh__URL_TAG3__.