Skip to content

Commit

Permalink
Issue #1295: enhance code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Oct 8, 2021
1 parent 17a1d34 commit 934e23e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ sub ArticleDeleteAttachment {
);
}

# no metadata is added
sub ArticleWritePlain {
my ( $Self, %Param ) = @_;

Expand Down Expand Up @@ -578,7 +579,7 @@ sub ArticleAttachmentIndexRaw {
# get main object
my $MainObject = $Kernel::OM->Get('Kernel::System::Main');

# try fs
# try the files in the file system
my @List = $MainObject->DirectoryRead(
Directory => $Path,
Filter => "*",
Expand Down Expand Up @@ -771,6 +772,7 @@ sub ArticleAttachment {
# get main object
my $MainObject = $Kernel::OM->Get('Kernel::System::Main');

# assuming the same order as in ArticleAttachmentIndexRaw
my @List = $MainObject->DirectoryRead(
Directory => $Path,
Filter => '*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ sub ArticleDeleteAttachment {
return 1;
}

# no metadata is added
sub ArticleWritePlain {
my ( $Self, %Param ) = @_;

Expand All @@ -167,8 +168,7 @@ sub ArticleWritePlain {
}
}

# write article to S3
# TODO_S3 third
# write plain to S3
my $Prefix = $Self->_ArticlePrefix($Param{ArticleID});
my $Key = $Prefix . 'plain.txt';
my $Response;
Expand All @@ -181,7 +181,7 @@ sub ArticleWritePlain {
);
}

warn Dumper( ['AAA', $Response, $Response->content ] );
warn Dumper( ['XXX ArticleWritePlain', $Response, $Response->content ] );

# TODO: check success
return 1;
Expand Down Expand Up @@ -299,6 +299,8 @@ sub ArticleAttachmentIndexRaw {
return;
}

# TODO: caching is essential here, because often ArticleAttachment() after ArticleAttachmentIndexRaw()

my $Prefix = $Self->_ArticlePrefix($Param{ArticleID});
my $Response;
{
Expand Down

0 comments on commit 934e23e

Please sign in to comment.