Skip to content
Extraits de code Groupes Projets
Valider f191aef9 rédigé par ilya's avatar ilya
Parcourir les fichiers

DG IZ profile profile photos should update, removed the scaled down hack

parent abc5ee41
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -34,7 +34,7 @@ class Photo < Post
end
def remote_photo
@remote_photo ||= User.owner.url.chop + image.url(:scaled_full)
@remote_photo ||= User.owner.url.chop + image.url
end
def remote_photo= remote_path
......
......@@ -16,14 +16,6 @@ class Profile
validates_presence_of :first_name, :last_name
# before_save :expand_profile_photo_path
#
#
# def expand_profile_photo_path
# unless image_url.nil? || self.image_url.include?(parent_document.url)
# self.image_url = self._parent_document.url + self.image_url
# end
# end
def person_id
self._parent_document.id
end
......
......@@ -30,14 +30,7 @@ module Diaspora
person.profile = object
person.save
end
objects << object
#elsif object.is_a? Profile
# person = parse_owner_id_from_xml post
# profile_hash = Hash.from_xml(post.to_s)
# person.profile.update_attributes!(profile_hash)
#else
# object << object
#end
objects << object
rescue
Rails.logger.info "Not a real type: #{object.to_s}"
end
......@@ -53,16 +46,11 @@ module Diaspora
p.perform
elsif p.is_a? Request
User.owner.receive_friend_request(p)
#This line checks if the sender was in the database, among other things?
elsif p.is_a? Profile
puts p.person_id
p.save
elsif p.respond_to?(:person) && !(p.person.nil?) && !(p.person.is_a? User) #WTF
elsif p.respond_to?(:person) && !(p.person.nil?) && !(p.person.is_a? User)
Rails.logger.info("Saving object with success: #{p.save}")
end
#p.save if p.respond_to?(:person) && !(p.person == nil) #WTF
end
end
end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter