Merge pull request #12 from fiveplusone/master

Pull from master
Testing home page tweak
fixes issue #14
Merge branch 'master' of https://github.com/fiveplusone/turkopticon-rails-app into devel
Merge branch 'master' of https://github.com/fiveplusone/turkopticon-rails-app into search
php search: created view, removed duplicate results
Save public email (e.g., "s...@g...") in display_name field of people table immediately after user registers. Change display name ifs and elses
as appropriate. This is done to let us show obfuscated email addresses or user-chosen display names in search results. Search results view does
not call any instance methods; it must get everything from the database with one query.

After applying this commit, run the following in the Rails console:

  Person.find_all_by_display_name(nil).each{|p|
    p.update_attributes(:display_name => p.public_email)
    puts "Changed display name of person " + p.id.to_s + " to " + p.display_name
  }
Add flag_count and comment_count fields to reports table.

This is to let the search results view show the number of flags and comments.

(The search results view must get all its data from the database in one query.)

After applying this commit, run the following at the Rails console:

  Report.all.each{|r|
    r.update_attributes(:flag_count => r.flags.count, :comment_count => r.comments.count)
  }
After flag added, update flag_count; after flag converted to comment, update flag_count and comment_count; after comment added, update comment_count.

This is all to make sure search results show accurate flag and comment counts. (Search results view gets all data from one database query.)
added public email, flag, comment and flag/comment count links to reviews in php search results; change to person.rb is trivial
don't ignore php_api
don't specify a hard path when calling search.php
Merge branch 'master' of https://github.com/fiveplusone/turkopticon-rails-app