Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
9f3d3c8607
1 changed files with 1 additions and 3 deletions
|
@ -13,10 +13,8 @@ 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)
|
||||
if web.has_page?(page_name)
|
||||
if web.has_page?(page_name) || self.page_that_redirects_for(web, page_name)
|
||||
LINKED_PAGE
|
||||
elsif self.page_that_redirects_for(web, page_name)
|
||||
REDIRECTED_PAGE
|
||||
else
|
||||
WANTED_PAGE
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue