Merge branch 'next-minor' into develop
This commit is contained in:
commit
6bb2e2fadd
3 changed files with 22 additions and 23 deletions
|
|
@ -17,6 +17,7 @@
|
|||
# 0.7.13.0
|
||||
|
||||
## Refactor
|
||||
* Set better example values for unicorn stdout/stderr log settings [#8058](https://github.com/diaspora/diaspora/pull/8058)
|
||||
|
||||
## Bug fixes
|
||||
* Fix error while trying to fetch some sites with invalid OpenGraph data [#8049](https://github.com/diaspora/diaspora/pull/8049)
|
||||
|
|
|
|||
|
|
@ -29,21 +29,19 @@ class AspectsController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
@aspect = current_user.aspects.where(id: params[:id]).first
|
||||
|
||||
begin
|
||||
if current_user.auto_follow_back && @aspect.id == current_user.auto_follow_back_aspect.id
|
||||
if current_user.auto_follow_back && aspect.id == current_user.auto_follow_back_aspect.id
|
||||
current_user.update(auto_follow_back: false, auto_follow_back_aspect: nil)
|
||||
flash[:notice] = I18n.t "aspects.destroy.success_auto_follow_back", name: @aspect.name
|
||||
flash[:notice] = I18n.t "aspects.destroy.success_auto_follow_back", name: aspect.name
|
||||
else
|
||||
flash[:notice] = I18n.t "aspects.destroy.success", name: @aspect.name
|
||||
flash[:notice] = I18n.t "aspects.destroy.success", name: aspect.name
|
||||
end
|
||||
@aspect.destroy
|
||||
aspect.destroy
|
||||
rescue ActiveRecord::StatementInvalid => e
|
||||
flash[:error] = I18n.t "aspects.destroy.failure", name: @aspect.name
|
||||
flash[:error] = I18n.t "aspects.destroy.failure", name: aspect.name
|
||||
end
|
||||
|
||||
if request.referer.include?('contacts')
|
||||
if request.referer.include?("contacts")
|
||||
redirect_to contacts_path
|
||||
else
|
||||
redirect_to aspects_path
|
||||
|
|
@ -51,41 +49,41 @@ class AspectsController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
if @aspect = current_user.aspects.where(:id => params[:id]).first
|
||||
redirect_to aspects_path('a_ids[]' => @aspect.id)
|
||||
if aspect
|
||||
redirect_to aspects_path("a_ids[]" => aspect.id)
|
||||
else
|
||||
redirect_to aspects_path
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@aspect = current_user.aspects.where(:id => params[:id]).first
|
||||
|
||||
if @aspect.update_attributes!(aspect_params)
|
||||
flash[:notice] = I18n.t 'aspects.update.success', :name => @aspect.name
|
||||
if aspect.update!(aspect_params)
|
||||
flash[:notice] = I18n.t "aspects.update.success", name: aspect.name
|
||||
else
|
||||
flash[:error] = I18n.t 'aspects.update.failure', :name => @aspect.name
|
||||
flash[:error] = I18n.t "aspects.update.failure", name: aspect.name
|
||||
end
|
||||
render :json => { :id => @aspect.id, :name => @aspect.name }
|
||||
render json: {id: aspect.id, name: aspect.name}
|
||||
end
|
||||
|
||||
def update_order
|
||||
params[:ordered_aspect_ids].each_with_index do |id, i|
|
||||
current_user.aspects.find(id).update_attributes(order_id: i)
|
||||
current_user.aspects.find(id).update(order_id: i)
|
||||
end
|
||||
head :no_content
|
||||
end
|
||||
|
||||
def toggle_chat_privilege
|
||||
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
|
||||
|
||||
@aspect.chat_enabled = !@aspect.chat_enabled
|
||||
@aspect.save
|
||||
aspect.chat_enabled = !aspect.chat_enabled
|
||||
aspect.save
|
||||
head :no_content
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def aspect
|
||||
@aspect ||= current_user.aspects.where(id: (params[:id] || params[:aspect_id])).first
|
||||
end
|
||||
|
||||
def connect_person_to_aspect(aspecting_person_id)
|
||||
@person = Person.find(aspecting_person_id)
|
||||
if @contact = current_user.contact_for(@person)
|
||||
|
|
|
|||
|
|
@ -186,8 +186,8 @@ configuration: ## Section
|
|||
#rails_environment: 'development'
|
||||
|
||||
## Write unicorn stderr and stdout log.
|
||||
#stderr_log: '/usr/local/app/diaspora/log/unicorn-stderr.log'
|
||||
#stdout_log: '/usr/local/app/diaspora/log/unicorn-stdout.log'
|
||||
#stderr_log: 'log/unicorn-stderr.log'
|
||||
#stdout_log: 'log/unicorn-stdout.log'
|
||||
|
||||
## Number of Unicorn worker processes (default=2).
|
||||
## Increase this if you have many users.
|
||||
|
|
|
|||
Loading…
Reference in a new issue