Battle-hardening
Fix some bugs in the new redirect/change-name implementation. Not completely bullet-proof, yet (need to deal with Jason's issue), but getting there.
This commit is contained in:
parent
a2b1c7e66c
commit
07da370d41
2 changed files with 5 additions and 2 deletions
|
@ -55,7 +55,8 @@ class WikiReference < ActiveRecord::Base
|
|||
def self.pages_redirected_to(web, page_name)
|
||||
names = []
|
||||
page = web.page(page_name)
|
||||
Thread.current[:page_redirects][page.name].each { |name| names = names + self.pages_that_reference(web, name) }
|
||||
redirected_pages = Thread.current[:page_redirects][page.name]
|
||||
redirected_pages.each { |name| names = names + self.pages_that_reference(web, name) } if redirected_pages
|
||||
names.uniq
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue