Diff
Modified: branches/apace/app/controllers/algorithms_controller.rb (2165 => 2166)
--- branches/apace/app/controllers/algorithms_controller.rb 2009-04-07 11:16:25 UTC (rev 2165)
+++ branches/apace/app/controllers/algorithms_controller.rb 2009-04-07 15:30:01 UTC (rev 2166)
@@ -24,8 +24,8 @@
@query = params[:query] || ''
@query.strip!
- @contributables = (SOLR_ENABLE && address@hidden) ? Algorithm.find_by_solr(@query, :limit => 100).results : []
- @total_count = (SOLR_ENABLE && address@hidden) ? Algorithm.count_by_solr(@query) : 0
+ @contributables = (Conf.solr_enable && address@hidden) ? Algorithm.find_by_solr(@query, :limit => 100).results : []
+ @total_count = (Conf.solr_enable && address@hidden) ? Algorithm.count_by_solr(@query) : 0
respond_to do |format|
format.html # search.rhtml
Modified: branches/apace/app/controllers/apps_controller.rb (2165 => 2166)
--- branches/apace/app/controllers/apps_controller.rb 2009-04-07 11:16:25 UTC (rev 2165)
+++ branches/apace/app/controllers/apps_controller.rb 2009-04-07 15:30:01 UTC (rev 2166)
@@ -25,8 +25,8 @@
@query = params[:query] || ''
@query.strip!
- @contributables = (SOLR_ENABLE && address@hidden) ? App.find_by_solr(@query, :limit => 100).results : []
- @total_count = (SOLR_ENABLE && address@hidden) ? App.count_by_solr(@query) : 0
+ @contributables = (Conf.solr_enable && address@hidden) ? App.find_by_solr(@query, :limit => 100).results : []
+ @total_count = (Conf.solr_enable && address@hidden) ? App.count_by_solr(@query) : 0
respond_to do |format|
format.html # search.rhtml
Modified: branches/apace/app/models/algorithm.rb (2165 => 2166)
--- branches/apace/app/models/algorithm.rb 2009-04-07 11:16:25 UTC (rev 2165)
+++ branches/apace/app/models/algorithm.rb 2009-04-07 15:30:01 UTC (rev 2166)
@@ -28,7 +28,7 @@
has_many :algorithm_instances
has_many :apps, :through => :algorithm_instances
- acts_as_solr(:fields => [:title, :description]) if SOLR_ENABLE
+ acts_as_solr(:fields => [:title, :description]) if Conf.solr_enable
validates_presence_of :title
validates_inclusion_of :license, :in => ["by-nd", "by-sa", "by"]
Modified: branches/apace/app/models/app.rb (2165 => 2166)
--- branches/apace/app/models/app.rb 2009-04-07 11:16:25 UTC (rev 2165)
+++ branches/apace/app/models/app.rb 2009-04-07 15:30:01 UTC (rev 2166)
@@ -28,7 +28,7 @@
has_many :algorithm_instances
has_many :algorithms, :through => :algorithm_instances
- acts_as_solr(:fields => [:title, :description]) if SOLR_ENABLE
+ acts_as_solr(:fields => [:title, :description]) if Conf.solr_enable
validates_inclusion_of :license, :in => [ "by-nd", "by-sa", "by" ]