diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 4ca0c51..a4bf6f1 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -1,5 +1,13 @@ class ArchivesController < ApplicationController - def index + def index + if OrbitHelper.page_data_count > 0 + OrbitHelper.set_page_data_count 0 + page = Page.where(:page_id => OrbitHelper.params["page_id"]).first rescue nil + if !page.nil? + page.data_count = 0 + page.save + end + end files_by_cateogry = ArchiveFile.filter_by_categories.filter_by_tags.group_by(&:category) categories = files_by_cateogry.keys cats = categories.collect do |category|