diff --git a/scripts/upgrade b/scripts/upgrade index 099d842..ed1cf99 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -175,9 +175,7 @@ do # If the current version has the same major version than the next one, # then it's the last upgrade to do if [ "$major_version" -eq "$current_major_version" ]; then - current_major_version=last - # Patch nexcloud files only for the last upgrade. - cp -a ../sources/patches_last_version ../sources/patches + current_major_version=last fi # Load the value for this version diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index f19c2e2..04a819b 100755 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -5,3 +5,6 @@ next_version="13.0.1" # Nextcloud tarball checksum sha256 nextcloud_source_sha256="5743314a71e972ae46a14b36b37394d4545915aa5f32d9e12ba786d04c1f1d11" + +# Patch nextcloud files only for the last version +cp -a ../sources/patches_last_version/* ../sources/patches diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/sources/patches_last_version/app-00-add-logout_url-conf.patch b/sources/patches_last_version/app-00-add-logout_url-conf.patch index 5565e21..3659fb1 100644 --- a/sources/patches_last_version/app-00-add-logout_url-conf.patch +++ b/sources/patches_last_version/app-00-add-logout_url-conf.patch @@ -1,14 +1,14 @@ --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php -@@ -100,7 +100,10 @@ class LoginController extends Controller { +@@ -119,7 +119,10 @@ } $this->userSession->logout(); - -- return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); + +- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')); + $redirectUrl = $this->config->getSystemValue('logout_url', + $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm') + ); -+ return new RedirectResponse($redirectUrl); ++ $response = new RedirectResponse($redirectUrl); + $response->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"'); + return $response; } - - /**