Skip to content

Commit

Permalink
Merge branch 'lh-633-fix-template-creation' of git://github.com/byrne…
Browse files Browse the repository at this point in the history
…reese/melody into lh633-revision-default

* 'lh-633-fix-template-creation' of git://github.com/byrnereese/melody:
  [#634 state:resolved][#633 state:resolved] Set the default value of the current_revision to '0' so that when revision histories are turned on, a valid revision will be entered into the database (avoiding a nasty SQL error). The original bug was reported associated with templates, but the same fix should (and is in the commit) applied to the edit entry screen.
  • Loading branch information
jayallen committed Jan 11, 2011
2 parents 546602e + 947456f commit cd8f6a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tmpl/cms/edit_entry.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
<input type="hidden" name="dirty" value="" />
<mt:if name="use_revision">
<input type="hidden" name="save_revision" id="save_revision" value="1" />
<input type="hidden" name="current_revision" id="current_revision" value="<mt:var name="current_revision">" />
<input type="hidden" name="current_revision" id="current_revision" value="<mt:var name="current_revision" default="0">" />
</mt:if>
</mt:setvarblock>
<mt:setvarblock name="category_setting">
Expand Down
2 changes: 1 addition & 1 deletion tmpl/cms/edit_template.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ TC.attachLoadEvent( init );
<input type="hidden" name="action_input" value="" />
<mt:if name="use_revision">
<input type="hidden" name="save_revision" id="save_revision" value="1" />
<input type="hidden" name="current_revision" id="current_revision" value="<mt:var name="current_revision">" />
<input type="hidden" name="current_revision" id="current_revision" value="<mt:var name="current_revision" default="0">" />
</mt:if>
<input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
<input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />
Expand Down

0 comments on commit cd8f6a4

Please sign in to comment.