diff --git a/app/helpers/xml_helper.rb b/app/helpers/xml_helper.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/xml_helper.rb
+++ b/app/helpers/xml_helper.rb
@@ -1,2 +1,16 @@
 module XmlHelper
+  def collection_lastmod(collection)
+    article_updated = collection.articles.find(:first, :order => 'updated_at DESC')
+    article_published = collection.articles.find(:first, :order => 'published_at DESC')
+
+    times = []
+    times.push article_updated.updated_at if article_updated
+    times.push article_published.updated_at if article_published
+
+    if times.empty?
+      Time.at(0).xmlschema
+    else
+      times.max.xmlschema
+    end
+  end
 end
diff --git a/spec/controllers/xml_controller_spec.rb b/spec/controllers/xml_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/xml_controller_spec.rb
+++ b/spec/controllers/xml_controller_spec.rb
@@ -178,6 +178,7 @@ describe XmlController do
 
   # TODO(laird): make this more robust
   it "test_sitemap" do
+    Factory(:category)
     get :feed, :format => 'googlesitemap', :type => 'sitemap'
 
     assert_response :success
Fix google sitemap.

Restores XmlHelper#collection_lastmod, which had been removed in
commit f4eeaaa<I>b4c<I>cfe<I>bea<I>f<I>.