mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Revert "Add ability to reverse read file contents"
This reverts commit dc62885a51.
This commit is contained in:
@@ -10219,7 +10219,7 @@ else {
|
||||
}
|
||||
}
|
||||
|
||||
=head2 read_file_contents(file, limit, reverse)
|
||||
=head2 read_file_contents(file, limit)
|
||||
|
||||
Given a filename, returns its complete contents as a string. Effectively
|
||||
the same as the Perl construct `cat file`.
|
||||
@@ -10227,7 +10227,7 @@ the same as the Perl construct `cat file`.
|
||||
=cut
|
||||
sub read_file_contents
|
||||
{
|
||||
my ($file, $limit, $reverse) = @_;
|
||||
my ($file, $limit) = @_;
|
||||
&open_readfile(FILE, $file) || return undef;
|
||||
local $/ = undef;
|
||||
my $rv = <FILE>;
|
||||
@@ -10248,10 +10248,6 @@ if ($limit) {
|
||||
$rv = $s . $e;
|
||||
}
|
||||
}
|
||||
if ($reverse) {
|
||||
my @rva = split("\n", $rv);
|
||||
$rv = join("\n", reverse @rva);
|
||||
}
|
||||
return $rv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user