Skip to content

Commit

Permalink
* Template code submitted via the template profile now has non-Unix line
Browse files Browse the repository at this point in the history
  endings converted to Unix line endings.

* The select lists for viewing diffs now set the default "from version" to the
  previous version instead of the current version. The current version is
  still the default for the "to version".
  • Loading branch information
theory committed Apr 25, 2008
1 parent ebcb881 commit e590b70
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion comp/widgets/media_prof/view_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
name => 'from_version',
disp => 'From Version',
options => $versions,
value => $param->{from_version} || $media->get_version,
value => $param->{from_version} || ($media->get_version - 1),
&>
<& '/widgets/profile/select.mc',
name => 'to_version',
Expand Down
2 changes: 1 addition & 1 deletion comp/widgets/story_prof/view_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
name => 'from_version',
disp => 'From Version',
options => $versions,
value => $param->{from_version} || $story->get_version,
value => $param->{from_version} || ($story->get_version - 1),
&>
<& '/widgets/profile/select.mc',
name => 'to_version',
Expand Down
2 changes: 2 additions & 0 deletions lib/Bric/App/Callback/Profile/Template.pm
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ $save_meta = sub {
if ($param->{"$widget|upload_file"}) {
$handle_upload->($self, $fa);
} else {
# Normalize line-endings.
$param->{"$widget|code"} =~ s/\r\n?/\n/g;
$fa->set_data($param->{"$widget|code"});
}
if (exists $param->{category_id}) {
Expand Down
11 changes: 11 additions & 0 deletions lib/Bric/Changes.pod
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ C<publish_status> is false, or vice versa, rather than waiting for an
exception from the database constraint. Suggested by Scott (Bug # 1326).
[David]

=item *

Template code submitted via the template profile now has non-Unix line endings
converted to Unix line endings. [David]

=item *

The select lists for viewing diffs now set the default "from version" to the
previous version instead of the current version. The current version is still
the default for the "to version". [David]

=back

=head2 Bug Fixes
Expand Down

0 comments on commit e590b70

Please sign in to comment.