Merge branch 'next-minor' into develop

This commit is contained in:
Jonne Haß 2020-01-27 09:30:14 +01:00
commit 2da33408f9
3 changed files with 3 additions and 2 deletions

View file

@ -35,6 +35,7 @@ Although the chat was never enabled per default and was marked as experimental,
## Bug fixes
* Fix error while trying to fetch some sites with invalid OpenGraph data [#8049](https://github.com/diaspora/diaspora/pull/8049)
* Don't show sign up link on mobile when registrations are disabled [#8060](https://github.com/diaspora/diaspora/pull/8060)
## Features
* Add cronjob to cleanup pending photos which were never posted [#8041](https://github.com/diaspora/diaspora/pull/8041)

View file

@ -11,7 +11,7 @@ module SessionsHelper
end
def display_registration_link?
AppConfig.settings.enable_registrations? && devise_mapping.registerable? && controller_name != "registrations"
AppConfig.settings.enable_registrations? && controller_name != "registrations"
end
def display_password_reset_link?

View file

@ -1,5 +1,5 @@
%ul.nav.navbar-nav.navbar-right
- unless current_page?(controller: "/registrations", action: :new)
- if display_registration_link? && !current_page?(controller: "/registrations", action: :new)
%li= link_to t("devise.shared.links.sign_up"), new_user_registration_path, class: "login"
- unless current_page?(controller: "/sessions", action: :new)
%li= link_to t("devise.shared.links.sign_in"), new_user_session_path, class: "login"