Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2009-06-05 22:50:23 -05:00
commit d99503df52

View file

@ -13,7 +13,13 @@ class WikiReference < ActiveRecord::Base
validates_inclusion_of :link_type, :in => [LINKED_PAGE, WANTED_PAGE, REDIRECTED_PAGE, INCLUDED_PAGE, CATEGORY, AUTHOR, FILE, WANTED_FILE]
def self.link_type(web, page_name)
web.has_page?(page_name) ? LINKED_PAGE : WANTED_PAGE
if web.has_page?(page_name)
LINKED_PAGE
elsif self.page_that_redirects_for(web, page_name)
REDIRECTED_PAGE
else
WANTED_PAGE
end
end
def self.pages_that_reference(web, page_name)