Category lists and WikiReferences restrict to current Web.
Fix one sanitization test.
This commit is contained in:
parent
2cd2b2746e
commit
10b0561aca
5 changed files with 41 additions and 31 deletions
|
@ -22,7 +22,7 @@ class RevisionSweeper < ActionController::Caching::Sweeper
|
|||
|
||||
def expire_caches(page)
|
||||
expire_cached_summary_pages(page.web)
|
||||
pages_to_expire = ([page.name] + WikiReference.pages_that_reference(page.name)).uniq
|
||||
pages_to_expire = ([page.name] + WikiReference.pages_that_reference(page.web, page.name)).uniq
|
||||
pages_to_expire.each { |page_name| expire_cached_page(page.web, page_name) }
|
||||
end
|
||||
|
||||
|
|
|
@ -348,11 +348,11 @@ class WikiController < ApplicationController
|
|||
end
|
||||
|
||||
def parse_category
|
||||
@categories = WikiReference.list_categories.sort
|
||||
@categories = WikiReference.list_categories(@web).sort
|
||||
@category = params['category']
|
||||
if @category
|
||||
@set_name = "category '#{@category}'"
|
||||
pages = WikiReference.pages_in_category(@category).sort.map { |page_name| @web.page(page_name) }
|
||||
pages = WikiReference.pages_in_category(@web, @category).sort.map { |page_name| @web.page(page_name) }
|
||||
@pages_in_category = PageSet.new(@web, pages)
|
||||
else
|
||||
# no category specified, return all pages of the web
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue