Redirected Pages are not Wanted Pages
Correct list of Wanted Pages. Should not include redirected pages. (Reported by Toby Bartels)
This commit is contained in:
parent
77e00f1a76
commit
51280b758d
2 changed files with 15 additions and 2 deletions
|
@ -83,12 +83,17 @@ class PageSet < Array
|
|||
# Returns all the wiki words in this page set for which
|
||||
# there are no pages in this page set's web
|
||||
def wanted_pages
|
||||
wiki_words - web.select.names
|
||||
known_pages = (web.select.names + redirected_names).uniq
|
||||
wiki_words - known_pages
|
||||
end
|
||||
|
||||
def names
|
||||
self.map { |page| page.name }
|
||||
end
|
||||
|
||||
def redirected_names
|
||||
self.wiki_words.select {|name| web.has_redirect_for?(name) }.uniq.sort
|
||||
end
|
||||
|
||||
def wiki_words
|
||||
self.inject([]) { |wiki_words, page|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue