Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
d99503df52
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue