From 82a8f99208627730e18efbe0eaeeed43a6264475 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 7 Feb 2013 19:05:45 +0800 Subject: [PATCH] Fix [again] error in parser for category --- lib/parsers/parser_front_end.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index 56d352bb9..8cc2a668f 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -19,7 +19,6 @@ module ParserFrontEnd end def parse_page_content(page) - category = params[:category_id].blank? ? page[:category] : params[:category_id] tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id] body = Nokogiri::HTML(page.content) body.css('orbit_front').each do |front| @@ -120,7 +119,7 @@ module ParserFrontEnd end - options = "&page_id=#{page.id}&category_id=\#{category}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page" + options = "&page_id=#{page.id}&category_id=\#{page[:category]}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page" ret << "" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil @@ -137,7 +136,7 @@ module ParserFrontEnd else "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" end - options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category] : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" + options = "&part_id=\#{part.id}&category_id=\#{part[:category]}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" ret << "" when 'public_r_tag'