Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item10665:Item10666
   * fixed saving attachments with a "0" comment
   * fixed copying attachments under a different user



git-svn-id: http://svn.foswiki.org/trunk@11526 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Apr 21, 2011
1 parent e75ec6a commit b4d2749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/lib/Foswiki/Meta.pm
Expand Up @@ -2742,7 +2742,7 @@ sub attach {
attachment => $opts{name},
stream => $opts{stream},
user => $this->{_session}->{user}, # cUID
comment => $opts{comment} || '',
comment => defined $opts{comment}?$opts{comment} : '',
};

if ( $plugins->haveHandlerFor('beforeAttachmentSaveHandler') ) {
Expand Down Expand Up @@ -3122,6 +3122,7 @@ sub copyAttachment {

$to->saveAs(
undef, undef,
author => $cUID,
dontlog => 1, # no statistics
comment => 'gained' . $newName
);
Expand Down

0 comments on commit b4d2749

Please sign in to comment.