Richard Zidlicky
rz****@linux*****
2007年 1月 10日 (水) 07:08:34 JST
Hello, excuse that I don't speak Japanese, hope it is ok to post in English here? I am happilly using hiki for my personal purposes, here are some small patches that make it work better for me. - the its.rb plugin needs some changes, at least when run with the webbrick server. I am not an expert into webbrick so I do not know if these changes will be portable accross different versions? Also slightly beautified the ticket page layout. - made the src.rb plugin use the language and charset configured as default Regards Richard ######### diff -urN hiki-0.8.6-orig/misc/plugin/its.rb hiki-0.8.6/misc/plugin/its.rb --- hiki-0.8.6-orig/misc/plugin/its.rb 2005-11-16 05:53:35.000000000 +0100 +++ hiki-0.8.6/misc/plugin/its.rb 2007-01-08 14:35:41.000000000 +0100 @@ -138,11 +138,13 @@ end def its_add_ticket_post - priority = @cgi['priority'] - version = @cgi['version'] - reporter = @cgi['reporter'] - summary = @cgi['summary'] - description = @cgi['description'] + params =****@cgi***** + + priority = params['priority'][0] + version = params['version'][0] + reporter = params['reporter'][0] + summary = params['summary'][0] + description = params['description'][0] return true if priority.empty? || summary.empty? || description.empty? status = 'New' assigned = '?' @@ -154,6 +156,8 @@ current_text = load( page ) md5hex =****@db*****( page ) text = <<EOS +{{toc}} +---- ! #{its_escape(summary)} :Priority:#{its_escape(priority)} @@ -168,8 +172,10 @@ #{its_escape(description)} +! Comments {{comment}} ---- +! Modify ticket {{its_edit_ticket_form}} EOS text << current_text if current_text @@ -185,11 +191,12 @@ rescue return true end - priority = @cgi['priority'] - status = @cgi['status'] - assigned = @cgi['assigned'] - version = @cgi['version'] - milestone = @cgi['milestone'] + params =****@cgi***** + priority = params['priority'][0] + status = params['status'][0] + assigned = params['assigned'][0] + version = params['version'][0] + milestone = params['milestone'][0] return true if priority.empty? || status.empty? text = load( @page ) ######### diff -urN hiki-0.8.6-orig/misc/plugin/src.rb hiki-0.8.6/misc/plugin/src.rb --- hiki-0.8.6-orig/misc/plugin/src.rb 2005-07-13 03:43:06.000000000 +0200 +++ hiki-0.8.6/misc/plugin/src.rb 2006-12-01 23:04:43.000000000 +0100 @@ -8,8 +8,8 @@ "http://www.w3.org/TR/html4/loose.dtd"> <html lang="ja"> <head> - <meta http-equiv="Content-Language" content="ja"> - <meta http-equiv="Content-Type" content="text/html; charset=EUC-JP"> + <meta http-equiv="Content-Language" content="#{@conf.lang}"> + <meta http-equiv="Content-Type" content="text/html; charset= #{@conf.charset}"> <title>#{CGI::escapeHTML(page_name(@page))}</title> </head> <body> @@ -26,7 +26,7 @@ header = Hash::new header['Last-Modified'] = CGI::rfc1123_date(Time.now) header['type'] = 'text/html' - header['charset'] = 'EUC-jp' + header['charset'] = @conf.charset header['Content-Language'] =****@conf***** header['Pragma'] = 'no-cache' header['Cache-Control'] = 'no-cache'