Fix #4155: Fix profile/settings metadata discrepancy.
This commit is contained in:
@@ -19,6 +19,7 @@ class UsersController < ApplicationController
|
|||||||
if @user.is_anonymous?
|
if @user.is_anonymous?
|
||||||
redirect_to new_session_path
|
redirect_to new_session_path
|
||||||
else
|
else
|
||||||
|
params[:action] = "edit"
|
||||||
respond_with(@user, template: "users/edit")
|
respond_with(@user, template: "users/edit")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -53,6 +54,7 @@ class UsersController < ApplicationController
|
|||||||
@user = CurrentUser.user
|
@user = CurrentUser.user
|
||||||
|
|
||||||
if @user.is_member?
|
if @user.is_member?
|
||||||
|
params[:action] = "show"
|
||||||
respond_with(@user, methods: @user.full_attributes, template: "users/show")
|
respond_with(@user, methods: @user.full_attributes, template: "users/show")
|
||||||
elsif request.format.html?
|
elsif request.format.html?
|
||||||
redirect_to new_session_path
|
redirect_to new_session_path
|
||||||
|
|||||||
@@ -202,18 +202,18 @@ module ApplicationHelper
|
|||||||
def page_title
|
def page_title
|
||||||
if content_for(:page_title).present?
|
if content_for(:page_title).present?
|
||||||
content_for(:page_title)
|
content_for(:page_title)
|
||||||
elsif action_name == "index"
|
elsif params[:action] == "index"
|
||||||
"#{controller_name.titleize} - #{Danbooru.config.app_name}"
|
"#{params[:controller].titleize} - #{Danbooru.config.app_name}"
|
||||||
elsif action_name == "show"
|
elsif params[:action] == "show"
|
||||||
"#{controller_name.singularize.titleize} - #{Danbooru.config.app_name}"
|
"#{params[:controller].singularize.titleize} - #{Danbooru.config.app_name}"
|
||||||
elsif action_name == "new"
|
elsif params[:action] == "new"
|
||||||
"New #{controller_name.singularize.titleize} - #{Danbooru.config.app_name}"
|
"New #{params[:controller].singularize.titleize} - #{Danbooru.config.app_name}"
|
||||||
elsif action_name == "edit"
|
elsif params[:action] == "edit"
|
||||||
"Edit #{controller_name.singularize.titleize} - #{Danbooru.config.app_name}"
|
"Edit #{params[:controller].singularize.titleize} - #{Danbooru.config.app_name}"
|
||||||
elsif action_name == "search"
|
elsif params[:action] == "search"
|
||||||
"Search #{controller_name.titleize} - #{Danbooru.config.app_name}"
|
"Search #{params[:controller].titleize} - #{Danbooru.config.app_name}"
|
||||||
else
|
else
|
||||||
"#{Danbooru.config.app_name}/#{controller_name}"
|
"#{Danbooru.config.app_name}/#{params[:controller]}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ module PostsHelper
|
|||||||
def post_search_count_js
|
def post_search_count_js
|
||||||
return nil unless post_search_counts_enabled?
|
return nil unless post_search_counts_enabled?
|
||||||
|
|
||||||
if action_name == "index" && params[:page].nil?
|
if params[:action] == "index" && params[:page].nil?
|
||||||
tags = Tag.scan_query(params[:tags]).sort.join(" ")
|
tags = Tag.scan_query(params[:tags]).sort.join(" ")
|
||||||
|
|
||||||
if tags.present?
|
if tags.present?
|
||||||
|
|||||||
Reference in New Issue
Block a user