Delete Orphan Pages in Category

If a Web has categories defined, you can delete orphaned pages in a given category
(in addition to being able to delete all orphaned pages).
This commit is contained in:
Jacques Distler 2008-12-06 16:11:47 -06:00
parent 61799bc63f
commit 3a78ef3dbf
6 changed files with 60 additions and 3 deletions

View file

@ -73,6 +73,12 @@ class PageSet < Array
}
end
def pages_in_category(category)
self.select { |page|
WikiReference.pages_in_category(web, category).map.include?(page.name)
}
end
# Returns all the wiki words in this page set for which
# there are no pages in this page set's web
def wanted_pages