Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/VGraupera/rhodes-wikipedia
Browse files Browse the repository at this point in the history
  • Loading branch information
Hampton Catlin committed Mar 12, 2009
2 parents 74673c7 + 8415ce7 commit 60b0221
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/WikipediaPage/controller.rb
Expand Up @@ -14,16 +14,19 @@ def index

@header = header_page(@search)
# if header is present we assume we have the body as well
if @header_page
if @header
# is it current?
if (Time.parse(@header.created_at) > (Time.now - 3600)) || @show_old
# puts "OK: show the page we have"
@page = data_page(@search)
@data = @page.data.unpack("m")[0]
else
# puts "--- refresh existing page"
# ask to refresh existing page
wiki_get(:article=>@search, :refresh=>true)
end
else
# puts "--- ask for page 1st time"
# ask for page for 1st time
wiki_get(:article=>@search)
end
Expand Down Expand Up @@ -132,6 +135,7 @@ def wiki_get(options = {})
SyncEngine::login('anonymous', 'password')
end

puts "WikipediaPage.ask with #{param_string}"
WikipediaPage.ask(param_string)
end

Expand Down

0 comments on commit 60b0221

Please sign in to comment.