Commit 6da1fe9291d3632fa93d12c3103fba223cda3372
Committed by
Daniela Feitosa
1 parent
3371aaf9
Exists in
master
and in
29 other branches
Do not index address for profiles (private data)
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
app/models/profile.rb
@@ -204,7 +204,7 @@ class Profile < ActiveRecord::Base | @@ -204,7 +204,7 @@ class Profile < ActiveRecord::Base | ||
204 | end | 204 | end |
205 | 205 | ||
206 | belongs_to :region | 206 | belongs_to :region |
207 | - | 207 | + |
208 | def location(separator = ' - ') | 208 | def location(separator = ' - ') |
209 | myregion = self.region | 209 | myregion = self.region |
210 | if myregion | 210 | if myregion |
@@ -285,12 +285,12 @@ class Profile < ActiveRecord::Base | @@ -285,12 +285,12 @@ class Profile < ActiveRecord::Base | ||
285 | true | 285 | true |
286 | end | 286 | end |
287 | 287 | ||
288 | - # registar callback for creating boxes after the object is created. | 288 | + # registar callback for creating boxes after the object is created. |
289 | after_create :create_default_set_of_boxes | 289 | after_create :create_default_set_of_boxes |
290 | 290 | ||
291 | # creates the initial set of boxes when the profile is created. Can be | 291 | # creates the initial set of boxes when the profile is created. Can be |
292 | # overriden for each subclass to create a custom set of boxes for its | 292 | # overriden for each subclass to create a custom set of boxes for its |
293 | - # instances. | 293 | + # instances. |
294 | def create_default_set_of_boxes | 294 | def create_default_set_of_boxes |
295 | if template | 295 | if template |
296 | apply_template(template, :copy_articles => false) | 296 | apply_template(template, :copy_articles => false) |
@@ -405,7 +405,7 @@ class Profile < ActiveRecord::Base | @@ -405,7 +405,7 @@ class Profile < ActiveRecord::Base | ||
405 | 405 | ||
406 | # returns +false+ | 406 | # returns +false+ |
407 | def person? | 407 | def person? |
408 | - self.kind_of?(Person) | 408 | + self.kind_of?(Person) |
409 | end | 409 | end |
410 | 410 | ||
411 | def enterprise? | 411 | def enterprise? |
@@ -513,7 +513,7 @@ private :generate_url, :url_options | @@ -513,7 +513,7 @@ private :generate_url, :url_options | ||
513 | 513 | ||
514 | after_create :insert_default_article_set | 514 | after_create :insert_default_article_set |
515 | def insert_default_article_set | 515 | def insert_default_article_set |
516 | - if template | 516 | + if template |
517 | copy_articles_from template | 517 | copy_articles_from template |
518 | else | 518 | else |
519 | default_set_of_articles.each do |article| | 519 | default_set_of_articles.each do |article| |
@@ -583,7 +583,7 @@ private :generate_url, :url_options | @@ -583,7 +583,7 @@ private :generate_url, :url_options | ||
583 | raise _("%s can't have members") % self.class.name | 583 | raise _("%s can't have members") % self.class.name |
584 | end | 584 | end |
585 | end | 585 | end |
586 | - | 586 | + |
587 | def remove_member(person) | 587 | def remove_member(person) |
588 | self.disaffiliate(person, Profile::Roles.all_roles(environment.id)) | 588 | self.disaffiliate(person, Profile::Roles.all_roles(environment.id)) |
589 | end | 589 | end |
@@ -909,7 +909,7 @@ private :generate_url, :url_options | @@ -909,7 +909,7 @@ private :generate_url, :url_options | ||
909 | acts_as_searchable :fields => facets_fields_for_solr + [:extra_data_for_index, | 909 | acts_as_searchable :fields => facets_fields_for_solr + [:extra_data_for_index, |
910 | # searched fields | 910 | # searched fields |
911 | {:name => {:type => :text, :boost => 2.0}}, | 911 | {:name => {:type => :text, :boost => 2.0}}, |
912 | - {:identifier => :text}, {:address => :text}, {:nickname => :text}, | 912 | + {:identifier => :text}, {:nickname => :text}, |
913 | # filtered fields | 913 | # filtered fields |
914 | {:public => :boolean}, {:environment_id => :integer}, | 914 | {:public => :boolean}, {:environment_id => :integer}, |
915 | {:category_filter => :integer}, | 915 | {:category_filter => :integer}, |
@@ -929,7 +929,7 @@ private :generate_url, :url_options | @@ -929,7 +929,7 @@ private :generate_url, :url_options | ||
929 | 929 | ||
930 | def control_panel_settings_button | 930 | def control_panel_settings_button |
931 | {:title => _('Profile Info and settings'), :icon => 'edit-profile'} | 931 | {:title => _('Profile Info and settings'), :icon => 'edit-profile'} |
932 | - end | 932 | + end |
933 | 933 | ||
934 | def followed_by?(person) | 934 | def followed_by?(person) |
935 | person.is_member_of?(self) | 935 | person.is_member_of?(self) |