💭
パッチあて
tDiary 2.2.2がリリースされたらしいので、ちまちまとパッチあて。本当の意味でのパッチあて。とりあえずこれだけ対応した。
- AutoPagerizeに対応しました
- 日本語文字コードの自動認識に失敗する場合を修正しました
- amazon.rb: AmazonのAPI認証に対応しました
基本的にセキュリティ関連じゃなければ適当で。
ついでに
調子に乗ってestraier-searchをAutoPagerize対応に。パッチを載せてみるけど、ちゃんと当てられるかどうかは知らない。
* search.rb~ 2009-08-07 21:09:45.000000000 +0900
+ search.rb 2009-08-07 21:18:30.000000000 +0900
@@ -137,7 +137,7 @@
end
buf = "<p class=\"infobar\">\n"
if current_page > 1
* buf.concat(format_link("前へ", @start - @num, @num))
+ buf.concat(format_link("前へ", @start - @num, @num, "prev"))
end
if first_page > 1
buf.concat("... ")
@@ -153,7 +153,7 @@
buf.concat("... ")
end
if current_page < page_count
* buf.concat(format_link("次へ", @start + @num, @num))
+ buf.concat(format_link("次へ", @start + @num, @num, "next"))
end
buf.concat("</p>\n")
return buf
@@ -163,8 +163,12 @@
return format('?query=%s;start=%d;num=%d;sort=%s;order=%s', CGI::escape(@query), start, num, _(@sort), _(@order))
end
* def format_link(label, start, num)
+ def format_link(label, start, num, rel = nil)
+ if rel == nil
return format('<a href="%s%s">%s</a> ', _(@cgi.script_name ? @cgi.script_name : ""), format_anchor(start, num), _(label))
+ else
+ return format('<a href="%s%s" rel="%s">%s</a> ', _(@cgi.script_name ? @cgi.script_name : ""), format_anchor(start, num), _(rel), _(label))
+ end
end
def create_search_options
* skel/estraier.rhtml~ 2008-07-05 01:02:48.000000000 +0900
+ skel/estraier.rhtml 2009-08-07 21:20:14.000000000 +0900
@@ -44,7 +44,7 @@
<% for i in @start...@end %>
<% item = @result.get_doc(i) || next %>
<% format_result_item(item) %>
*<div class="day">
+<div class="day autopagerize_page_element">
<h2><span class="date"><a href="<%= @conf.index %><%= @plugin.anchor(@date) %>"><%= @date_str %></a></span> <span class="nyear">[<a href="<%= @similar %>">類似検索</a>]</span></h2>
<div class="body">
<div class="section">