diff options
-rw-r--r-- | app/models/info_request.rb | 6 | ||||
-rw-r--r-- | todo.txt | 25 | ||||
-rw-r--r-- | vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb | 20 |
3 files changed, 36 insertions, 15 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 97bb2e927..99312986d 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.97 2008-04-29 16:23:31 francis Exp $ +# $Id: info_request.rb,v 1.98 2008-04-29 16:42:11 francis Exp $ require 'digest/sha1' require 'vendor/plugins/acts_as_xapian/lib/acts_as_xapian' @@ -450,10 +450,10 @@ public track_thing.track_things_sent_emails.each { |a| a.destroy } track_thing.destroy end - self.incoming_messages.each { |a| a.destroy } - self.outgoing_messages.each { |a| a.destroy } self.user_info_request_sent_alerts.each { |a| a.destroy } self.info_request_events.each { |a| a.destroy } + self.incoming_messages.each { |a| a.destroy } + self.outgoing_messages.each { |a| a.destroy } self.destroy end @@ -1,12 +1,18 @@ +Add PCTs to categories +Museum aliases +Index HTML e.g. MRSA: +http://www.whatdotheyknow.com/request/_the_infection_rates_of_orthopae +Internet explorer bug with HTML for Elena + + deployment: change the exec_after scripts to not do solr rebuild the xapian index install it on the server -call info_request.calculate_event_states -check info request fully_destroy does remove it from index solr_object grep for solr and Solr in app +bin/rails-post-deploy http://localhost:3000/list - sent highlighted here check that you aren't doing collapse_by for RSS / Email @@ -17,6 +23,7 @@ check emails look OK remove all the scripts in scripts/*solr* remove all the solr plugins and stuff +You need to reload db after deleting stuff, how do we deal with that? highlight word docs text full_search still has html_highlight parameter @@ -35,10 +42,6 @@ Cluster solr patch - https://issues.apache.org/jira/browse/SOLR-236 Search for "health" crashes it (Solr?) -Index HTML e.g. MRSA: -http://www.whatdotheyknow.com/request/_the_infection_rates_of_orthopae - -Museum aliases FOI requests to use to test it ============================== @@ -80,9 +83,15 @@ Things to track: - successful responses described_at is needed for Users and Public Bodies for RSS +Don't let people use email as their name + Later ===== +Strip spaces on titles for email alerts - New updates for the request 'Suicide rates ' + +CSV export of lists of emails for admins + Plot graph of new request rate Enter > 255 char comment when editing public body gives unhelpful error @@ -218,6 +227,9 @@ Simple Digg style "I lke this request" button Editable user profile, including photo upload +Julian's PDF excerpting thing for highlighting paragraphs + and convert Word Docs to PDFs too + Quoting fixing TODO: http://www.whatdotheyknow.com/request/55/response/96 http://www.whatdotheyknow.com/request/m3_junction_2_eastbound_speed_re @@ -228,6 +240,7 @@ Quoting fixing TODO: http://www.whatdotheyknow.com/request/88/response/352 (and charset) http://www.whatdotheyknow.com/request/51/response/93 http://www.whatdotheyknow.com/request/56/response/252 + http://www.whatdotheyknow.com/request/298/response/415 Sources of public bodies ======================== diff --git a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb index b152dc02d..a0d88f721 100644 --- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb +++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb @@ -4,7 +4,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: acts_as_xapian.rb,v 1.12 2008-04-29 16:14:58 francis Exp $ +# $Id: acts_as_xapian.rb,v 1.13 2008-04-29 16:42:11 francis Exp $ # TODO: # Test :eager_load @@ -190,9 +190,11 @@ module ActsAsXapian ###################################################################### # Initialisation - def ActsAsXapian.init(classname, options) - # store class and options for use later, when we open the db in late_init - @@init_values.push([classname,options]) + def ActsAsXapian.init(classname = nil, options = nil) + if not classname.nil? + # store class and options for use later, when we open the db in late_init + @@init_values.push([classname,options]) + end # make the directory for the xapian databases to go in db_parent_path = File.join(File.dirname(__FILE__), '../xapiandbs/') @@ -200,6 +202,7 @@ module ActsAsXapian @@db_path = File.join(db_parent_path, ENV['RAILS_ENV']) # make some things that don't depend on the db + # XXX this gets made once for each acts_as_xapian. Oh well. @@stemmer = Xapian::Stem.new('english') end # called only when we *need* to open the db @@ -265,6 +268,8 @@ module ActsAsXapian end def ActsAsXapian.writable_init(suffix = "") + ActsAsXapian.init # XXX so db_path is made + new_path = @@db_path + suffix raise "writable_suffix/suffix inconsistency" if @@writable_suffix && @@writable_suffix != suffix if @@writable_db.nil? @@ -423,11 +428,14 @@ module ActsAsXapian for id in ids_to_refresh ActiveRecord::Base.transaction do job = ActsAsXapianJob.find(id, :lock =>true) - # XXX Index functions may reference other models, so we could eager load here too? - model = job.model.constantize.find(job.model_id) # :include => cls.constantize.xapian_options[:include] if job.action == 'update' + # XXX Index functions may reference other models, so we could eager load here too? + model = job.model.constantize.find(job.model_id) # :include => cls.constantize.xapian_options[:include] model.xapian_index elsif job.action == 'destroy' + # Make dummy model with right id, just for destruction + model = job.model.constantize.new + model.id = job.model_id model.xapian_destroy else raise "unknown ActsAsXapianJob action '" + job.action + "'" |