Skip to content

Commit

Permalink
Fixed 'unknown this' bug in [calendar] when rendering in a [block].
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Nov 16, 2011
1 parent bfbc336 commit 35710ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Minor changes
* Enabled Acl during document upload.
* Fixed a bug when using [edit] in a list with [add].
* Fixed 'unknown this' bug in [calendar] when rendering in a [block].

== 1.1.3 2011-11-09

Expand Down
2 changes: 2 additions & 0 deletions lib/zena/use/calendar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ def make_calendar(opts)
# HACK to render sub-elements...
bak = @blocks
@blocks = opts[:cell].blocks
# reset saved scope
@context[:saved_template] = nil
cell_code = expand_if(var, node.move_to(var, [klass]))
@blocks = bak
@markup = markup
Expand Down
2 changes: 1 addition & 1 deletion lib/zena/use/dates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def main_date(tz = visitor.tz)
@main_dates ||= {}
@main_dates[tz] ||= begin
if params[:date]
if date = params[:date].to_utc(ISO_DATE_FORMAT, tz)
if date = params[:date].to_utc(_(DATETIME), tz)
date
else
# FIXME: when date parsing fails: show an error, not a 500...
Expand Down

0 comments on commit 35710ef

Please sign in to comment.